[nanomsg] Lots of NNG updates this weekend

  • From: Garrett D'Amore <garrett@xxxxxxxxxx>
  • To: "nanomsg@xxxxxxxxxxxxx" <nanomsg@xxxxxxxxxxxxx>
  • Date: Tue, 21 Jan 2020 00:10:53 -0800

This was a holiday weekend here in the US, and I spent a lot of it working on 
NNG.  As a result, there is a bunch of good stuff.  Mostly, we have started 
making large strides on addressing the performance.  There is a lot less data 
copying, we have made some work to eliminate extra system calls, and eliminate 
extra branches, and shorten contentious regions of the code.  We also are doing 
fewer allocations, so that helps a bit too!  Inproc also does fewer context 
switches while processing things.

In addition, some other things:

• The maximum TTL (hop count) you can set is now reduced to 15 (from 255).  
This allows us to inline some headers, and eliminate dynamic allocations (work 
to be done still).
• A few bugs have been squashed (raw mode in particular was inconsistent in the 
headers returned).
• Robert Bielik contributed a fix for HTTP server handling of the root URI.

There’s still a lot to do  -- here’s what to look forward to *soon*:

• The pair and bus protocols will start using lmq instead of message queues – 
nice performance boost there due to fewer context switches.
• The pipeline (push/pull) will move to fully unbuffered logic – also reducing 
context switches and giving better backpressure feedback.
• More enhancements to the HTTP framework
• Continued expansion of the test suites and test coverage (our goal is 95% for 
the entire project)
• Various other minor features (abstract sockets, ipv6 scoped addresses, thread 
names)
• More performance improvements in the aio and platform polling code (I’ve 
already been experimenting here)

My expectation is that those things will probably constitute the bulk of the 
work for 1.3.x.  Later larger features (TLS 1.3, richer statistics, more 
bindings, new transports, new protocols, OS ports, QoS for pipes) will probably 
be in 1.4 and later.

Anyway, enjoy, and give NNG master a whirl if you haven’t done so in a while.  
I hope you’ll be pleased!

- Garrett

Other related posts:

  • » [nanomsg] Lots of NNG updates this weekend - Garrett D'Amore