Results 1 to 10 of 11

Hybrid View

  1. #1
    Member
    Join Date
    Apr 2007
    Location
    Stoke-on-Trent
    Posts
    18
    Quote Originally Posted by DarioCrivelli
    Good. As your questions were expressed in general terms, we assume that you also don't need a general answer anymore.
    Dario
    Correct. I still don't get the event being fired that I described originally, though.

    Also, my web client subscribes to the table asking for a snapshot but it only gets a snapshot delivered to it if some other client is already connected. What I mean is, I start up my remote server, add a few items to the table, then start my web client and it gets nothing delivered to it. However, if I do what I just described but have a .NET client subscribed to the table while the items are being added and THEN connect the web client then I get all the items delivered to it in a snapshot as I expect. Is this behaviour by design or do we have something not quite right in our remote server application?

  2. #2
    Administrator
    Join Date
    Jul 2006
    Location
    Milan
    Posts
    1,091
    Quote Originally Posted by TonyRoberts
    I still don't get the event being fired that I described originally, though.
    As a first step, may you please check that you are not referring to a later jsdoc?
    Note that "onStart" was introduced in Web Client Library quite recently (version 4.1 build 1261).

    About the snapshot, note that, indeed, any update event for an item (let's call it ITEM) sent by the Data Adapter before ITEM is ever subscribed to (i.e. before the first client subscribes to ITEM) is ignored.

    All updates for ITEM coming from the feed before the subscription should be kept by the Data Adapter; then, upon the subscription, they can be sent by the Data Adapter to the Server as the item snapshot.
    Alternatively, the Data Adapter should, in turn, ask its feed for updates for ITEM only upon the subscription; at that moment, it could also ask the feed for the current item state and send it as the snapshot.
    In both cases, the Server forwards this snapshot to the first client; then it takes care of managing the snapshot for the subsequent clients.

    This requirement may complicate the Data Adapter somewhat. However, your tests already include a workaround for this. If you can subscribe to ITEM from a dummy client when the item state is still empty, then your Data Adapter can always send an empty snapshot and just forward the updates to the Server, which will produce suitable snapshots for ITEM for the real clients.

    Dario

  3. #3
    Member
    Join Date
    Apr 2007
    Location
    Stoke-on-Trent
    Posts
    18
    Quote Originally Posted by DarioCrivelli
    As a first step, may you please check that you are not referring to a later jsdoc?
    Note that "onStart" was introduced in Web Client Library quite recently (version 4.1 build 1261).
    I'll check, but as far as I am aware I'm using the jsdoc for the actual version I'm using

    Quote Originally Posted by DarioCrivelli
    About the snapshot, note that, indeed, any update event for an item (let's call it ITEM) sent by the Data Adapter before ITEM is ever subscribed to (i.e. before the first client subscribes to ITEM) is ignored.
    Right, I'd worked out that this is what's going on. Good to have it confirmed though.


    Quote Originally Posted by DarioCrivelli
    If you can subscribe to ITEM from a dummy client when the item state is still empty, then your Data Adapter can always send an empty snapshot and just forward the updates to the Server, which will produce suitable snapshots for ITEM for the real clients.
    Dario
    Yes, this does do exactly that.

  4. #4
    Member
    Join Date
    Apr 2007
    Location
    Stoke-on-Trent
    Posts
    18
    Quote Originally Posted by DarioCrivelli
    As a first step, may you please check that you are not referring to a later jsdoc?
    Note that "onStart" was introduced in Web Client Library quite recently (version 4.1 build 1261).
    Dario
    The version.txt in my sdk_client_web folder says:

    Lightstreamer Web Client Library version 4.1 build 1275

    So I assume this means I have a version which should fire these events, then?

  5. #5
    Administrator
    Join Date
    Jul 2006
    Location
    Milan
    Posts
    1,091
    Yes
    and I could see "onStart" working, both with 1275 and with the current library version.
    For a further check, please ensure that the code in your lspushpage.js starts with:
    var LS_pushpageSrcRev=" 405 $"
    If you still have problems, may you please send us any code for a check?

  6. #6
    Member
    Join Date
    Apr 2007
    Location
    Stoke-on-Trent
    Posts
    18
    Quote Originally Posted by DarioCrivelli
    Yes
    For a further check, please ensure that the code in your lspushpage.js starts with:
    It does start with that.

  7. #7
    Member
    Join Date
    Apr 2007
    Location
    Stoke-on-Trent
    Posts
    18
    Quote Originally Posted by DarioCrivelli
    Yes
    and I could see "onStart" working, both with 1275 and with the current library version.
    For a further check, please ensure that the code in your lspushpage.js starts with:

    var LS_pushpageSrcRev=" 405 $";
    My lspushpage.js does start with that, but the code in that javascript source file makes no reference to onStart. I recently downloaded from your website a new Lightstreamer.zip file and the lspushpage.js in there starts with:

    var LS_pushpageSrcRev=" 481 $";

    And this sourcecode DOES contain references to an onStart property of the Table() object and will call the function associated with it. I therefore conclude that my original javascript simply doesn't support onStart. I haven't switched over to the newer version and tried it yet.

  8. #8
    Administrator
    Join Date
    Jul 2006
    Location
    Milan
    Posts
    1,091
    Now I see! The OnStart property was already included in 4.1 build 1275, but a bug in the obfuscation process prevented it from being visible
    (actually, it was renamed as LS_Qpu; before you complete the upgrade, you could use the latter name on your code and workaround the problem).

    When I tested it last month, I used the non-obfuscated version of the sources and couldn't replicate the problem.
    The bug was fixed in 4.1 build 1289, but we forgot to mention the fix in the changelog.
    We apologize for this and will fix the changelog.

    Dario

 

 

Similar Threads

  1. Replies: 5
    Last Post: December 23rd, 2010, 08:34 AM
  2. Please help to fetch data to client
    By phancongphuoc in forum Adapter SDKs
    Replies: 1
    Last Post: December 16th, 2010, 07:57 AM
  3. Client receive old data after some time.
    By mnenchev in forum General
    Replies: 3
    Last Post: November 25th, 2009, 02:27 PM
  4. data not coming to web client
    By rd2008 in forum Client SDKs
    Replies: 8
    Last Post: February 11th, 2009, 12:13 PM
  5. Replies: 2
    Last Post: May 15th, 2008, 09:25 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 03:23 PM.