Monday, February 18th, 2008
Liberator Comet Platform: Free Edition
Caplin Systems, creator of the Liberator Comet platform have announced a free version which can be used for non-commercial applications and for evaluation.
Liberator includes a high-performance Comet server, a JavaScript client library, and a Java server integration library.
There are many examples such as the subscriptions sample which shows a page with realtime updating information for a variety of equities and foreign exchange data.
This is how a subscriber looks in JavaScript:
-
-
<script type="text/javascript" id="sl4b" src="/sl4b" rttpprovider="javascript"></script>
-
<script type="text/javascript">
-
// class definition for SimpleSubscriber
-
function SimpleSubscriber(sObjectName)
-
{
-
// Store the object name as a member variable so it can be used later on; no subscription can
-
// take place until this object's ready() method has been called.
-
this.m_sObjectName = sObjectName;
-
-
// Invokes the initialise method on the base class (i.e. SL4B_AbstractSubscriber), this
-
// must be called within the constructor of all SL4B_AbstractSubscriber subclasses.
-
this.initialise();
-
}
-
-
// Defines SimpleSubscriber as a subclass of SL4B_AbstractSubscriber.
-
SimpleSubscriber.prototype = new SL4B_AbstractSubscriber;
-
-
// Overrides the ready() method from SL4B_AbstractSubscriber; once this method has been invoked
-
// it becomes safe to make object subscriptions.
-
SimpleSubscriber.prototype.ready = function() {
-
// Use the RTTP provider to setup the subscription; a reference to this object is passed in
-
// since it will be acting as the subscriber, and will receive the notification updates.
-
SL4B_Accessor.getRttpProvider().getObject(this, this.m_sObjectName);
-
};
-
-
// Overrides the recordUpdated() callback method from SL4B_AbstractSubscriber; this method will
-
// be invoked whenever new object data becomes available.
-
SimpleSubscriber.prototype.recordUpdated = function (sObjectName, sFieldName, sValue) {
-
// add code to process the record update here
-
}
-
-
// Creates a new SimpleSubscriber to receive streaming updates for /DEMO/YHOO.
-
new SimpleSubscriber("/DEMO/YHOO");
-
</script>
-













Tell me that their framework doesn’t spell ‘initialize’ wrong.
They’re British, so I think us Americans actually spell it wrong. I think that’s why so many developers spell it init :)