wamp serialisation negotiation

35 views
Skip to first unread message

Darren Smith

unread,
Dec 13, 2017, 5:15:40 PM12/13/17
to WAMP
Hi,

I have a question regarding serialiser negotiation  made during the connection handshake.  

If using WebSocket, the client can provide a value in Sec-WebSocket-Protocol like "wamp.2.json,wamp.2.msgpack" to indicate that the client supports both these serialisations and the server will select which to use. 

This kind of interaction is not supported for RawSocket.  E.g., there appears no way for the client to indicate, during handshake, that it can support several serialisers.  From specification:

    0: illegal
    1: JSON
    2: MessagePack
    3 - 15: reserved for future serializers

Can you confirm my understanding is correct?  And do you think the specification should be amended to support, for RawSocket, the ability for client to advertise selection of supported serialisers ?  It is desirable to have same behaviour no matter what underlying protocol is.  

Thanks

Darren

Tobias Oberstein

unread,
Dec 18, 2017, 9:02:19 AM12/18/17
to wam...@googlegroups.com, Darren Smith
Hi Darren,

Am 13.12.2017 um 23:15 schrieb Darren Smith:
> Hi,
>
> I have a question regarding serialiser negotiation made during the
> connection handshake.
>
> If using WebSocket, the client can provide a value in
> Sec-WebSocket-Protocol like "wamp.2.json,wamp.2.msgpack" to indicate that
> the client supports both these serialisations and the server will select
> which to use.
>
> This kind of interaction is not supported for RawSocket. E.g., there
> appears no way for the client to indicate, during handshake, that it can
> support several serialisers. From specification:
>
> 0: illegal
> 1: JSON
> 2: MessagePack
> 3 - 15: reserved for future serializers
>
> Can you confirm my understanding is correct? And do you think the

Yes, correct. This is by design: RawSocket is supposed to be
significantly easier to implement.

> specification should be amended to support, for RawSocket, the ability for
> client to advertise selection of supported serialisers ? It is desirable

No. A router is supposed to implement all serializers most of the time
anyway, so any serializer the client might use would succeed.

If that is not the case, then a client can still reconnect using a
different serializer until it succeeds.

> to have same behaviour no matter what underlying protocol is.

The negotiated serializer is considered a transport detail - the WAMP
layer does not care about serializer ..

Cheers,
/Tobias


>
> Thanks
>
> Darren
>

Reply all
Reply to author
Forward
0 new messages