[nanomsg] Re: Language binding vs custom network protocol implementation

  • From: Achille Roussel <achille.roussel@xxxxxxxxx>
  • To: "nanomsg@xxxxxxxxxxxxx" <nanomsg@xxxxxxxxxxxxx>
  • Date: Sun, 14 Sep 2014 09:35:43 -0700

Hello,

Nanomsg also provides features like automatic reconnections, automatic send 
retries, efficient memory management, polling, proxy... as well as checks at 
the socket level that a program isn't trying to misuse a protocol (sending 
multiple requests on a REQ socket without reading the responses for example). 
The library also abstracts the transport layer so that you can use the same 
code to do network, IPC and in-process communicators. 

What about writing a better Java binding yourself?
Or improving one if the existing Java bindings?
That would probably be just as much work than building your own implementation 
of scalability protocols, and it would be if great use to the community. 

Achille Roussel
+1 415 490 6339

> On Sep 14, 2014, at 8:37 AM, Mingfai <mingfai.ma@xxxxxxxxx> wrote:
> 
> hi,
> 
> for pub-sub and push-pull, probably the other as well, the 
> wire/transportation/network protocol of NanoMsg is quite simple, apparently, 
> the first conversation to establish the protocol/pattern, then sending 
> message is all about a 8-byte header/length and then payload. Every port can 
> bind for only one protocol.
> 
> given the network protocol is simple, what kind of advantage we can get from 
> using a language binding in compare to just implement the network protocol?
> 
> My case is using Java, and Java has very mature async network libraries, e.g. 
> Netty, that allow me to implement a subscriber, or maintains the channels of 
> inbound connections as publisher, easily. On the other hand, the two bindings 
> are relatively immature and harder to use. 
> 
> One step backward, the reason I wound want to use NanoMsg (at least it's 
> protocol) is to avoid design my protocol to use defined patterns, and allow 
> interoperability with non-Java platform. 
> 
> So I basically want to figure out what kind of magic the C binding does. :-)
> 
> thanks,
> mingfai 

Other related posts: