Results 1 to 6 of 6
  1. #1

    Multiple Adapter Sets on a Lightstreamer server

    Hi team, I would like to ask is LightStreamer could able to handle multiple Adapter Sets on a single server.
    We are going to do versioning for the LS so that old client which have not yet update will be served by the old AdapterSet ultil they get update, and new clients will be served in new AdapterSet. (the new client will call connect to new AdapterSet name).?

    I'm using in-process java sdk


  2. #2
    Join Date
    Feb 2012
    Hi Nghiep,

    Yes, I can confirm that multiple Adapter Sets can be plugged onto a single Lightstreamer Server.
    So your plan of migration makes totally sense.


  3. #3
    Hi Giuseppe,
    I just wanna ask deeper about this because both AdapterSets have the same classes and libs. is there any consfusion between 2 AdapterSets such as: class loader or adapter, item name which is handled by LS ?
    Also I have a worry about the server might be over load if we have many AdapterSets so how man is the good threshold.

    Last edited by subaoye; January 4th, 2023 at 09:48 AM.

  4. #4
    Join Date
    Feb 2012
    Hi Nghiep,

    About the ClassLoader, the isolation level of Adapter Sets can be configured in the adapters.xml file. Please refer to the classloader parameter of the provided template of adapters.xml for a complete description:

    HTML Code:
     Optional. Determines the ClassLoader to be used to load the Adapter
                 related classes. Possible values are:
                 - "common": The common ClassLoader assigned to the whole Adapter Set
                   is used; this ClassLoader already includes all the classes found
                   in the common "lib" and "classes" folders; it also inherits from
                   a global ClassLoader that includes all the classes found under the
                   "shared/lib" and "shared/classes" folders. If a specific <install_dir>
                   is assigned to the Adapter, classes found in its "lib" and "classes"
                   subfolders are added to the Adapter Set ClassLoader.
                 - "dedicated": A dedicated ClassLoader, which still inherits from the
                   Adapter Set ClassLoader, is used. In this case, it is mandatory
                   that a specific <install_dir> is assigned to the Adapter; hence,
                   classes found in its "lib" and "classes" subfolders are added to
                   the dedicated ClassLoader.
                 - "log-enabled": A dedicated ClassLoader which also includes the
                   slf4j library used by the Server is used; hence the Adapter shares
                   the log configuration with the Server. However, in this case, the
                   Adapter ClassLoader does not inherit from the Adapter Set
                   ClassLoader, hence no sharing of classes with other Adapters is
                   possible. If no specific <install_dir> is assigned to the Adapter,
                   then the dedicated ClassLoader will be added all classes found in
                   the common "lib" and "classes" folders.
                 The determined ClassLoader is also set as the "context ClassLoader"
                 in all Adapter method invocations.
                 If not defined, the default value is "common" (i.e. the common
                 Adapter Set ClassLoader is used). 
    'log-enabled' should work in your case, but please consider the various options yourself and make specific tests.

    About Item names, since each client session must specify, and therefore is tied to, a single Adapter Set, there is no possibility of confusion to which Data Adapter is involved for each subscription.

    About performance point of view, generally the load of a Lightstreamer server instance is mostly determined by these factors:

    - the number of concurrent client session active at the same time
    - the number of requests arriving per second from client sessions
    - the total outbound throughput of the server

    All these factors are independent of the number of Adapter Sets involved; if your server has to support the load of 1000 client sessions whether they are all connected to the same Adapter Set or spread over 10 different ones it doesn't make much difference.


  5. #5
    Hi Giuseppe,
    I would like to consult that is there any way that we could send messagea between 2 adapter sets in a same server or is there othe work around to
    achieve this?

  6. #6
    Join Date
    Jul 2006
    Since the Adapter Sets are isolated from each other because they are in different classloaders, they can communicate with the same techniques two different processes could use to communicate.
    But if you want them to see each other at Java level, you can leverage the "shared" folder. There you can put classes that will be inherited by the classloaders of both Adapter Sets.
    So, for instance, the code in two Adapters belonging to different Adapter Sets can exchange messages by accessing a singleton of a class supplied in the Shared folder and use it as a bridge.
    This feature is available if the Adapters in the two Adapter Sets configure the <classloader> property (see the previous post by Giuseppe) as "common" or "dedicated".
    BTW, Giuseppe suggested the "log_enabled" setting instead. For this new purpose, you cannot leverage this option, but this just means that your Adapters will have to include their own log infrastructure (or lean on the JDK).



Similar Threads

  1. Replies: 25
    Last Post: December 19th, 2017, 09:08 AM
  2. Replies: 1
    Last Post: October 3rd, 2017, 09:14 AM
  3. Replies: 1
    Last Post: April 23rd, 2013, 09:27 AM
  4. Replies: 1
    Last Post: April 10th, 2013, 09:09 AM
  5. Multiple Metadata adapter usage
    By stephenlam in forum Client SDKs
    Replies: 5
    Last Post: April 22nd, 2010, 09:19 AM


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