-
August 6th, 2007, 08:03 PM
#1
Is there performance gain in using SmartDataProvider instead of DataProvider
Hi,
Is there any noticeable performance gain if the the data adapter uses SmartDataProvider interface instead of the normal DataProvider ?
The documentation says it could be faster because the adapter uses a handle of the subscribed item instead of a string keyword.
Regards
A
-
August 13th, 2007, 01:43 PM
#2
Hi
Yes, the "smartUpdate" implementation is faster than the "update" implementation, thanks to the received handler (which can be seen as an item-related listener).
If the Data Adapter implementation is already based on item-related internal listeners, the Data Adapter can easily implement the handler support.
If, on the other hand, implementing the handler support would mean complicating the Data Adapter code and adding new Map lookups, then the overall performances might be unchanged.
We can't really say that the performance impact would be "noticeable".
Consider that the "update" implementation is the only place in the Kernel where a lock on a global object is taken for every single update.
If the Data Adapter uses multiple threads to issue the various "update" calls, this may be undesirable.
Dario
-
February 11th, 2009, 02:16 AM
#3
Understanding the itemHandle in the SmartDataProvider
Hi
I’m new to Lightstreamer and have been experimenting with the Adapter Remoting Infrastructure Spec using Java over TCP Sockets.
I was hoping that someone could explain in more detail the value of the itemHandle Object in the SmartDataProvider.
I understand that this is normally provided by the Lightstreamer Kernel but in order to replicate this logic in a remote data provider server I would like to find out more about it. I modified the sample HelloworldDataAdapter to log the value of the itemHandle but I only get the memory address of some obfuscated Lightstreamer object (com.lightstreamer.i.p@61a907).
I noticed in the javadoc for the SmartDataProvider interface that Lightstreamer always supplies different handles across subsequent subscriptions of the same item, could this be as simple as using an incremented Integer?
If anyone could provide some insight into what this object is/should be it would be most appreciated.
Thanks
-
February 12th, 2009, 10:31 AM
#4
The handle distinguishes each different instance of the "subscribe" call, so that you can always associate a "smartUpdate" call you issue with the originating "subscribe" instance (hence, the item).
Supplying a specific listener object, with its own "smartUpdate" interface, instead of the handle, would have been more compliant with an object oriented interface, but we just couldn't at the moment we introduced it (actually, the handle is the pointer to the internal listener).
In ARI terms, the <ID> element of the subscription request message plays the same role as the handle, in that it has to be specified on each update message related with the subscription request.
Similar Threads
-
By pluczak in forum Adapter SDKs
Replies: 5
Last Post: April 16th, 2018, 04:26 PM
-
By rmusco in forum General
Replies: 5
Last Post: January 4th, 2013, 12:38 AM
-
By achittoda in forum Adapter SDKs
Replies: 1
Last Post: December 22nd, 2009, 09:15 AM
-
By quanhm in forum General
Replies: 1
Last Post: May 19th, 2008, 09:48 AM
-
By gavenb in forum Adapter SDKs
Replies: 1
Last Post: September 20th, 2006, 10:10 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 12:04 AM.
Bookmarks