Multiple callbacks from Python openrpc server supported

46 views
Skip to first unread message

Kumar Vishal

unread,
Oct 18, 2017, 7:42:11 AM10/18/17
to zerorpc
Hello,

M planning on using zerorpc for communication between a python server (which does the processing) (zerorpc server), and node.js server (zerorpc client).

M looking to send multiple responses from python, for a single processing request from node.js. Is this possible using zerorpc in Python? I found some examples where node.js is zerorpc server, but couldn't find anything for Python.

So from Python I'd like to send incremental updates:

class RpcInterface(object):
   
def __init__(self):
       
return


   
def echo(self, msg):


       
// First response
        resp
("response 1")


       
// Do more processing.
        resp
("response 2")


       
return "Final Response"


François-Xavier Bourlet

unread,
Oct 18, 2017, 11:39:04 AM10/18/17
to zer...@googlegroups.com
Hello,

You can use streaming, take a look on this page for examples in both python and nodejs: http//www.zerorpc.io

Best,

fx

--
You received this message because you are subscribed to the Google Groups "zerorpc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to zerorpc+u...@googlegroups.com.
To post to this group, send email to zer...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/zerorpc/547eb252-9c31-45da-bdd6-d8bc5ba1455c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages