From guillaume.liegard at gmail.com Mon Nov 5 11:38:58 2007 From: guillaume.liegard at gmail.com (Guillaume Liegard) Date: Mon, 5 Nov 2007 17:38:58 +0100 Subject: Cougaar and the servlet mapping Message-ID: <1dd8f11e0711050838wac2d1d2g35daeb3c6b363e50@mail.gmail.com> Hello, I want to use the tomcat container. But I didn't find the equivalent of a classic servlet mapping. For example, this servlet mapping map all "/repository/ [something]" urls to the Webdav servlet. Webdav /repository/* With cougaar, I manage to map One adress to a servlet, with the servletService.register(path, servlet); But every requests with extra path like "/repository/ [something]" are not received by the servlet. Regards -- Guillaume Li?gard -------------- next part -------------- An HTML attachment was scrubbed... URL: http://cougaar.org/pipermail/cougaar-developers/attachments/20071105/b6ae4bed/attachment.html From twright at bbn.com Mon Nov 5 13:31:48 2007 From: twright at bbn.com (Todd Wright) Date: Mon, 05 Nov 2007 13:31:48 -0500 Subject: Cougaar and the servlet mapping In-Reply-To: <1dd8f11e0711050838wac2d1d2g35daeb3c6b363e50@mail.gmail.com> References: <1dd8f11e0711050838wac2d1d2g35daeb3c6b363e50@mail.gmail.com> Message-ID: <472F6194.5040203@bbn.com> The ServletService supports extra path information. For example, if you call: servletService.register("/test", myServlet); then your servlet will receive requests for: /test /test/ /test/abc /test/abc/xyz ... The extra path information is available from: String extraPath = request.getPathInfo(); // e.g. "/abc" The full path is available from: String fullPath = request.getRequestURI(); // e.g. "/$MyAgent/test/abc" You shouldn't need to modify the Tomcat XML configuration files. Todd Guillaume Liegard wrote: > Hello, > > I want to use the tomcat container. > > But I didn't find the equivalent of a classic servlet mapping. > > For example, this servlet mapping map all "/repository/ [something]" > urls to the Webdav servlet. > > Webdav > /repository/* > > > With cougaar, I manage to map One adress to a servlet, with the > servletService.register(path, servlet); > But every requests with extra path like "/repository/ [something]" are > not received by the servlet. > > Regards > > -- > Guillaume Li?gard > > > ------------------------------------------------------------------------ > > _______________________________________________ > Cougaar-developers mailing list > Cougaar-developers at cougaar.org > http://cougaar.org/mailman/listinfo/cougaar-developers From duchene.morgan at wanadoo.fr Wed Nov 14 06:47:59 2007 From: duchene.morgan at wanadoo.fr (=?ISO-8859-1?Q?Morgan_Duch=E8ne?=) Date: Wed, 14 Nov 2007 12:47:59 +0100 Subject: Syncrhonous and Asynchronous calls Message-ID: <473AE06F.4020507@wanadoo.fr> Hi, I have a basic architecture question about the development model with Cougaar. * Developments with Cougaar and plugins are based on blackboard registrations to events (objects, tasks, ...). So it is an asynchronous model where plugins are awaken when new events they are interested in are published. * Cougaar also offers to interact with "the outside world" with servlets to receive commands for example. When a browser sends a requests for a page to and http server, it's a synchronous call as it waits for the answer. So my simple question it this one: if we don't have the data available on the blackboard as the servlet is sending the search parameters (database, files, ...), what is the best way to have plugins give the answer to the servlet? Thanks, Morgan From twright at bbn.com Wed Nov 14 12:05:51 2007 From: twright at bbn.com (Todd Wright) Date: Wed, 14 Nov 2007 12:05:51 -0500 Subject: Syncrhonous and Asynchronous calls In-Reply-To: <473AE06F.4020507@wanadoo.fr> References: <473AE06F.4020507@wanadoo.fr> Message-ID: <473B2AEF.6080300@bbn.com> This design issue is discussed in the "Mandelbrot" demo: http://cougaar.org/docman/view.php/17/201/cougaar_mandelbrot.ppt The code is included in the Cougaar 12.4 release, in: demo-mandelbrot.zip Three design options are discussed: v1) Servlet is self-contained v2) Servlet invokes a synchronous Service, e.g. a service advertised by another plugin. v3) Servlet publishes a blackboard "Job" request and waits for a synchronized "notify()" event or subscription change. Similar to design v3, your servlet could publish a blackboard request and then poll the blackboard for the result, or have the client poll the servlet. Polling is easy to implement but can be inefficient. Todd Morgan Duch?ne wrote: > Hi, > > I have a basic architecture question about the development model with > Cougaar. > * Developments with Cougaar and plugins are based on blackboard > registrations to events (objects, tasks, ...). So it is an asynchronous > model where plugins are awaken when new events they are interested in > are published. > * Cougaar also offers to interact with "the outside world" with servlets > to receive commands for example. When a browser sends a requests for a > page to and http server, it's a synchronous call as it waits for the answer. > > So my simple question it this one: if we don't have the data available > on the blackboard as the servlet is sending the search parameters > (database, files, ...), what is the best way to have plugins give the > answer to the servlet? > > Thanks, > Morgan > > _______________________________________________ > Cougaar-developers mailing list > Cougaar-developers at cougaar.org > http://cougaar.org/mailman/listinfo/cougaar-developers > From duchene.morgan at wanadoo.fr Wed Nov 14 12:52:07 2007 From: duchene.morgan at wanadoo.fr (=?ISO-8859-1?Q?Morgan_Duch=E8ne?=) Date: Wed, 14 Nov 2007 18:52:07 +0100 Subject: Syncrhonous and Asynchronous calls In-Reply-To: <473B2AEF.6080300@bbn.com> References: <473AE06F.4020507@wanadoo.fr> <473B2AEF.6080300@bbn.com> Message-ID: <473B35C7.7060908@wanadoo.fr> Great document, thank you! Morgan Todd Wright a ?crit : > > This design issue is discussed in the "Mandelbrot" demo: > http://cougaar.org/docman/view.php/17/201/cougaar_mandelbrot.ppt > > The code is included in the Cougaar 12.4 release, in: > demo-mandelbrot.zip > > Three design options are discussed: > > v1) Servlet is self-contained > > v2) Servlet invokes a synchronous Service, e.g. a service advertised > by another plugin. > > v3) Servlet publishes a blackboard "Job" request and waits for a > synchronized "notify()" event or subscription change. > > Similar to design v3, your servlet could publish a blackboard request > and then poll the blackboard for the result, or have the client poll > the servlet. Polling is easy to implement but can be inefficient. > > Todd > > Morgan Duch?ne wrote: >> Hi, >> >> I have a basic architecture question about the development model with >> Cougaar. >> * Developments with Cougaar and plugins are based on blackboard >> registrations to events (objects, tasks, ...). So it is an >> asynchronous model where plugins are awaken when new events they are >> interested in are published. >> * Cougaar also offers to interact with "the outside world" with >> servlets to receive commands for example. When a browser sends a >> requests for a page to and http server, it's a synchronous call as it >> waits for the answer. >> >> So my simple question it this one: if we don't have the data >> available on the blackboard as the servlet is sending the search >> parameters (database, files, ...), what is the best way to have >> plugins give the answer to the servlet? >> >> Thanks, >> Morgan >> >> _______________________________________________ >> Cougaar-developers mailing list >> Cougaar-developers at cougaar.org >> http://cougaar.org/mailman/listinfo/cougaar-developers >> > > > __________ NOD32 2658 (20071114) Information __________ > > This message was checked by NOD32 antivirus system. > http://www.eset.com > > > From duchene.morgan at wanadoo.fr Thu Nov 15 04:29:24 2007 From: duchene.morgan at wanadoo.fr (=?ISO-8859-1?Q?Morgan_Duch=E8ne?=) Date: Thu, 15 Nov 2007 10:29:24 +0100 Subject: Syncrhonous and Asynchronous calls In-Reply-To: <473B2AEF.6080300@bbn.com> References: <473AE06F.4020507@wanadoo.fr> <473B2AEF.6080300@bbn.com> Message-ID: <473C1174.5040405@wanadoo.fr> I have downloaded the latest release of Cougaar. It seems like all designs have not been coded in the Mandelbrot example. Is there a plan to add them or did you consider they were part of other tutorials? Because this is a very good tutorial and nice to have it explicitly explain all designs. On the other hand, we could probably help to add them. Thanks, Morgan Todd Wright a ?crit : > > This design issue is discussed in the "Mandelbrot" demo: > http://cougaar.org/docman/view.php/17/201/cougaar_mandelbrot.ppt > > The code is included in the Cougaar 12.4 release, in: > demo-mandelbrot.zip > > Three design options are discussed: > > v1) Servlet is self-contained > > v2) Servlet invokes a synchronous Service, e.g. a service advertised > by another plugin. > > v3) Servlet publishes a blackboard "Job" request and waits for a > synchronized "notify()" event or subscription change. > > Similar to design v3, your servlet could publish a blackboard request > and then poll the blackboard for the result, or have the client poll > the servlet. Polling is easy to implement but can be inefficient. > > Todd > > Morgan Duch?ne wrote: >> Hi, >> >> I have a basic architecture question about the development model with >> Cougaar. >> * Developments with Cougaar and plugins are based on blackboard >> registrations to events (objects, tasks, ...). So it is an >> asynchronous model where plugins are awaken when new events they are >> interested in are published. >> * Cougaar also offers to interact with "the outside world" with >> servlets to receive commands for example. When a browser sends a >> requests for a page to and http server, it's a synchronous call as it >> waits for the answer. >> >> So my simple question it this one: if we don't have the data >> available on the blackboard as the servlet is sending the search >> parameters (database, files, ...), what is the best way to have >> plugins give the answer to the servlet? >> >> Thanks, >> Morgan >> >> _______________________________________________ >> Cougaar-developers mailing list >> Cougaar-developers at cougaar.org >> http://cougaar.org/mailman/listinfo/cougaar-developers >> > > > __________ NOD32 2658 (20071114) Information __________ > > This message was checked by NOD32 antivirus system. > http://www.eset.com > > > From twright at bbn.com Thu Nov 15 14:43:36 2007 From: twright at bbn.com (Todd Wright) Date: Thu, 15 Nov 2007 14:43:36 -0500 Subject: Syncrhonous and Asynchronous calls In-Reply-To: <473C1174.5040405@wanadoo.fr> References: <473AE06F.4020507@wanadoo.fr> <473B2AEF.6080300@bbn.com> <473C1174.5040405@wanadoo.fr> Message-ID: <473CA168.5020206@bbn.com> Morgan Duch?ne wrote: > I have downloaded the latest release of Cougaar. It seems like all > designs have not been coded in the Mandelbrot example. Right, only the first three examples have been implemented. > Is there a plan to add them Yes, I'd like to implement the remaining examples but it's been a low priority. I plan to implement them sometime early next year, ideally in time for the 12.6 release. > or did you consider they were part of other tutorials? The distributed example (design 6) is similar to the ping demo, which is included in the Cougaar release as: demo-ping.zip > Because this is a very good tutorial and nice to have it explicitly > explain all designs. Thanks. > On the other hand, we could probably help to add them. Thanks for the offer. My guess is that it'd be easier for me to implement the remaining examples, but I'm sure you could help with a similar tutorial. For example, it'd be great to have a UI tutorial that illustrates the same basic application implemented different ways. The application could be a simple blackboard object counter that displays a table of classname to count, e.g.: CLASSNAME, COUNT Relay, 1234 Task, 234 Asset, 4321 ... and implement several different designs: 1) HTML page 2) HTML + AJAX 3) Applet (embedded Swing JTable, talks to Servlet) 4) Google Web Toolkit (embedded GWT widgets, talks to Servlet) 5) Swing GUI (stand-alone application, talks to Servlet via URLConnection) 6) SOAP client (talks to Cougaar WebServicesService "webaxis" plugin) The existing Cougaar demos only illustrate simple HTML pages. Similarly, it'd be very interesting to see a UI example where Google Maps and/or Google Earth talks to a Cougaar servlet. The servlet would generate KML data for Google's Map API to display. Todd > > Thanks, > Morgan > > Todd Wright a ?crit : >> >> This design issue is discussed in the "Mandelbrot" demo: >> http://cougaar.org/docman/view.php/17/201/cougaar_mandelbrot.ppt >> >> The code is included in the Cougaar 12.4 release, in: >> demo-mandelbrot.zip >> >> Three design options are discussed: >> >> v1) Servlet is self-contained >> >> v2) Servlet invokes a synchronous Service, e.g. a service advertised >> by another plugin. >> >> v3) Servlet publishes a blackboard "Job" request and waits for a >> synchronized "notify()" event or subscription change. >> >> Similar to design v3, your servlet could publish a blackboard request >> and then poll the blackboard for the result, or have the client poll >> the servlet. Polling is easy to implement but can be inefficient. >> >> Todd >> >> Morgan Duch?ne wrote: >>> Hi, >>> >>> I have a basic architecture question about the development model with >>> Cougaar. >>> * Developments with Cougaar and plugins are based on blackboard >>> registrations to events (objects, tasks, ...). So it is an >>> asynchronous model where plugins are awaken when new events they are >>> interested in are published. >>> * Cougaar also offers to interact with "the outside world" with >>> servlets to receive commands for example. When a browser sends a >>> requests for a page to and http server, it's a synchronous call as it >>> waits for the answer. >>> >>> So my simple question it this one: if we don't have the data >>> available on the blackboard as the servlet is sending the search >>> parameters (database, files, ...), what is the best way to have >>> plugins give the answer to the servlet? >>> >>> Thanks, >>> Morgan >>> >>> _______________________________________________ >>> Cougaar-developers mailing list >>> Cougaar-developers at cougaar.org >>> http://cougaar.org/mailman/listinfo/cougaar-developers >>> >> >> >> __________ NOD32 2658 (20071114) Information __________ >> >> This message was checked by NOD32 antivirus system. >> http://www.eset.com >> >> >> > > > From duchene.morgan at wanadoo.fr Fri Nov 16 06:31:58 2007 From: duchene.morgan at wanadoo.fr (=?ISO-8859-1?Q?Morgan_Duch=E8ne?=) Date: Fri, 16 Nov 2007 12:31:58 +0100 Subject: Syncrhonous and Asynchronous calls In-Reply-To: <473CA168.5020206@bbn.com> References: <473AE06F.4020507@wanadoo.fr> <473B2AEF.6080300@bbn.com> <473C1174.5040405@wanadoo.fr> <473CA168.5020206@bbn.com> Message-ID: <473D7FAE.5030307@wanadoo.fr> Thank you Todd. We'll discuss with Guillaume to see when we can plan the development of this new tutorial. Morgan Todd Wright a ?crit : > > Morgan Duch?ne wrote: >> I have downloaded the latest release of Cougaar. It seems like all >> designs have not been coded in the Mandelbrot example. > > Right, only the first three examples have been implemented. > >> Is there a plan to add them > > Yes, I'd like to implement the remaining examples but it's been a low > priority. I plan to implement them sometime early next year, ideally > in time for the 12.6 release. > >> or did you consider they were part of other tutorials? > > The distributed example (design 6) is similar to the ping demo, which > is included in the Cougaar release as: > demo-ping.zip > >> Because this is a very good tutorial and nice to have it explicitly >> explain all designs. > > Thanks. > >> On the other hand, we could probably help to add them. > > Thanks for the offer. My guess is that it'd be easier for me to > implement the remaining examples, but I'm sure you could help with a > similar tutorial. > > For example, it'd be great to have a UI tutorial that illustrates the > same basic application implemented different ways. The application > could be a simple blackboard object counter that displays a table of > classname to count, e.g.: > CLASSNAME, COUNT > Relay, 1234 > Task, 234 > Asset, 4321 > ... > and implement several different designs: > 1) HTML page > 2) HTML + AJAX > 3) Applet (embedded Swing JTable, talks to Servlet) > 4) Google Web Toolkit (embedded GWT widgets, talks to Servlet) > 5) Swing GUI (stand-alone application, talks to Servlet via > URLConnection) > 6) SOAP client (talks to Cougaar WebServicesService "webaxis" plugin) > The existing Cougaar demos only illustrate simple HTML pages. > > Similarly, it'd be very interesting to see a UI example where Google > Maps and/or Google Earth talks to a Cougaar servlet. The servlet > would generate KML data for Google's Map API to display. > > Todd >> >> Thanks, >> Morgan >> >> Todd Wright a ?crit : >>> >>> This design issue is discussed in the "Mandelbrot" demo: >>> http://cougaar.org/docman/view.php/17/201/cougaar_mandelbrot.ppt >>> >>> The code is included in the Cougaar 12.4 release, in: >>> demo-mandelbrot.zip >>> >>> Three design options are discussed: >>> >>> v1) Servlet is self-contained >>> >>> v2) Servlet invokes a synchronous Service, e.g. a service advertised >>> by another plugin. >>> >>> v3) Servlet publishes a blackboard "Job" request and waits for a >>> synchronized "notify()" event or subscription change. >>> >>> Similar to design v3, your servlet could publish a blackboard >>> request and then poll the blackboard for the result, or have the >>> client poll the servlet. Polling is easy to implement but can be >>> inefficient. >>> >>> Todd >>> >>> Morgan Duch?ne wrote: >>>> Hi, >>>> >>>> I have a basic architecture question about the development model >>>> with Cougaar. >>>> * Developments with Cougaar and plugins are based on blackboard >>>> registrations to events (objects, tasks, ...). So it is an >>>> asynchronous model where plugins are awaken when new events they >>>> are interested in are published. >>>> * Cougaar also offers to interact with "the outside world" with >>>> servlets to receive commands for example. When a browser sends a >>>> requests for a page to and http server, it's a synchronous call as >>>> it waits for the answer. >>>> >>>> So my simple question it this one: if we don't have the data >>>> available on the blackboard as the servlet is sending the search >>>> parameters (database, files, ...), what is the best way to have >>>> plugins give the answer to the servlet? >>>> >>>> Thanks, >>>> Morgan >>>> >>>> _______________________________________________ >>>> Cougaar-developers mailing list >>>> Cougaar-developers at cougaar.org >>>> http://cougaar.org/mailman/listinfo/cougaar-developers >>>> >>> >>> >>> __________ NOD32 2658 (20071114) Information __________ >>> >>> This message was checked by NOD32 antivirus system. >>> http://www.eset.com >>> >>> >>> >> >> >> > > > __________ NOD32 2662 (20071116) Information __________ > > This message was checked by NOD32 antivirus system. > http://www.eset.com > > >