"WAMP over Raw Transport"

#1

Hi,

I'd like to announce another nifty feature of WAMP and Autobahn|Python:

WAMP can run over "raw transports" instead of WebSocket.

With a raw transport, each message is simply prefixed with a uint32 (big endian) that provides the (serialized) length of the following WAMP message.

This works for both JSON and MsgPack serialization.

···

==

Why would you want that?

With "raw transport", you can create fully interoperable WAMP implementations that _do not need a WebSocket_ implementation or a networking library (if the transport runs over pipes eg.)

==

As a proof, I'll try to see if I can write a C/C++ WAMP client library over the weekend;) That is: pure C/C++ with only the standard library!

That will be cool, since Crossbar.io allows to fork, monitor and talk over pipes with (local) clients..

Cheers,
/Tobias

0 Likes

#2

Hello Tobias,

how do you know which serialization to use?

By agreement. RawSocket does not support dynamic negotiation of serialization format. Means: a client connecting to a RawSocket/WAMP endpoint MUST _know_ in advance which serialization to use.

At the moment I enforce it to be msgpack for all traffic that enters via
raw TCP.

That's fine. If you want to support both serializations, just run on 2 ports.

Maybe BED is also a great serialization:
Loic Hoguin stated at the EUC2014 "Stop using JSON, save the planet!":
https://twitter.com/ronnylt/status/475943416250241024
He has a talk about a new binary serialization called BED:
http://ninenines.eu/talks/bed/bed.html
and The project is on github: https://github.com/bed-project/

Then again, how to decide which one is used?

I don't think it's worth. At least for me ..

If you want to safe bytes on the wire, JSON with WebSocket compression is hard to beat.

If you want to safe CPU cycles, MsgPack on raw TCP is fine.

Cheers,
/Tobias

···

Am 15.06.2014 10:20, schrieb Bas Wegh:

Cheers,
Bas

Am Samstag, 22. März 2014 16:55:59 UTC+1 schrieb Tobias Oberstein:

    Hi,

    I'd like to announce another nifty feature of WAMP and Autobahn|Python:

    WAMP can run over "raw transports" instead of WebSocket.

    With a raw transport, each message is simply prefixed with a uint32
    (big
    endian) that provides the (serialized) length of the following WAMP
    message.

    This works for both JSON and MsgPack serialization.

    ==

    Why would you want that?

    With "raw transport", you can create fully interoperable WAMP
    implementations that _do not need a WebSocket_ implementation or a
    networking library (if the transport runs over pipes eg.)

    ==

    As a proof, I'll try to see if I can write a C/C++ WAMP client library
    over the weekend;) That is: pure C/C++ with only the standard library!

    That will be cool, since Crossbar.io allows to fork, monitor and talk
    over pipes with (local) clients..

    Cheers,
    /Tobias

--
You received this message because you are subscribed to the Google
Groups "WAMP" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to wampws+un...@googlegroups.com
<mailto:wampws+un...@googlegroups.com>.
For more options, visit https://groups.google.com/d/optout.

0 Likes