Page 1 of 2 12 LastLast
Results 1 to 10 of 15
  1. #1
    Member
    Join Date
    Apr 2011
    Location
    Bedminster
    Posts
    17

    How to connect multiple LS servers from a single LS web client?

    Is it possible for a LS web client to connect to multiple LS servers for different data resources? Is there any sample code I can reference to? Thanks

  2. #2
    Power Member
    Join Date
    Jul 2006
    Location
    Cesano Maderno, Italy
    Posts
    784
    Hi,
    currently it is not supported, but that's something that will be released with the next version of html client: I'm working on it.

    As per now your only chance is to isolate two applications in two different iframes and connect each one to a different server

  3. #3
    Member
    Join Date
    Apr 2011
    Location
    Bedminster
    Posts
    17
    Can you provide any sample code? Thanks

  4. #4
    Power Member
    Join Date
    Jul 2006
    Location
    Cesano Maderno, Italy
    Posts
    784
    I mean something as simple as this:



    where you have two separate pages, each one connecting to a different server: in my case the first one connects to push50.lightstreamer.com while the second one connects to push51.lightstreamer.com (in this case it's actually the same server, but the browser doesn't know that)

    HTH

  5. #5
    Member
    Join Date
    Apr 2011
    Location
    Bedminster
    Posts
    17
    Does the latest version of LS web client support multiple connections to difference LS servers for different data resources?

  6. #6
    Power Member
    Join Date
    Jul 2006
    Location
    Cesano Maderno, Italy
    Posts
    784
    Sorry for not following up on this, anyway the answer is yes, you can now create as many LightstreamerClient instances as needed and connect them to different servers

  7. #7
    Member
    Join Date
    Apr 2011
    Location
    Bedminster
    Posts
    17
    Is it backward compatible with LS 4.0 server?

  8. #8
    Power Member
    Join Date
    Jul 2006
    Location
    Cesano Maderno, Italy
    Posts
    784
    Newer Lightstreamer servers support older clients while older servers usually do not support newer clients; In this case you can't use the new JS client with the old server.
    Anyway please note that upgrading from server 4 to server 5 is not a long process; Check the readme and the changelog compatibility notes for details.

  9. #9
    Hi, how would this look like using this example - https://github.com/Lightstreamer/Lig...r/src/index.js, assuming we need the same client session to connect to two server hosts for the same subscription at the same time. Is it possible to have an example?
    I was reading the documentation, but couldn't find a clear solution. Thanks in advance!

  10. #10
    Administrator
    Join Date
    Feb 2012
    Location
    Milano
    Posts
    716
    Each Lightstreamer client session is reserved for a "host/Adapter Set" pair.
    So if you need to connect your client application to two different hosts you need also two different client sessions, ie. instantiate two LightstreamerClient objects and connect them to the different hosts.

    Regards,
    Giuseppe

 

 

Similar Threads

  1. How to use multiple adapters in one web client
    By sjohn in forum Client SDKs
    Replies: 11
    Last Post: January 23rd, 2015, 12:22 PM
  2. Single data provider and multiple data sources
    By pluczak in forum Adapter SDKs
    Replies: 1
    Last Post: April 26th, 2012, 11:50 AM
  3. .NET Client Multiple Subscriptions
    By wwatts in forum Client SDKs
    Replies: 4
    Last Post: February 16th, 2010, 09:58 AM
  4. Deploying Demos in different servers
    By sarbao in forum Adapter SDKs
    Replies: 1
    Last Post: April 20th, 2009, 10:29 AM
  5. Replies: 3
    Last Post: February 8th, 2007, 10:11 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 08:34 AM.