Event Name Examples
This wiki page was created in April 2007 during discussion about the pub/sub feature targeted for OpenAjax Hub 1.0. The purpose of this wiki page is to collect examples of some of the event names that we might see in practice. We shouldn't discuss at this time the viability of any of the proposed events below or argue about the exact names and features; instead, the purpose of the list below is to provide some concrete examples of some of the types of events that might arrive on the scene down the road so that we can think through the feature set for the pub/sub feature in OpenAjax Hub 1.0.
OpenAjax events (present and future)
We anticipate that OpenAjax Alliance will define a relatively small set of standard events as described in the Interoperability Working Group Charter. Here are some possibilities for some events that OpenAjax Alliance might define:
From Alex's oaa2.js implementation
The following are the event names shown in Alex's oaa2.js check-in as of today's date (2007-04-17).
- /OpenAjax/onload - An event broadcast by the Hub very soon after the document's 'load' event occurs. This event appears in the oaa2.js code submission that Alex Russell has submitted into our open source project in a Hub implementation that attempted to capture the decisions about OpenAjax Hub 1.0 from the March 2007 face-to-face meeting.
- /OpenAjax/onunload - Similar to the above, except for the document's 'unload' event.
- /OpenAjax/registerLibrary - An event broadcast by the Hub every time OpenAjax.registerLibrary() is invoked.
- /OpenAjax/unregisterLibrary - Self-evident.
It has been suggested that the events should be named /OpenAjax/hub/onload, etc. (i.e., insert "/hub") but as of this moment Alex's submitted source code says "/OpenAjax/onload", etc.
Extrapolating from /OpenAjax/registerLibrary
There is a reasonable chance that the Hub will broadcast events for many of its API calls similar to how OpenAjax.registryLibrary() would cause an /OpenAjax/registerLibrary event. Therefore, we might see something like the following events in the future:
- /OpenAjax/subscribe (or perhaps /OpenAjax/hub/subscribe/name)
- /OpenAjax/unsubscribe (or perhaps /OpenAjax/hub/unsubscribe/name)
- /OpenAjax/registerGlobals (or perhaps /OpenAjax/hub/registerGlobals, i.e., if we resurrect globals management)
- /OpenAjax/scanNode (or perhaps /OpenAjax/hub/scanNode, i.e., if we resurrect the markup scanner)
A subscriber that wants to be notified of subscribe events for particular topic spaces might subscribe to events like this:
Extrapolating from /OpenAjax/onload
- /OpenAjax/InitLibraries (or perhaps /OpenAjax/hub/InitLibraries)
- /OpenAjax/InitComponents (or perhaps /OpenAjax/hub/InitComponents )
- /OpenAjax/InitApplication (or perhaps /OpenAjax/hub/InitApplication )
Drag and drop
Since pretty much our first conference call, we have identified drag and drop as an area where we might be able to help interoperability within a mashup. Here are some events we might define:
- /OpenAjax/DragInit (or perhaps /OpenAjax/dnd/DragInit)
- /OpenAjax/Drop (or perhaps /OpenAjax/dnd/Drop)
Based on the discussions in the Communications Hub task force, here are some brainstorms about events that might arise out of those discussions:
Some IDEs leverage design-time events. An example would be Adobe GoLive as described at http://www.openajax.org/member/wiki/IDE_TF_Survey. There might be similar features in the world of Java Beans. Here are some ideas, pulled out of thin air:
- /OpenAjax/IDE/DragInit (when dragging an icon out of a palette onto the canvas)
The following examples were extracted by going through Howard's recent emails.
Note: I have condensed these, provided basic background and added a few more. -hw
Hierarchical convention for Topic Space Management
Using a convention such as the following allows efficient management of the topic space. Organizations use their domains to subdivide the topic space, and each organization comes up with its own approach to subdividing its own area of the topic space.
This approach avoids a requirement for a common registry of event names managed at the OAA's expense.
It is important to note that a component built by vendor X needs to be able to listen to topics like /com/vendorY/etc and may also be permited to send on /com/vendorY/etc as well. Vendor Y might be simply an organization that specifies a topic hierarchy but implements no software of its own, or it might implement its own toolkit and specify events; in the latter case, in order to listen for events from Y's toolkit, X's toolkit must be able to listen on Y's topic names.
Comet Stock Quotes examples
In this example, a Comet server such as LightStreamer pushes financial quotes to an invisible browser-side client that publishes them on the OpenAjax Hub, which in turn delivers them to subscribers that need them. This is a common consumer application, and not only applies to the financial sector but also to telemetry and various other Comet-based data "push" applications. This approach allows for hot-swapping of publishers and subscribers, and was used in the two Comet demos at the OAA Face to Face in New York.
- /com/tibco/equities/nasdaq/CSCO/* (useful wildcard example)
- /com/tibco/options/nasdaq/CSCO/* (useful wildcard example)
Troubleshooting, logging and debug components frequently want to monitor or forward consolidated event streams:
This example demonstrates how a name can contain tokens that represent orthogonal concepts (severity, component, event) and shows how token wildcards may be used.
Network monitoring mashup examples
These monitoring examples demonstrate how orthogonal concepts can be combined within a single name, and demonstrates how token wildcards appear naturally in such scenarios.
- /com/microsoft/chat/*/alert/* (useful wildcard example)
This example demonstrates how a name can contain tokens that represent orthogonal concepts (room, info type), and shows how token wildcards may be used.