[omniORB] IDL semantics of event publication (including event
payload)
Tuser
gev at terma.com
Wed Sep 19 02:16:35 BST 2007
In the COS notification service the IDLs are given. They are part of the
specification. You therefore do not define any IDL, except the layout of
your events.
If I remember correctly, the Notification service works with a structured
event (Value type), and you can therefore specialize the event. You must
also specify which parts of the event that subscribers can filter on. A
subscriber will receive an event, and thereafter have to down cast it to the
correct event type.
Hope this helps.
Tom O'Reilly wrote:
>
> My question is not omniORB-specific; my apologies if this is not the
> appropriate forum..
> I'm implementing a "vehicle navigation service" that can supply
> information to clients in two ways:
>
> 1. "Synchronous": client obtains navigation service proxy through Naming
> service, then invokes IDL-defined operation to get position
>
> 2. Subscribe-publish: Client subscribes to "new position" events from the
> navigation service through CosNotification; the navigation service will
> then supply events - including vehicle coordinates as event "payload" - to
> CosNotification service, which will distribute to subscribers.
>
>
> How to best express these two capabilities in IDL? The synchronous
> operation is obviously straightforward. But how do developer's (client and
> server programmers) know from the IDL that the service can publish "new
> position" events as well, and that the event "payload" includes the new
> position coordinates?
>
> Here is an example of the IDL I am starting with;
>
> module auv {
>
> interface Navigation {
>
> struct Position {
> float latitude;
> float longitutde;
> float altitude;
> };
>
> // Synchronous operation to get vehicle position
> void getPosition(out Position p);
>
> // Define event name that client can subscribe to
> const string NewPositionEvent = "NewPosition";
>
> // How to express the event payload contents here, such that compiler
> enforces it???
>
> };
> };
>
>
> Thanks,
> Tom
>
>
> --------------------------------------------------
> Thomas C. O'Reilly
> Monterey Bay Aquarium Research Institute
> 7700 Sandholdt Road
> Moss Landing, California 95039-9644
> 831-775-1766 (voice)
> 831-775-1620 (FAX)
> oreilly at mbari.org (email)
> http://www.mbari.org (World-wide Web)
>
> "The machine does not isolate man from the great mysteries
> of nature, but plunges him more deeply into them."
>
> - ANTOINE DE SAINT-EXUPERY
> "Wind, Sand, and Stars" (1939)
>
>
> _______________________________________________
> omniORB-list mailing list
> omniORB-list at omniorb-support.com
> http://www.omniorb-support.com/mailman/listinfo/omniorb-list
>
>
--
View this message in context: http://www.nabble.com/IDL-semantics-of-event-publication-%28including-event-payload%29-tf4477937.html#a12772728
Sent from the OmniORB - User mailing list archive at Nabble.com.
More information about the omniORB-list
mailing list