And that's the thing... websockets is terribly un-web: it doesn't talk about resources, with addresses, it's a glaringly ambiguous pipe that could have anything. Forming a websocket does do a content-negotiation pass, but there's nearly no concensus for what to expect. And this is an early contendor trying to give Websockets well known content forms to talk. Not just well known, but resourceful, addressed content too. Whereas with HTTP, we've had a long long history of creating interactable public APIs, this is something WAMP has to create, because Websockets is anti-web.
This specification describes two common network design patterns (RPC, PubSub) and establishes a reusable heterogeneous framework for using them. If somebody needs those patterns, they can just pick this up and use it, and also interoperate with other clients/routers that use the same specification. Since there is this implementation-agnostic specification, client APIs and routers can be implemented within whatever language and context (embedded system, server, web browser, whatever) and they will all work together.
The WebSocket is a transport. One can put many sorts of subprotocols over it and this is one effort to make a common , useful one.
Edit: anyway, i see where this module would fit, i was just curious why we need to use for everything a foreign component and create more dependencies for our projects instead of developing in-house such trivial modules
I have my own in-house WebSocket (raw, not WAMP.ws) application server and a very thin client-side API wrapper around raw WebSockets; it performs PubSub and some RPC. It's not rocket science but it's also not trivial.
I might consider migrating that custom subprotocol to this framework. It looks like they have thought carefully about the general issues with PubSub/RPC and it will be easier to scale my use (as in expanding my RPC APIs, not in terms of # of clients). I can focus on my data and APIs, not on the substrate.
Hopefully an ecosystem of designers/implementors/users emerges that make this thing awesome. Of course, I've thought that about other libraries and frameworks and it went nowhere, so we'll see.
WebSocket only provides you with a bidirectional message channel. It's low-level, and does not provide application messaging.
WAMP can run _over_ WebSocket, but also other message channels. E.g. you can have WAMP running over a shared-memory message queue.
-client side websocket handling is ~3 lines of code
-server side websocket is ~200 lines of code even with pure bit level C/C++ on top of any TCP socket (the websocket RFC is very simple)
-writing a simple protocol for yourself is obvious
So, you can write all these for yourself within one day and then you know all the details. It takes more time to study how to use others code and you will still remain on the wrong path if some modification would be needed, feature missing or you have to fix a bug.