[nanomsg] Re: websocket mapping

  • From: Garrett D'Amore <garrett@xxxxxxxxxx>
  • To: nanomsg@xxxxxxxxxxxxx
  • Date: Wed, 4 Feb 2015 00:07:08 -0800

> On Feb 3, 2015, at 11:56 PM, Gonzalo Diethelm (Redacted sender 
> "gonzalo.diethelm@xxxxxxxxxxx" for DMARC) 
> <dmarc-noreply-outsider@xxxxxxxxxxxxx> wrote:
> 
> 
>> On 04 Feb 2015, at 04:14, Garrett D'Amore <garrett@xxxxxxxxxx 
>> <mailto:garrett@xxxxxxxxxx>> wrote:
>> 
>>> Cool. Perused `ws.go` and `wss.go`, and it seems like a sane 
>>> implementation. Though, do we need a version? e.g., `rep.sp.0.nanomsg.org 
>>> <http://rep.sp.0.nanomsg.org/>`
>> 
>> I am disinclined at this point.  I’d suggest we could add that later, “sp1”, 
>> or “1.sp” or somesuch.  I wouldn’t bother now.
> 
> Please reconsider. If we have learned anything from history, is that a 
> version field included from the beginning will save your ass in the future…
> 
> Cheers,
> Gonzalo
> 

Uh…. I’d agree if this was a binary packed protocol.  It isn’t.  The value is 
trivially extensible in the future.  I see no possible way that the absence of 
an explicit version field now could cause problems when/if we ever decide we 
need to add one for a hypothetical v1. edition.

I.e. imagine we have v0:

        req.sp.nanomsg.org <http://req.sp.nanomsg.org/>

And then imagine we want to do v1 later:

        req.v1.sp.nanomsg.org <http://req.v1.sp.nanomsg.org/>

(or perhaps, req.spv1.nanomsg.org <http://req.spv1.nanomsg.org/> or 
req.sp1.nanomsg.org)

(We can have the debate about which is the best way to add version 1 in the 
string later, when it actually happens.)  In fact, it isn’t clear to me whether 
a hypothetical version 1 would be version 1 of *SP*, or version 1 of the 
REQ/REP protocol.  I can see that going both ways in the future.

        - Garrett

Other related posts: