WAMP – The Web Application Messaging Protocol
wamp.ws
wamp.ws
By "stealing" an existing, long-running and popular acronym, the maintainers are going to stifle this project no matter how much they try to separate themselves from WAMP.
Trick question: is it possible to run WAMP on WAMP?
Potential ambiguity? It's nothing but ambiguity! What were they thinking.
It's important to be aware of our own cognitive biases: while Linux is the de-facto standard on the server side and the startup scene is dominated by MBPs and its variants (with a good helping of Linux again, though often in VMs), this only represents a tiny fraction of developers. Dark Matter Developers are a thing.
It is the predominant Windows PHP development environment and Apache stack - that has millions of users worldwide.
I did not log out of the Google mothership so perhaps my results are skewed, but I also haven't heard of the WAMP protocol before. :)
Ya, but no one in their right mind runs that.
The solution is simple: Wait for everyone to replace MySQL with its non-Oracle clone, MariaDB. See? Easy!
Or maybe they'll go the NoSQL route and use MongoDB.
Rgd the server stability issues you mention: what WAMP router are you using?
Some disclaimer would be fair. Currently, the most complete router implementation is Crossbar.io (Python), while it is functional, documentation is lacking cruelly. For example, we don't know yet how to do proper cookie authentication. Or the WAMP-CRA authentication has a little flaw and should be replaced with a new auth scheme.
Another example is that AutobahnPython or AutobahnJS are lacking documentation on CallOptions or SubscribeOptions and other things. There is a lot of boilerplate to achieve simple things like... managing a connection lifetime (there is onopen, onclose, and onclose gives you some details, but no consistent, it's hard to know when auth failed or connection aborted).
Anyway. It just means that WAMP is in his debuts, I hate some weaknesses of the WAMP ecosystem (documentation, boilerplate, etc...) Nevertheless, it's awesome and you should definitely try something with. And if you can, contribute and make it incredible.
(No offense, I'm a fond of WAMP, but I don't want people to say things that are obvious like: "oh there is no doc it's a shitty project" -- WAMP is moving fast. Very fast.)
-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.
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.
For use internally between services, this seems like a really bad idea. Seems like it'd be a big bottleneck when it came to scaling.
I love the concept, though. One unified layered for all your services.
The rationalization for verbose, weird, ambiguous formats like XML and JSON is that they're "self-describing".
Might as well just use MSGPACK or something.
The good ole' days.