codypiersall / pynng

Python bindings for Nanomsg Next Generation.
https://pynng.readthedocs.io
MIT License
260 stars 58 forks source link

[Qeustion] Why there is not a cross-language NNG-RPC lib (just like zerorpc) #101

Open mo-han opened 2 years ago

mo-han commented 2 years ago

was trying to find a rpc framework to use between electron (node.js) and python. some articles suggest zerorpc, but npm install zerorpc keeps failing. some answers on internet tell to use zeromq directly, instead of zerorpc (seems like there's some issue for npm install zerorpc). then i decide to use nanomsg instead of zeromq. during this, realize there is not such a cross-language rpc lib based on nng (in opposite, zeromq has zerorpc)

i'm quite new to nng, is it because nng already has built in REQ/REP pattern and it's so easy for users to implement custom RPC components on this pattern so there's no need to provide a nng-rpc anymore?

westbywest commented 4 months ago

It was straightforward for me to implement JSON-RPC atop pynng/asyncio transport using jsonrpcserver and jsonrpcclient from pypi. There are JSON-RPC 2.0 clients available in javascript, etc, which you could use for the non-python side.