Results 1 to 10 of 10
  1. #1

    Converting an existing adapter and metadata adapter to remote adapter

    As the subject states, I have an existing standard adapter and metadata adapter that does a few things like;

    1. Initialise it's cache from a db
    2. listen to updates from a messaging system
    3. SSO authentication

    I want to make this a remote adapter.

    So my question is, does all this adapter functionality move to the remote adapter or does part of it stay within the proxy adapter and some move into the remote adapter?

    OR is it sufficient to just have a simple proxy adapter config with the examples show?

    Thanks all

  2. #2
    Join Date
    Jul 2006
    The remotization offered out-of-the-box by Lightstreamer's Adapter Remoting Infrastructure is very simple.
    The Proxy Adapter encodes the requests and the remote SDK library decodes them and invokes the Remote Adapter through a proper interface which is quite similar to the in-process one.
    So, all the functionalities are handled by the Remote Adapter. Just note that a few methods are too heavy to be remotized and in this case they are not available at all.
    The Proxy Adapter has its own dedicated configuration settings in adapters.xml, but they only relate to the communication aspects introduced by the remotization.
    Does this answer the questions or do you need to delve into the details?

  3. #3
    Thank you for your time and response!

    My next question is what does the LghtStreamer server side actually do when using remote adapters exclusively ?\

    I mean, If I the remote adapter (data & metadata) can handle all the functionality like I described above i.e SSO, data caching, listening to a messaging system for data updates etc.

    I would appreciate more details if you can share this.

    Thanks again!

  4. #4
    Join Date
    Jul 2006
    I suppose that you refer to the Lightstreamer-server-side of the adapters (i.e. the Proxy Adapter). Its job is to act as a RPC stub.
    In fact, the Proxy Adapter on one side and LS Remote SDK library on the other side work like a RPC layer, transferring the requests from LS Server kernel from the Proxy Adapter to the Remote Adapter (although the interface from LS Server kernel to the Proxy Adapter and the interface between LS Remote SDK library and the Remote Adapter are slightly different).
    Hence the LS Server kernel sees the Proxy Adapter as a normal Adapter, but in fact its requests are fulfilled by the Remote Adapter.

    To do this, the Proxy Adapter performs the connection with the Remote counterpart and transfers the invocations done by LS Server kernel into messages for the Remote Adapter, and transfers back the messages from the Remote Adapter to LS Server kernel.
    For this reason, the Proxy Adapter, as well as LS Remote SDK library, is provided by Lightstreamer and only requires some configuration.
    A longer explanation can be found in this document.

  5. #5
    Yes I have read this and used the example as a guide to start.

    Final question - do existing clients have to change anything to use the remote adapters?


  6. #6
    Join Date
    Feb 2012
    No, clients should not change anything when transitioning from in-process adapters to remote adapters, provided that the name of the adapter set and the data adapters remains unchanged.
    However, what you might consider adding is the management of the status item, which can be configured for each data adapter and is completely handled by the proxy adapter. It allows informing clients of any disconnections of the data adapters.

    Specifies an item name to be managed by the Proxy Adapter for
    carrying information about the availability of the Remote Data Adapter.
    This item will only supply one field, named "status", whose value
    may only be one of the following:
    - "connecting" if no connection with a remote server has taken place yet;
    - "connected" if a connection with a remote server is currently in place;
    - "reconnecting" if a connection with a remote server has been lost.
    The item will support subscriptions in MERGE or RAW mode and requests
    for the snapshot will also be supported.

    Note that the chosen name should be such that no conflicts with the
    item names supplied by the Remote Data Adapter can be possible.
    Also note that the Metadata Adapter must be aware of this item when
    performing permission checks.
    Default: no item is added for carrying status information.
    <param name="status_item">remote_adapter_status</param>


  7. #7
    Thank you!

  8. #8
    hi Everyone,

    The good news, I finally got this working!

    Now I have another question - I hope someone can assist me with...

    Say I have;

    - LightStreamer server running on host L1
    - Remote data adapter server running on host R1
    - LightStreamer client running on host C1

    Assuming these are all on the same network.

    Could I start multiple copies of R1, on the same server or other servers say R2, R3 etc?
    If so, if I start C1, and it is using R1, when I kill R1, does R2/3 etc automatically take over the role of Remote Data server?


  9. #9
    Join Date
    Jul 2006
    To avoid misunderstandings, note that a single server instance can be configured to use multiple adapters, hence there is a 1:1 relationship between Server instances and Remote Adapter instances only if the Server is configured with only 1 Proxy Adapter.
    If you run one Server instance and multiple identical Remote Adapter instances, only one adapter will connect successfully.
    Then, if the adapter fails and the Server is configured to use a "robust" Proxy Adapter, a new adapter instance will be able to connect.

    During the replacement phase, the client session is not closed, but will experience problems.
    If you refer to a Metadata Adapter, subscription requests and client messages will be refused.
    If you refer to a Data Adapter, no updates will be received.
    Moreover, the adapter replacement is not seamless, unless you ensure that the new adapter instance shares the state with the previous one. This is not handled by Lightstreamer.

    The way the new adapter can reconnect depends on the configuration of the communication between the Server (i.e. Proxy Adapter) and the Remote adapter.
    If the Remote Adapter connects to the Proxy Adapter, then multiple Remote Adapters can compete for the connection and only one will succeed at any time.
    If the Proxy Adapter connects to the Remote Adapter (since Server version 7.4), then you can place a Load Balancer in between and have all the Remote Adapters listening and only one at a time will receive the connection.

  10. #10
    Thanks for this.



Similar Threads

  1. Replies: 7
    Last Post: February 3rd, 2017, 02:37 PM
  2. Replies: 2
    Last Post: April 28th, 2014, 02:23 PM
  3. Replies: 1
    Last Post: December 30th, 2013, 09:32 AM
  4. Replies: 1
    Last Post: March 15th, 2013, 09:20 AM
  5. Replies: 4
    Last Post: October 24th, 2011, 09:33 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 02:02 PM.