This is my server-sent-events adapter for StreamBase version 3.5. This code is NOT officially sanctioned, acknowledged, supported, or (perhaps) even appreciated by StreamBase Systems. It's just a quick hack I wrote one Friday evening.
To run this adapter do the following:
Save several files to your local machine.
They simply won't work if you try to use them directly from kimbly.com.
The files you need are:
(Optional) Compile.
Either use the precompiled SSE.jar, or run "ant" to recreate it.
Run sbd.
From the command line: sbd -f sse.sbconf sse.sbapp.
If you prefer using Studio, you'll need to create a new project, import
sse.sbconf, SSE.jar, and sse.sbapp, and then run.
Send tuples.
From the command line: sbfeedsim -x 0.2.
If you prefer using Studio, you can type tuples in by hand, or create a
feedsim, or use a recorded stream, or whatever else you prefer.
Open sse.html in Opera
[As of August 2006, server-sent-events are only supported by Opera]
If everything works properly, Opera should pop up a dialog box with
a four-letter string every time a tuple is sent to sbd.
If you have trouble running this adapter, please leave a message on the comments page.
If you modify the application and change the port number, then you will need to update the port number in the html file to match.
If you modify the application and change the input schema, you may well crash Opera. Currently Opera requires events to have a "data" field and no other fields. The only exception is if you add an "Event" field, in which case the adapter will use that as the event type rather than the default event type (which in this app is "hello").
If you modify the application and change the event type so that it isn't "hello" anymore, then you will either need to make a corresponding change to the html, or you won't see any dialog boxes.
Last updated September 2, 2006
Back to Kimberley's Code.
Back to Kimberley's Home Page.