jsharpe
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
Alessandro Alinone
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
jsharpe
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
Dario Crivelli
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