-
August 16th, 2008, 04:54 AM
#1
What are the pros and cons between
1)reading directly from a DB source
and
2)reading from a file like xml
I write a program to dynamically creates an XML file when a transaction takes place. Then feeds it to the LS. One file for each item with 6 fields.
I have about 30 items in all.
-
August 18th, 2008, 01:00 PM
#2
Amarin,
The best approach would be to have an asynchronous data feed (based on some message-oriented middleware), which does not require polling. Both a DB and an XML data source are usually based on polling. That said, choosing between a DB and an XML file depends on many aspects, such as the polling frequency, the amount of data being polled, general architecture considerations, including transactions and fail-over. So it's impossible to provide a general answer.
-
August 20th, 2008, 01:16 AM
#3
Thanks for your reply Alessandro
What would the setup look like with MOM?
Do I use it alongside lightstreamer?
Would this be ok
http://www.jboss.com/products/platforms/dataservices
or
http://www.jboss.org/projects/
Do you recommend anything else?
Thanks again
-
August 21st, 2008, 10:44 AM
#4
Sure, any JMS implementation would be a perfect solution.
By the way, you can find a JBoss-based example in the "Lightstreamer\DOCS-SDKs\sdk_adapter_java\examples\StockListDemo_JMS_D ataAdapter" folder of your Lightstreamer distribution.
-
October 2nd, 2008, 01:33 PM
#5
Database Sample Code
Hi there,
I have to make a decision as to whether we can use Lightstreamer for a new project. Is there prospect of sample code for database integration being provided to developers in the near future.
Regards
Gerard
-
October 3rd, 2008, 12:27 PM
#6
I modified the HelloWorldDataAdapter to poll a database, instead of generating the data internally.
Please consider this is just a five-minute effort and I've not tried to compile the code. Please let me know if you find any errors.
This Data Adapter uses JDBC to query an Access file ("C:/Data.mdb"). Every second, it reads the first record, extracts the "message" and "timestamp" fields and injects them into the Lightstreamer Kernel.
-
October 9th, 2008, 02:00 PM
#7
Dear Alessandro, thank you for the code. I have two questions. I don't see in the code why it just reads the "first record" - isn't it looping over the entire record set and sending them all. Secondly, if the value of a field hasn't changed since the last time it was sent to Lightstreamer, does this field value still get sent to the client.
Many thanks
Gerard
Similar Threads
-
By icaiozzi in forum Adapter SDKs
Replies: 1
Last Post: November 19th, 2010, 11:52 AM
-
By devidasan in forum Adapter SDKs
Replies: 1
Last Post: March 17th, 2009, 11:00 AM
-
By markgoldin in forum Adapter SDKs
Replies: 21
Last Post: August 28th, 2008, 07:39 PM
-
By Sinead in forum Adapter SDKs
Replies: 4
Last Post: February 14th, 2007, 03:47 PM
-
By Excalibur in forum Adapter SDKs
Replies: 4
Last Post: October 3rd, 2006, 09:38 AM
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 04:48 PM.
Bookmarks