Page 1 of 3 123 LastLast
Results 1 to 10 of 21
  1. #1
    Member
    Join Date
    May 2010
    Location
    Milano
    Posts
    14

    Porting VB adapter to Lighstreamer 6.03

    Dear all,
    i am porting an old .NET Visual Basic adapter (that worked for years and was ported from Lighstreamer 4 to 5 without problems) to Lighstreamer 6.03. The adapter was made in 2010, based on the PROXY_HELLOWORLD demo, and also the name of the adapter has been kept the same, so I have copied the new version 6 folder PROXY_HELLOWORLD in the \adapters folder. In Visual Studio, I replaced the project reference from "DonNetAdapter_N2" to the new "DotNetAdapter.dll" of 6.03.
    The project has compiled OK with Visual Studio 2015, Lightstreamer starts and waits for the adapter (waiting for a connection on port 6662/6661..) and goes on when the adapter starts (arriving to: "listening to *:8080"). In my adapter, the Init method gets called by Lighstreamer and also SetListener is called. Lighstreamer and adapter seem connected as usual.

    The problem is that, when I open the usual Index.html page that worked with the old version, data are not updated. I can see that my Subscribe function is NOT called as it should, when I open the html page.
    If I terminate the adapter, then Lightstreamer gets closed also, meaning that the connection between the two was still alive.
    Any suggestions? Thank you! Paolo

  2. #2
    Administrator
    Join Date
    Feb 2012
    Location
    Milano
    Posts
    716
    Hi Paolo,

    It is indeed a strange behavior.
    The server's log file (logs/lightstreamer.log) shows something strange? Could you see the create_session client request? It seems correct?
    Could you send the log file to us (to support@lightstreamer.com) for a check?

    Regards,
    Giuseppe

  3. #3
    Member
    Join Date
    May 2010
    Location
    Milano
    Posts
    14
    Quote Originally Posted by giuseppe.corti View Post
    Hi Paolo,

    It is indeed a strange behavior.
    The server's log file (logs/lightstreamer.log) shows something strange? Could you see the create_session client request? It seems correct?
    Could you send the log file to us (to support@lightstreamer.com) for a check?

    Regards,
    Giuseppe
    The log does not show anything strange.. I enclose it. I think that the problem is in the browser side. Lighstreamer sends the page and Internet Explorer shows it (from localhost:8080) but no data arrives. I will check if the sample page that I am using is correct, because I am working in a test environment and not in the production one.

    Thank you, Paolo
    Attached Files Attached Files

  4. #4
    Member
    Join Date
    May 2010
    Location
    Milano
    Posts
    14
    Quote Originally Posted by ANYELEC View Post
    The log does not show anything strange.. I enclose it. I think that the problem is in the browser side. Lighstreamer sends the page and Internet Explorer shows it (from localhost:8080) but no data arrives. I will check if the sample page that I am using is correct, because I am working in a test environment and not in the production one.

    Thank you, Paolo
    Addition:
    The final error you see in the log was when I stopped the adapter, I think this is normal.

  5. #5
    Administrator
    Join Date
    Feb 2012
    Location
    Milano
    Posts
    716
    Hi Paolo,

    In the log there is no evidence of the create_request request incoming from the client.
    This means, unless you changed the log level for LightstreamerLogger.requests logger, that the client attempts to open the session towards a different endpoint than localhost:8080.

    I confirm that you should check the client page code and in particular:

    Code:
    var client = new LightstreamerClient(null,"PROXY_HELLOWORLD");
    Regards,
    Giuseppe

  6. #6
    Member
    Join Date
    May 2010
    Location
    Milano
    Posts
    14
    Quote Originally Posted by giuseppe.corti View Post
    Hi Paolo,

    In the log there is no evidence of the create_request request incoming from the client.
    This means, unless you changed the log level for LightstreamerLogger.requests logger, that the client attempts to open the session towards a different endpoint than localhost:8080.

    I confirm that you should check the client page code and in particular:

    Code:
    var client = new LightstreamerClient(null,"PROXY_HELLOWORLD");
    Regards,
    Giuseppe
    Thank you Giuseppe.

    There is no such line in my index.html file (I enclose a simplified version: it was taken from the old installation).
    I think that calls have changed with the new version.
    By the way: the old version refers to "lscommons.js" and "lspushpage.js": I think they should be files in the Lighstreamer\pages folder, but they are not there.
    Maybe you have a new skeleton for the html file, but I could not find it in your site.

    Thanks for your help!

    Paolo
    Attached Files Attached Files

  7. #7
    Administrator
    Join Date
    Feb 2012
    Location
    Milano
    Posts
    716
    Hi Paolo,

    You can find the new version of the HelloWorld client example on GitHub: https://github.com/Lightstreamer/Lig...ent-javascript.
    It relies on the new JavaScript Client library that implies changes in both the JS code and in the HTML definition of the cells.
    However I expect that should not be a dramatic work to update your page.

    Alternatively, it should be sufficient restore in the /pages folder of the new server the exact structure of the old page, with all the .js and .css files linked in the code.

    Regards,
    Giuseppe

  8. #8
    Member
    Join Date
    May 2010
    Location
    Milano
    Posts
    14
    Dear Giuseppe,

    unfortunately I cannot understand why my application does not work after many trials, and I ask if you can try it for me.
    In my attachment you may find my files.
    LSadapter.exe is my adapter, that needs some files to work: please make the folder c:\LSadapter and copy LSadapter.INI in it. The executable also requires DotNetAdapter.dll and .pdb and lod4net.dll in the same folder as the executable. I do not send them because they were taken from the standard Lighstreamer installation.
    The adapters folder contains my lightstreamer\adapters folder and the pages folder contains my test page in the lightstreamer\pages folder. This is a new version of the page, made from your last demo. I already sent you the old version of the page, that worked for years but not with Lightstreamer 6.0.3

    Thank you very much for your help!!

    Paolo
    Attached Files Attached Files

  9. #9
    Member
    Join Date
    May 2010
    Location
    Milano
    Posts
    14
    I wrote lod4net.dll, obviously it is log4net.dll...

  10. #10
    Administrator
    Join Date
    Feb 2012
    Location
    Milano
    Posts
    716
    Hi Paolo,

    I confirm that I was able to run succesfuly your page with my local 6.0.3 installation.
    The only step performed, in addition to those listed in your post, is to copy the file of the JavaScript library, lightstreamer.js, in the same folder as the indexN.html (lightstreamer\pages).
    Then from my browser open: http://localhost:8080/indexN.html

    Regards,
    Giuseppe

 

 

Similar Threads

  1. Replies: 4
    Last Post: April 8th, 2015, 03:55 PM
  2. Lighstreamer connection exception [iOS]
    By DrAma in forum Client SDKs
    Replies: 8
    Last Post: December 11th, 2014, 01:23 PM
  3. Replies: 13
    Last Post: November 27th, 2012, 10:14 AM
  4. Lighstreamer stress testing
    By Andrea in forum Adapter SDKs
    Replies: 3
    Last Post: April 30th, 2012, 05:39 PM
  5. Pull data from txt file to lighstreamer (NEWBIE)
    By forexinvestor in forum Adapter SDKs
    Replies: 1
    Last Post: December 23rd, 2008, 09:55 AM

Tags for this Thread

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 11:15 AM.