Hi all, I thought that I'd update you on some progress that I've made within my own application. Perhaps my approach of publishing MovingObjectStatus will be of use to you.
To re-state my goals: 1. provide a high performance publish/subscribe mechanism for broadcasting new MovingObjectStatus objects; 2. the time a consumer subscribing should not be important i.e. the consumer can subscribe at any point in a broadcast; and 3. use OGC standards where possible; and 4. use open standards where OGC standards fall short. Using a publish/subscribe mechanism is as opposed to a request/ response mechanism (as per WFS). With a request/response mechanism, any number of clients would have to make frequent requests for changes in moving object status. I would then end up with multiple clients making multiple polling style requests. Given the frequency of my moving object status data (two updates per second) and two clients, I see that the publish/subscribe model is more efficient for a server and a network given the absence of client requests. Publish/ subscribe should also be more scalable given that more clients have little impact on the server's workload. To achieve my goals here are my design decisions: 1. I'm using GML's DynamicFeatureCollection, DynamicFeature and MovingObjectStatus; 2. validTime is used against DynamicFeatureCollection and DynamicFeature to describe snapshots of what the collection and feature respectively look like from a given time (as per GML spec); 3. validTime is used against MovingObjectStatus to note the moving status of an object from a point in time (as per GML spec); 4. JMS (Java Messaging Service) is used to publish DynamicFeatureCollection, DynamicFeature and MovingObjectStatus; 5. JMS MapMessage objects are used to convey the GML payload; 6. given MapMessage, GML payloads are expressed as name/value pairs; 7. the "name" of the pair is an XPath expression used to define the GML element name; 8. the "value" of the pair is used to convey the GML element value; and 9. the DynamicFeatureCollection and DynamicFeature are described periodically thus allowing subscribers to "join in" the broadcast at any time. I chose JMS given its high performance publish/subscribe mechanism, and also because I haven't come across anything OGC based or W3C based with a similar publish/subscribe mechanism. I'm happy to be educated otherwise! Consumers of the published JMS topic can easily re-construct the snapshots of DynamicFeatureCollections and DynamicFeatures along with their MovingObjectStatus back into GML. Consumers can also rapidly obtain the information that they need from a MapMessage given the element value lookup by name i.e. no XML parsing is required. Here's what a sequence of name elements might look like for a given broadcast of some moving object status, dynamic feature and feature collection: # Names for the feature collection /j:FeatureCollection/name /j:FeatureCollection/boundedBy/Envelope/@srsName /j:FeatureCollection/boundedBy/Envelope/lowerCorner /j:FeatureCollection/boundedBy/Envelope/upperCorner # Names for a flight /j:FeatureCollection/featureMembers/j:[EMAIL PROTECTED] /j:FeatureCollection/featureMembers/j:Flight/name /j:FeatureCollection/featureMembers/j:Flight/validTime/TimeInstant/ timePosition # Names for a MovingObjectStatus /j:FeatureCollection/featureMembers/j:Flight/track/MovingObjectStatus/ acceleration /j:FeatureCollection/featureMembers/j:Flight/track/MovingObjectStatus/ bearing /j:FeatureCollection/featureMembers/j:Flight/track/MovingObjectStatus/ elevation /j:FeatureCollection/featureMembers/j:Flight/track/MovingObjectStatus/ speed /j:FeatureCollection/featureMembers/j:Flight/track/MovingObjectStatus/ status /j:FeatureCollection/featureMembers/j:Flight/track/MovingObjectStatus/ validtime/TimeInstant/timePosition # ...and another.. note that the appearance of acceleration again denotes a new MovingObjectStatus /j:FeatureCollection/featureMembers/j:Flight/track/MovingObjectStatus/ acceleration /j:FeatureCollection/featureMembers/j:Flight/track/MovingObjectStatus/ bearing /j:FeatureCollection/featureMembers/j:Flight/track/MovingObjectStatus/ elevation /j:FeatureCollection/featureMembers/j:Flight/track/MovingObjectStatus/ speed /j:FeatureCollection/featureMembers/j:Flight/track/MovingObjectStatus/ status /j:FeatureCollection/featureMembers/j:Flight/track/MovingObjectStatus/ validtime/TimeInstant/timePosition # ...another flight /j:FeatureCollection/featureMembers/j:[EMAIL PROTECTED] /j:FeatureCollection/featureMembers/j:Flight/name /j:FeatureCollection/featureMembers/j:Flight/validTime/TimeInstant/ timePosition # the other flight's MovingObjectStatus /j:FeatureCollection/featureMembers/j:Flight/track/MovingObjectStatus/ acceleration /j:FeatureCollection/featureMembers/j:Flight/track/MovingObjectStatus/ bearing /j:FeatureCollection/featureMembers/j:Flight/track/MovingObjectStatus/ elevation /j:FeatureCollection/featureMembers/j:Flight/track/MovingObjectStatus/ speed /j:FeatureCollection/featureMembers/j:Flight/track/MovingObjectStatus/ status /j:FeatureCollection/featureMembers/j:Flight/track/MovingObjectStatus/ validtime/TimeInstant/timePosition # finally the time position describes the snapshot time for the feature collection as a whole /j:FeatureCollection/validTime/TimeInstant/timePosition Note that "j" is a namespace that would probably be defined either in some WSDL and that "Flight" is a subclass of "DynamicFeature". Also "j:FeatureCollection" is a subclass of "DynamicFeatureCollection" so that snapshots can be expressed. All non-namespaced nodes are using a default namespace of "gml". Name/value pairs are only declared for elements that actually have a value thus keeping the message size to a minimum. I now have a working implementation of the above given flight data in a PostGIS database and a Java Servlet publishing it as described. My next task is to consume the data in Titan Class Vision and thus present it to the user. I hope that this has been as useful for you as it has for me. Your thoughts and comments are very welcome. Kind regards, Christopher ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Mapbuilder-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mapbuilder-users
