Event Name Examples

From MemberWiki

Jump to: navigation, search

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.

Contents

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:

/OpenAjax/hub/subscribe/com/tibco/foo/**

Extrapolating from /OpenAjax/onload

There is some chance that the Hub might broadcast events that provide an indication of Web page's initialization process. In previous versions of the Hub, we defined an initialization model that had 4 steps: (1) library initialization, where the libraries prepared themselves for use by the application, (2) component initialization, where visual and non-visual components (aka widgets or controls) instantiated and initialized themselves using the services of the underlying libraries, (3) markup scanning (which is no longer part of Hub 1.0), and (4) application initialization, where user-developed JavaScript initializes itself, such as setting up event listeners on UI components. If we resurrect the 3-step model (i.e., library initialization, component initialization, and application initialization), then the Hub might broadcast events similar to the following:

  • /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)

Communications Hub

Based on the discussions in the Communications Hub task force, here are some brainstorms about events that might arise out of those discussions:

  • /OpenAjax/CommHub/ChannelOpened
  • /OpenAjax/CommHub/ChannelClosed
  • /OpenAjax/CommHub/ChannelActivated
  • /OpenAjax/CommHub/ChannelDeactivated
  • /OpenAjax/CommHub/DataArrived
  • /OpenAjax/CommHub/DataSent

IDE Integration

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)
  • /OpenAjax/IDE/Drop
  • /OpenAjax/IDE/Redraw
  • /OpenAJax/IDE/OpenPropertiesDialog

Howard's Examples

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.

  • /com/tibco/BPM/etc
  • /com/tibco/finance/etc
  • /com/microsoft/office/etc

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/market/ticker/event
  • /com/tibco/equities/nyse/T/bid
  • /com/tibco/equities/nasdaq/CSCO/trade
  • /com/tibco/equities/nasdaq/CSCO/* (useful wildcard example)
  • /com/tibco/options/nasdaq/CSCO/* (useful wildcard example)
  • /com/tibco/news/headlines/CSCO

Troubleshooting/Logging example

Troubleshooting, logging and debug components frequently want to monitor or forward consolidated event streams:

  • com/xyz/Log/severity/component/event
  • com/xyz/Log/Info/ComponentX/Initialized
  • com/xyz/Log/Info/**
  • com/xyz/Log/*/ComponentX/*

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

  • /com/xyz/nm/severity/deviceType/location/ID/event
  • /com/xyz/nm/info/router/hillview/10.50.0.1/startup
  • /com/xyz/nm/error/**
  • /com/xyz/nm/info/*/hillview/**
  • /com/xyz/nm/*/router/hillview/**

These monitoring examples demonstrate how orthogonal concepts can be combined within a single name, and demonstrates how token wildcards appear naturally in such scenarios.

Chatroom examples

  • /com/microsoft/chat/MyRoom/alert/friendEntered
  • /com/microsoft/chat/SomeRoom/error/banned
  • /com/microsoft/chat/OtherRoom/alert/spamBlocked
  • /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.

Personal tools