[nanomsg] mangos updates

  • From: Garrett D'Amore <garrett@xxxxxxxxxx>
  • To: nanomsg@xxxxxxxxxxxxx
  • Date: Thu, 12 Feb 2015 07:41:34 -0800

(If you don’t use mangos, discard this post, unless you use Go, in which case 
maybe you should check out mangos!)

I’ve made a variety of changes lately, which you may want to know about.

1. v1.1.0 is tagged.  This was a “stable” version, and frankly represents the 
“best” stable version, in the sense that it addressed all the issues that I 
knew were biting people.  (Big thanks to Jason Aten who helped me work through 
various items — the compat module which provides compatibility with libnanomsg 
works pretty darn well now, and a big part of that is because of perseverance 
on the part of Jason.)

2. New Port API is introduced.  You can get notifications about additions and 
removals to/from lower level connections (e.g. due to a redial) using the new 
Port API.  You can get lots of details about the underlying transport too — TLS 
configuration, peer addresses, even the HTTP request structure if you are using 
websocket.

3. New Dialers & Listeners API.  Listeners and Dialers may now be explicitly 
created, and can have options set on them. (like TCP KeeepAlive, or TLS 
configuration, etc.).  This *replaces* the old transport-global SetOptions API. 
 In fact, I’ve just removed the transport-wide Options API.  (This API is still 
used to set socket global options, like Raw mode, or tunables for the protocol.)

4. Some tunables were moved & renamed.  Particularly if you used the 
experimental TLS support, you may be impacted.

5. Re-connect interval was changed from 1 sec (fixed) to 100 milliseconds with 
x2 exponential backoff retry, with interval capped at 1 minute.  (Meaning we 
try the 2nd time at 200 msec, the 3rd at 400, and so on, until we hit 1 minute. 
 At that point, we will just retry every minute.)  These are not *YET* tunable, 
but they will be soon.

6. There will be some additional API changes coming.  Mostly I’m going to work 
to improve the websocket API, probably tweak the Dial and Listen API a little 
more (passing a map of extra options is kind of ugly — I’m going to make them 
varargs style functions), and I’m going to add more options.  Also, the 
Message() API is going to get a new Port call, so you can obtain the Port 
details for a given message.  Cool, right?  (Will be useful if I ever get 
around to doing the UDP transport.)

7. Protocol changes coming too.  The STAR protocol (which libnanomsg lacks) 
will  get a change to protect against cycles, and I’m probably going to create 
a Survey2 protocol that works like Survey, but adds a backtrace header — this 
is much like what Martin described.  I may look at doing this for other 
protocols that lack the backtrace info.  (Admittedly, it only makes sense when 
sending reply to a set sender, but imagine being able to reply to a specific 
sender with an N-Way BUS or PAIR.  (Which no longer looks like PAIR, 
admittedly.)

Anyway, thanks for your support of mangos, and we return you back to your 
regularly scheduled programming… :-)

        - Garrett

Other related posts:

  • » [nanomsg] mangos updates - Garrett D'Amore