Results 1 to 2 of 2
  1. #1

    Request/Reply RPC style communication using Light Streamer Websockets.

    Hi,

    We have a requirement to establish an RPC style communication between a client and a server using Websockets. The server is an online ordering solution which needs to submit orders to over 5000 point of sales systems (POS) all over the US.

    We downloaded your software and did some POC, however we are unable to find out how we can do a synchronous request/reply between the server and the client. In our case the server needs to issue the following calls to the client (POS) and get a reply on the same thread synchronously

    1. Call the POS to get the customer's personal information
    2. Post the credit card data and the order data to the POS and get a confirmation on the same thread

    Is it possible to do RPC style communication using your product?

    Thanks in Advance

  2. #2
    Power Member
    Join Date
    Jul 2006
    Location
    Cesano Maderno, Italy
    Posts
    784
    Hi,

    I confirm there is no such direct way to do request/reply with Lightstreamer. You should use the sendMessage for the request and use a dedicated item to get asynchronous responses.

    A trick could be used to obtain the request/reply infrastructure but we do not officially suggest to use it as it may create confusion in the error handling code. When you receive a message from a client you can handle it by throwing a CreditsException: the code and message of the exception are forwarded to the client and exposed by our API




    Note that the same facilities are available on all the SDKs.

    In the future, the sendMessage infrastructure will be extended to support custom messages on the OK responses (but not in the very short term).

    see
    http://www.lightstreamer.com/docs/cl...ml#sendMessage
    http://www.lightstreamer.com/docs/cl...eListener.html
    http://www.lightstreamer.com/docs/ad...a.lang.String)
    http://www.lightstreamer.com/docs/ad...Exception.html

 

 

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 05:41 PM.