Results 1 to 4 of 4
  1. #1
    Senior Member
    Join Date
    Nov 2006
    Location
    Riyadh
    Posts
    33

    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

  2. #2
    Administrator
    Join Date
    Jul 2006
    Location
    Milan
    Posts
    975
    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

  3. #3
    Member
    Join Date
    Feb 2009
    Location
    Pyrmont
    Posts
    4

    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

  4. #4
    Administrator
    Join Date
    Jul 2006
    Location
    Milan
    Posts
    975
    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

  1. shutdown method of DataProvider?
    By pluczak in forum Adapter APIs
    Replies: 5
    Last Post: April 16th, 2018, 05:26 PM
  2. Stress Test / Performance
    By rmusco in forum General
    Replies: 5
    Last Post: January 4th, 2013, 01:38 AM
  3. Performance problem
    By achittoda in forum Adapter APIs
    Replies: 1
    Last Post: December 22nd, 2009, 10:15 AM
  4. Performance test for Lightstreamer
    By quanhm in forum General
    Replies: 1
    Last Post: May 19th, 2008, 10:48 AM
  5. .NET DataProvider
    By gavenb in forum Adapter APIs
    Replies: 1
    Last Post: September 20th, 2006, 11:10 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT +1. The time now is 01:20 AM.