-
September 27th, 2006, 01:46 PM
#1
LightStreamer and Sockets - newbie question
Hi,
I am a newbie and I have gone through the test stuff and I think (hope) I understand what's going on. I am now looking to do something clever.
What I am looking to do is the following:
Currently we have a lightstreamer feed hanging off a gigaspace and updates a webpage accordingly (the code implements DataProvider). What I am looking to do is push the data into the lightstreamer engine via a socket, rather than via the cache.
E.g.
Currently. OurStuff -----> GigaSpace Cache <----LightStreamer --->webpage
Desired OurStuff -------------------------------> LightStreamer --->webpage
When the LS is started it connects to the GS and listens for updates. If I chage this to when it starts up to listen on a socket for the "OurStuff" pushing out data on a socket would this work? Or do I have to implement a different interface than the DataProvider?
Thanks
JoN
-
September 27th, 2006, 06:02 PM
#2
Hi JoN,
Sure, the DataProvider interface is flexible enough to allow any kind of systems integration in its implementation. In your case you need to write a Lightstreamer Data Adapter (i.e. a concrete implementation of the DataProvider interface) that handles a socket to get your data from "OurStuff".
So you're definitely on the right track.
Cheers
-
September 28th, 2006, 10:10 AM
#3
Alex
That's what I had thought/assumed. We already have a class that implements the interface so I can used that.
One other small question. We have a file called data_provider.properties that we load from the System.props. Is this set (i.e. a "default" one LS sets) to allow you to configure properties?
Thanks
JoN
-
September 28th, 2006, 02:03 PM
#4
Hi JoN
You can add configuration properties for the Adapters as an extension of Lightstreamer Server configuration, through the "param" elements in the "adapters.xml" file.
These configuration properties are received by the Adapter in its "init" call.
The pathname of the directory where the "adapters.xml" file resides is also received in the "init" call; this allows the Adapter to implement its own configuration technique.
The ".properties" file you see is probably a custom configuration implemented in your specific Data Adapter.
Dario
Similar Threads
-
By webmons in forum Adapter SDKs
Replies: 3
Last Post: March 7th, 2013, 09:30 AM
-
By jhang0315 in forum General
Replies: 3
Last Post: May 30th, 2012, 09:44 AM
-
By karthik in forum Client SDKs
Replies: 2
Last Post: August 24th, 2010, 07:11 AM
-
By chenxun in forum Client SDKs
Replies: 1
Last Post: July 1st, 2010, 02:51 PM
-
By pisak in forum Client SDKs
Replies: 1
Last Post: January 23rd, 2008, 03:10 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
All times are GMT +1. The time now is 03:28 PM.
Bookmarks