Results 1 to 4 of 4
  1. #1
    Member
    Join Date
    Oct 2008
    Location
    Houston
    Posts
    3

    ok, I am really confused

    I have a remote data adapter that is sending messages like this:

    0|UD3|S|QRBZ8QRBF9|S|10000011d63d5f31f|B|0|S|name| S|QRBZ8QRBF9|S|last|S|-0.0375000014901161
    0|UD3|S|@EDH0|S|10000011d63d5f31f|B|0|S|name|S|@ED H0|S|last|S|97.0849990844727
    0|UD3|S|QRBZ8|S|10000011d63d5f31f|B|0|S|name|S|QRB Z8|S|last|S|1.36479997634888
    0|UD3|S|QCLZ8|S|10000011d63d5f31f|B|0|S|name|S|QCL Z8|S|last|S|63.9700012207031
    0|UD3|S|@JYZ8|S|10000011d63d5f31f|B|0|S|name|S|@JY Z8|S|last|S|1.01040005683899
    0|UD3|S|QCLZ8|S|10000011d63d5f31f|B|0|S|name|S|QCL Z8|S|last|S|63.9700012207031
    0|UD3|S|@NQZ8|S|10000011d63d5f31f|B|0|S|name|S|@NQ Z8|S|last|S|1334.25
    0|UD3|S|QCLZ8QCLF9|S|10000011d63d5f31f|B|0|S|name| S|QCLZ8QCLF9|S|last|S|-0.660000026226044
    0|UD3|S|QNGJ9QNGK9|S|10000011d63d5f31f|B|0|S|name| S|QNGJ9QNGK9|S|last|S|-0.0570000000298023
    0|UD3|S|@BPZ8|S|10000011d63d5f31f|B|0|S|name|S|@BP Z8|S|last|S|1.57469999790192
    0|UD3|S|@BPZ8|S|10000011d63d5f31f|B|0|S|name|S|@BP Z8|S|last|S|1.57469999790192
    0|UD3|S|QNGJ9QNGK9|S|10000011d63d5f31f|B|0|S|name| S|QNGJ9QNGK9|S|last|S|-0.0570000000298023
    0|UD3|S|@QMZ8|S|10000011d63d5f31f|B|0|S|name|S|@QM Z8|S|last|S|63.9500007629395
    0|UD3|S|QCLZ8QCLF9|S|10000011d63d5f31f|B|0|S|name| S|QCLZ8QCLF9|S|last|S|-0.660000026226044
    0|UD3|S|QCLZ8|S|10000011d63d5f31f|B|0|S|name|S|QCL Z8|S|last|S|63.9700012207031
    0|UD3|S|QNGZ8|S|10000011d63d5f31f|B|0|S|name|S|QNG Z8|S|last|S|6.83699989318848
    0|UD3|S|QCLZ8QCLZ9|S|10000011d63d5f31f|B|0|S|name| S|QCLZ8QCLZ9|S|last|S|-8.05000019073486
    0|UD3|S|QCLZ9QCLZ0|S|10000011d63d5f31f|B|0|S|name| S|QCLZ9QCLZ0|S|last|S|-6.26999998092651
    0|UD3|S|QNGZ8QNGF9|S|10000011d63d5f31f|B|0|S|name| S|QNGZ8QNGF9|S|last|S|-0.246999993920326
    0|UD3|S|@BPZ8|S|10000011d63d5f31f|B|0|S|name|S|@BP Z8|S|last|S|1.57459998130798
    0|UD3|S|QNGZ8|S|10000011d63d5f31f|B|0|S|name|S|QNG Z8|S|last|S|6.83500003814697
    0|UD3|S|QNGF9|S|10000011d63d5f31f|B|0|S|name|S|QNG F9|S|last|S|7.08400011062622
    0|UD3|S|@FFZ8@FFG9|S|10000011d63d5f31f|B|0|S|name| S|@FFZ8@FFG9|S|last|S|0.144999995827675
    0|UD3|S|QNGZ8|S|10000011d63d5f31f|B|0|S|name|S|QNG Z8|S|last|S|6.83699989318848
    0|UD3|S|@ESZ8|S|10000011d63d5f31f|B|0|S|name|S|@ES Z8|S|last|S|961.75
    0|UD3|S|@EUZ8|S|10000011d63d5f31f|B|0|S|name|S|@EU Z8|S|last|S|1.25849997997284
    0|UD3|S|QCLZ8QCLF9|S|10000011d63d5f31f|B|0|S|name| S|QCLZ8QCLF9|S|last|S|-0.660000026226044


    I assumed that I could then update a quote table with something like this:

    <div source="lightstreamer" table="quotes" item="QCLZ8" field="name">loading...</div>
    <div source="lightstreamer" table="quotes" item="QCLZ8" field="last">loading...</div>
    <div source="lightstreamer" table="quotes" item="QNGZ8" field="name">loading...</div>
    <div source="lightstreamer" table="quotes" item="QNGZ8" field="last">loading...</div>

    <script>
    var page = new PushPage();
    page.onEngineCreation = function(engine) {
    engine.connection.setAdapterName("CACT");
    engine.changeStatus("STREAMING");
    }
    page.bind();
    page.createEngine("CACTApp", "ls", "SHARE_SESSION", true);

    var pushtable = new OverwriteTable(null, null, "MERGE");
    pushtable.setSnapshotRequired(true);
    page.addTable(pushtable, "quotes");
    </script>


    what I end up with is, the first two fields map correctly but update on every single symbol that comes across the wire.

  2. #2
    Administrator
    Join Date
    Jul 2006
    Location
    Milan
    Posts
    833
    Your client subscribes to 2 items, named QCLZ8 and QNGZ8.
    Assuming that your Metadata Adapter is a LiteralBasedProvider, your Data Adapter should receive two subscription calls, related to the above two names.

    This means that the update flow produced by the Remote Data Adapter should exhibit two kinds of lines, that could be distinguished by:
    - the item name (4th field) being either QCLZ8 or QNGZ8;
    - the subscription ID (6th field) being either 10000011d63d5f31f (when the item name is QCLZ8) or some other value previously received (when the item name is QNGZ8).

    Hence the reported flow is not correct. All the updates listed pertain to QCLZ8 and all updates where the item name is not QCLZ8 are spurious. Yet, the Proxy Adapter does not check for the consistency of the supplied item name and assigns all the updates to QCLZ8, which explains the observer behaviour.

  3. #3
    Member
    Join Date
    Oct 2008
    Location
    Houston
    Posts
    3
    I want to push the entire datafeed into lightstreamer and have it manage subscriptions.
    Is this possible?

  4. #4
    Administrator
    Join Date
    Jul 2006
    Location
    Milan
    Posts
    833
    No, Lightstreamer Server only manages the items currently requested by some client.
    This means that it demands to the Data Adapter the job of filtering the feed flow. The Server issues "subscribe" requests to the Data Adapter and expects to receive only the updates for those items.
    If you use a Remote Data Adapter, the "subscribe" requests are forwarded to the Remote Data Adapter, which should do the filtering job.

    By the way, note that, with an in-process java Data Adapter,
    if you "tricked" the interface specifications, by sending updates for all items (then ignoring the warning messages issued by the Server)
    then it would work.
    However, this is not possible with a Remote Data Adapter, where a Request ID has always to be specified with each update.

 

 

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:36 AM.