Results 1 to 2 of 2
  1. #1
    Member
    Join Date
    Apr 2011
    Location
    Berlin
    Posts
    1

    Different schemes

    Hi,

    i'm using the SmartDataAdapter in cooperation with the LiteralBasedProvider to push instrument data. I have to support different scheme sets:

    e.g. ["price", "perf"] or ["bid","ask"]

    Now the problem:

    I use the DynaScrollTable to show the last 10 bids/asks. So I created a new table with the scheme ["bid","ask"] in distinct mode. But the table also receives updates with only "price" and "perf" data inside, so that there will be empty rows.

    I thought itemEvents with no matching fields to the scheme will not be sent to the client.

    Should I split the Adapter ?

    Thank you

  2. #2
    Administrator
    Join Date
    Jul 2006
    Location
    Milan
    Posts
    842
    In DISTINCT mode, each update is considered as unrelated with the previous one, so also an update entirely made up of with null field values is significant.
    The behavior you expected is that of MERGE mode. In MERGE mode, if the Data Adapter only updates "price" and "perf" and doesn't inlclude "ask" and "bid" in the update, Lightstreamer will consider the values of the latter two as unchanged (which is the correct interpretation for this data); but, upon your subscription for only "ask" and "bid", it will not send any event to the client in this case.
    If you try with MERGE mode, consider that you should also explicitly request an unlimited "BufferSize" for the item.
    However, in MERGE mode the snapshot only consists of one element, which may not be what you want.

    Introducing a dedicated item for this table, including only "bid" and "ask", to be used in DISTINCT mode, may make sense, if it is compatible with the whole application behavior.
    The Data Adapter will take care of updating it only when "bid" and "ask" have really changed.

 

 

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
  •  
Powered by vBulletin® Version 4.2.0
Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.
All times are GMT +1. The time now is 05:00 PM.