Results 1 to 10 of 30

Hybrid View

  1. #1
    Member
    Join Date
    Feb 2009
    Location
    KL
    Posts
    29
    Hi DarioCrivelli, thanks for your kind reply.
    Have you extended your Data Adapter accordingly?
    I've refer to the sample demo adapter and the documentation but not understand

    I found a tutorial on NonvisualTable with Command mode from Alessandro, it works quite well for me. Grouping and filtering can be apply since the display can be customize (I have simply tested and works well, should be OK, have to further testing though).

    I discovered a thing during testing, where the snapshot will be clear after the web client been idled sometimes (without doing anything, refresh etc.). Do you have any idea on this? Please correct me if I'm wrong. Thanks.

  2. #2
    Administrator
    Join Date
    Jul 2006
    Location
    Milan
    Posts
    1,091
    So, you have managed to get the desired behavior by resorting to a NonVisualTable, with client side filtering.
    Ok. I hope that the data that gets filtered out is not too much, because this could pose scalability issues.

    As far as I understand your new problem, we have never observed anything similar (but for the case that the Server is shut down).
    Can you please provide us with a more detailed description of what happens?
    What do you mean by "snapshot"? This word has a special meaning in Lightstreamer and I'm not sure if you mean a Lightstreamer snapshot or something else.

  3. #3
    Member
    Join Date
    Feb 2009
    Location
    KL
    Posts
    29
    Can you please provide us with a more detailed description of what happens?
    What do you mean by "snapshot"?
    Sorry for the unclear question, just ignore the "snapshot" thingy. What I mean here is once I refresh the page after some period, all the data that suppose to be displayed is all gone.

    What I did is after the page has displayed all the pushed data, I just leave it there and after sometimes I refresh the page again (shortest time was around 3+ mins), it appeared to be blank. It shows nothing and the data that I pushed previously didn't show on the page.

  4. #4
    Administrator
    Join Date
    Jul 2006
    Location
    Milan
    Posts
    1,091
    If I understand well
    1. you run your page
    2. the page loads and it is filled with pushed data
    3. you come back after more than 3 minutes
    4. the page is still full of pushed values
    5. you hit the browser refresh button
    6. the page reloads, but it is not filled with pushed data

    Note that the page uses a NonVisualTable, hence everything concerning the page appearance is managed by custom code.
    Can you monitor the invocations to "onItemUpdate" on your NonVisualTable and see if there are invocations after the page refresh?

  5. #5
    Member
    Join Date
    Feb 2009
    Location
    KL
    Posts
    29
    Hi DarioCrivelli, thanks for your reply. Sorry for the wrong information, is 30+ mins but not 3+ mins.

    Can you monitor the invocations to "onItemUpdate" on your NonVisualTable and see if there are invocations after the page refresh?
    Yes, they are invocations to "onItemUpdate" after the page refresh. It is invocation every time each row is re-display. Following is the information from the server after refresh the page.

    Code:
    Date: Fri, 26 Jun 2009 10:15:39 GMT
    Server: Lightstreamer/3.5 build 1428.4 (Lightstreamer Push Server - www.lightstr
    eamer.com) Moderato edition
    Content-Type: text/plain; charset=iso-8859-1
    Cache-Control: no-store
    Cache-Control: no-cache
    Pragma: no-cache
    Expires: Thu, 1 Jan 1970 00:00:00 GMT
    Content-Length: 2476
    Connection: Keep-Alive
    
    /*
    var LS_window = parent;
    if (window.LS_e || window.e) {
     LS_window = window;
    }
    if (LS_window.LS_e) {
    } else {
     LS_window.LS_w = LS_window.w;
     LS_window.LS_l = LS_window.l;
     LS_window.LS_e = LS_window.e;
     LS_window.LS_s = LS_window.s;
     LS_window.LS_u = LS_window.u;
     LS_window.LS_v = LS_window.v;
     LS_window.LS_n = LS_window.onEos;
     LS_window.LS_o = LS_window.o;
     LS_window.LS_forceReload = LS_window.forceReload;
    }
    if (LS_window.LS_t) {
    LS_window.LS_t("Lightstreamer");
    }
    var phase = null;
    function setPhase(ph) {
     phase = ph;
    }
    
    var winPhase = {};
    function setWin(tbl, ph) {
     winPhase[tbl] = ph;
    }
    
    var clsd = false;
    function c(cod, ph, tbl) {
     LS_window.LS_w(cod, ph, tbl);
    }
    
    function error(cod, ph, tbl, msg) {
     if (tbl != null) {
      LS_window.LS_l(cod, ph, tbl, msg);
     } else {
      LS_window.LS_l(cod, phase, null, msg);
     }
    }
    
    function start(sID, addr, kaMs, reqLim, srv) {
     LS_window.LS_e(1, phase, sID, addr, kaMs, reqLim, srv);
    }
    
    function end() {
     LS_window.LS_e(4, phase);
    }
    
    function loop(holdMs) {
     LS_window.LS_e(2, phase, holdMs);
    }
    
    function retry() {
     LS_window.LS_e(3, phase);
    }
    
    function s0(lastTopFreq, lastSlowFact, maxBW) {
     LS_window.LS_s(phase, -1, lastTopFreq, lastSlowFact, maxBW);
    }
    function y(secs) {
     LS_window.LS_s(phase, secs);
    }
    
    var unchangedSignal = {};
    unchangedSignal.length = -1;
    function convert(arr, first) {
     var i;
     for (i = first; i < arr.length; i++) {
      if (arr[i] == null || arr[i] == '') arr[i] = unchangedSignal;
      else if (arr[i] == '$') arr[i] = '';
      else if (arr[i] == '#') arr[i] = null;
      else if (arr[i].charAt) {
       var f = arr[i].charAt(0);
       if (f == '$' || f == '#') arr[i] = arr[i].substring(1);
      }
     }
     return arr;
    }
    function d(tbl) {
      LS_window.LS_u(winPhase[tbl], convert(d.arguments, 2));
    }
    function z(tbl) {
     LS_window.LS_v(winPhase[tbl], convert(z.arguments, 2));
    }
    function n(tbl) {
     LS_window.LS_n(winPhase[tbl], n.arguments);
    }
    function r(tbl) {
     LS_window.LS_o(winPhase[tbl], r.arguments);
    }
    function p() {
     LS_window.LS_u(phase, p.arguments);
    }
    window.setPhase = setPhase;
    window.setWin = setWin;
    window.c = c;
    window.error = error;
    window.end = end;
    window.start = start;
    window.loop = loop;
    window.retry = retry;
    window.s0 = s0;
    window.y = y;
    window.convert = convert;
    window.d = d;
    window.z = z;
    window.n = n;
    window.r = r;
    window.p = p;
    window.LS_window = LS_window;
    setPhase(1302);start('S784c69a2a845ebefT1539696', null, 30000, 50000, 'Lightstre
    amer HTTP Server');s0(0.0,1.0,-1.0);loop(0);end();
    
    */
    26.Jun.09 18:15:39,743 < INFO> Serving request: /lightstreamer/control.html?LS_s
    ession=S784c69a2a845ebefT1539696&LS_window=1&LS_win_phase=4&LS_op=add&LS_req_pha
    se=8&LS_mode1=COMMAND&LS_id1=NewUser&LS_schema1=key%20command%20sfeCH%20datetime
    %20score%20teamaCH%20teambCH%20hhandicap%20ahandicap%20home%20away%20overunder%2
    0over%20under%20bgcolor%20ridHH%20ridHA%20ridOO%20ridOU%20fontcolor%20type%20gro
    upid&LS_snapshot1=true&LS_requested_max_frequency1=0.5&LS_unique=1 from 192.168.
    1.21:3364
    26.Jun.09 18:15:39,743 < INFO> Controlling session: S784c69a2a845ebefT1539696 fr
    om 192.168.1.21:3364
    26.Jun.09 18:15:39,774 < INFO> Serving request: /lightstreamer/STREAMING_IN_PROG
    RESS?LS_session=S784c69a2a845ebefT1539696&LS_phase=1303& from 192.168.1.21:3374
    26.Jun.09 18:15:39,774 < INFO> Attaching session: S784c69a2a845ebefT1539696 from
     192.168.1.21:3374
    26.Jun.09 18:15:39,774 <TRACE> RELEASING DATA --> HTTP/1.0 200 OK
    Date: Fri, 26 Jun 2009 10:15:39 GMT
    Server: Lightstreamer/3.5 build 1428.4 (Lightstreamer Push Server - www.lightstr
    eamer.com) Moderato edition
    Content-Type: text/html; charset=iso-8859-1
    Cache-Control: no-store
    Cache-Control: no-cache
    Pragma: no-cache
    Expires: Thu, 1 Jan 1970 00:00:00 GMT
    Content-Length: 300000
    Connection: close
    
    <!--
      -- LIGHTSTREAMER
      --    Live Web Content Delivery
      --
      -- www.lightstreamer.com - info@lightstreamer.com
      --
      -- Copyright (c) 2004-2008 Weswit s.r.l. All Rights Reserved.
      -->
    
    <html>
    
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <meta http-equiv="Cache-Control" content="no-store">
    <meta http-equiv="Cache-Control" content="no-cache">
    <meta http-equiv="Pragma" content="no-cache">
    <meta http-equiv="Expires" content="Thu, 1 Jan 1970 00:00:00 GMT">
    <title>Lightstreamer is pushing...</title>
    
    <script>
    var LS_window = parent;
    if (window.LS_e || window.e) {
     LS_window = window;
    }
    if (LS_window.LS_e) {
    } else {
     LS_window.LS_w = LS_window.w;
     LS_window.LS_l = LS_window.l;
     LS_window.LS_e = LS_window.e;
     LS_window.LS_s = LS_window.s;
     LS_window.LS_u = LS_window.u;
     LS_window.LS_v = LS_window.v;
     LS_window.LS_n = LS_window.onEos;
     LS_window.LS_o = LS_window.o;
     LS_window.LS_forceReload = LS_window.forceReload;
    }
    if (LS_window.LS_t) {
    LS_window.LS_t("Lightstreamer");
    }
    var phase = null;
    function setPhase(ph) {
     phase = ph;
    }
    
    var winPhase = {};
    function setWin(tbl, ph) {
     winPhase[tbl] = ph;
    }
    
    var clsd = false;
    function c(cod, ph, tbl) {
     LS_window.LS_w(cod, ph, tbl);
    }
    
    function error(cod, ph, tbl, msg) {
     if (tbl != null) {
      LS_window.LS_l(cod, ph, tbl, msg);
     } else {
      LS_window.LS_l(cod, phase, null, msg);
     }
    }
    
    function start(sID, addr, kaMs, reqLim, srv) {
     LS_window.LS_e(1, phase, sID, addr, kaMs, reqLim, srv);
    }
    
    function end() {
     LS_window.LS_e(4, phase);
    }
    
    function loop(holdMs) {
     LS_window.LS_e(2, phase, holdMs);
    }
    
    function retry() {
     LS_window.LS_e(3, phase);
    }
    
    function s0(lastTopFreq, lastSlowFact, maxBW) {
     LS_window.LS_s(phase, -1, lastTopFreq, lastSlowFact, maxBW);
    }
    function y(secs) {
     LS_window.LS_s(phase, secs);
    }
    
    var unchangedSignal = {};
    unchangedSignal.length = -1;
    function convert(arr, first) {
     var i;
     for (i = first; i < arr.length; i++) {
      if (arr[i] == null || arr[i] == '') arr[i] = unchangedSignal;
      else if (arr[i] == '$') arr[i] = '';
      else if (arr[i] == '#') arr[i] = null;
      else if (arr[i].charAt) {
       var f = arr[i].charAt(0);
       if (f == '$' || f == '#') arr[i] = arr[i].substring(1);
      }
     }
     return arr;
    }
    function d(tbl) {
     try { LS_window.LS_u(winPhase[tbl], convert(d.arguments, 2)); } catch(exc) {}
    }
    function z(tbl) {
     LS_window.LS_v(winPhase[tbl], convert(z.arguments, 2));
    }
    function n(tbl) {
     LS_window.LS_n(winPhase[tbl], n.arguments);
    }
    function r(tbl) {
     LS_window.LS_o(winPhase[tbl], r.arguments);
    }
    function p() {
     LS_window.LS_u(phase, p.arguments);
    }
    
    </script>
    </head>
    
    <body onload="if (! clsd) { retry(); }">
    <script>setPhase(1303);</script><script>start('S784c69a2a845ebefT1539696', null,
     2000, 50000);</script><script>s0(0.0,1.0,-1.0);</script>
    26.Jun.09 18:15:39,774 <TRACE> RELEASING DATA --> <script>c(6,4,1);setWin(1,4);s
    etWin(1,4);z(1,1,1,"301813","ADD","\u6FB3A\u8054","27-05-09\u003Cbr />08:00","2
    : 1","\u963F\u5FB7\u83B1\u5FB7\u8054 [\u4E3B]","\u7EBD\u897F\u5170\u9A91\u58EB",
    "5","&nbsp;","2.110","1.770","5.5","2.160","1.700","##1BA578","8739","8740","874
    1","8742","##FFFFFF","21","427");z(1,1,1,"302371","","ABC","16-06-09\u003Cbr />0
    8:00","0 : 0","\u65E5\u672C [\u4E3B]","\u963F\u8054\u914B","&nbsp;","2.5/3","2.0
    20","1.860","3/3.5","1.930","1.930","##D5DBEE","11511","11512","11513","11514","
    ##000000","22","598");z(1,1,1,"302784","","\u6CD5\u4E59","26-06-09\u003Cbr />08:
    00","","\u7231\u7C73\u6069\u65AF [\u4E3B]","\u8499\u5F7C\u5229\u57C3","0.5","&nb
    sp;","1.710","2.170","1.5","1.810","2.050","##924949","13523","13524","13525","1
    3526","##FFFFFF","52","447");z(1,1,1,"302782","","ABC","","1 : 1","KPV \u79D1\u9
    AD8\u62C9 [\u4E3B]","AC \u5965\u5362","&nbsp;","2/2.5","1.840","2.040","2/2.5","
    2.190","1.670","##FFFFFF","13519","13520","13521","13522","","42","702");z(1,1,1
    ,"301815","","","27-05-09\u003Cbr />08:00","2 : 2","\u5370\u5C3C [\u4E3B]","\u6F
    B3\u6D32","","4/4.5","2.260","1.620","4.5/5","2.140","1.720","##D5DBEE","8743","
    8744","8745","8746","##000000","22","598");n(1,1,1);</script>

  6. #6
    Administrator
    Join Date
    Jul 2006
    Location
    Milan
    Posts
    1,091
    The Server log shows that the Server sends 5 update events, that are supposed to add 5 rows in your browser table.
    If you can see 5 invocations to "onItemUpdate" on your NonVisualTable, then Lightstreamer has completed its job successfully.
    If your page does not display the received data, your implementation of "onItemUpdate" must be mistaken.

  7. #7
    Member
    Join Date
    Feb 2009
    Location
    KL
    Posts
    29
    Hi DarioCrivelli, thanks again for your reply. I think it should be like what you were mentioned, there might be some mistaken on the onItemUpdate handler. I've tested these day, and the web client has been idled for few hours and refresh again, it was able to display the events.

    From what I understand, the LightStreamer server keeps every single data (or maybe snapshot) if the web client subscribes as COMMAND mode but not "DELETE" command. Is there is any settings that can make the server clear the data it self after certain time (eg: 5mins/30mins etc.)?

    Please correct me if I am wrong. Thanks.

 

 

Similar Threads

  1. How to deploy on an external Web Server?
    By AndyKelly in forum Client SDKs
    Replies: 1
    Last Post: July 7th, 2010, 10:50 AM
  2. How to deploy on an external Web Server?
    By AndyKelly in forum Adapter SDKs
    Replies: 0
    Last Post: July 6th, 2010, 10:34 AM
  3. Interaction demo source code
    By sarbao in forum General
    Replies: 1
    Last Post: April 16th, 2009, 08:59 AM
  4. Replies: 4
    Last Post: March 19th, 2008, 10:10 AM
  5. Replies: 1
    Last Post: November 5th, 2007, 01:36 PM

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 12:07 PM.