JSON-RPC and callbacks

RCF support and general discussion.
Post Reply
BigWCharly
Posts: 6
Joined: Sat Aug 30, 2014 8:19 am

JSON-RPC and callbacks

Post by BigWCharly »

Hi all

In my application I have a server, one local client (C++ application) and one remote client (javascript). The best option I see is that the local client connects to the TCP endpoint and the remote client to the JSON-RPC endpoint (as in the JSON-RPC example).
The interface of the server consists of several simple methods, but the server also generates callbacks to which clients can subscribe. For the local client this does not seem to be a problem, but I was wondering what the best strategy is for my remote client.

-> Can I use the callback or the publish-subscribe mechanims provided in RCF?
-> Or do I need to provide a "Listen" method for long-polling? But then, how do I keep the connection opened and how do I handle disconnections, ...?
-> Or implement something on top of the endpoint to extend the JSON-RPC functionality to stream events to the client? (e.g., which can be used with EventSource in JS)
-> Or am I better of using RCFProto in this case?
-> Any other / better options?

Many thanks for your advice and support!

PS, where can I find the reference manual of RCF?

jarl
Posts: 238
Joined: Mon Oct 03, 2011 4:53 am
Contact:

Re: JSON-RPC and callbacks

Post by jarl »

Hi,

There isn't really a good solution here - you'll basically have to do long-polling and manually manage the connection.

The RCF and RCFProto user guides can be found on the product home pages:

http://www.deltavsoft.com/RCF.html

http://www.deltavsoft.com/RCFProto.html

PDF versions are available as well as HTML.
Kind Regards

Jarl Lindrud
Delta V Software
http://www.deltavsoft.com

BigWCharly
Posts: 6
Joined: Sat Aug 30, 2014 8:19 am

Re: JSON-RPC and callbacks

Post by BigWCharly »

Hi Jarl, thanks!
About the user guides, they helped a lot to get me started as they are example based, but it's terrible to reach to the details of RCF. Hence my question for a reference manual...

Post Reply