WAMP – Web Application Messaging Protocol
wamp-proto.org
wamp-proto.org
This happened right as IDL codegens like Thrift also stopped being talked about, and when people did again, it was all about gRPC, which runs over HTTP/2. This didn't help Websocket either.
Projects like this are especially interesting because they genuinely deliver what they claim to do, but to most people they exist in an alternate universe they've never heard about.
As well, if you add a single SSE channel to that, riding in the same HTTP/2 socket, you now can do everything Websockets can do.
And if you throw a web server like Caddy between your HTTP/2 clients and your application server, now your app server can just be implemented in terms of regular HTTP/1 request-handling, with no need to implement any connection-oriented protocols at all.
SSE, on the other hand, is for pushing data, over any HTTP version.
Beside, wamp made to be is used outside the web. You use it to make your server side services talk to each others. Or for iot.
First, it's not just RPC, it's routed RPC. So you basically don't have to know who is providing the procedure and where it is. This also allows transparent fallbacks, hot swap and load balancing of the clients providing the procedure.
Another thing I like is the ease of use. If you used CORBA, XMLRPC or SOAP you know what a pain it is to get it work.
The Python and JS clients just work for me. Transparently: they even get errors back in their native form (ex: python get exception for an error occurring remotely). There is zero mapping to do: you start you client, you register your procedure, and you call it.
The fact is uses websocket is a cool thing too. First, it means you can use it in the browser, and not just nodejs, Python, C#, Java or PHP (but they all have interroperable clients!). But it also means it usually works on your network without the need to setup anything or bother your local sysadmin. And it can benefit from TLS.
It's really sweet.
My only beef is that the Python API is too verbose to my taste, and advance setup for crossbar.io can get complicated if you want to make it super secure (default settings are the equivalent of chmod 777).
Securing a website is a lot of work too if you have to do it manually. I just don't do it much anymore, Django takes care of most of the issues for me, and barring some very bad decisions, I have little to actually worry about.
But crossbar doesn't have a django like framework. It's more like flask, express, sinatra...
I've been actually doodling the API of a high level framework on top of crossbar.io for 2 years now. But barring winning the lottery or starting a successful kickstarter, it's unlikely I will find the money to work on it for a year without interruption. It's crazy the amount of work that needs to be done to catch up with frameworks created a decades ago and improved by hundred of dev while field testing it :)
This is something that absolutely irrelevant to the protocol.
You could have gotten that same passage out of a needlessly thick CORBA book a quarter century ago. (Unless you did, if this is sarcasm then I salute you).
The problem with adoption of "standard" RPC mechanisms has never been with the underlying transport layer. It's that an interface designed to "look like code" has exactly the property of code, which is that it's fragile in the face of evolution and tends to need to be rewritten every few years when the new generation of hackers gets bored with maintaining the crufty old junk.
It supports RPC and pub/sub semantics and has client libraries in many languages. It’s implemented by many messaging components as well as Azure Service Bus.
I think that parts of the WAMP spec are useful to read and I've found it to be a useful guideline for my project but I think that implementing fully WAMP-compatible clients and servers is not realistic at this stage... It's better to just roll your own protocol.
Most implementations of real-time frameworks/libraries use custom protocols and many of them are more widely used than the WAMP protocol.
The price of that is a really heavy spec.
But it's also how the team approach problems. E.G: their Python code really, really looks like Java, with interface everywhere, and wrappers, and factories... If they designed their spec the same way, then it's not surprising.
The german stereotype about engineering is not just a joke.
https://en.wikipedia.org/wiki/WampServer
You know the difference, and I know the difference, but a whole lot of newbie developers who are trying to learn about websockets and while playing around on their Windows dev box could end up pretty confused.
Basically, yep, it's bad, but this ship has sailed.
Tobias is a very good, German, technician.
There's a difference between being talented and being an outstanding technician.
This product doesn't even make second page results, and let's be honest most people don't go past the first page of Google results.
"And here is what we recommend for users: [...] Use the hashtag/keyword "wampws" when search on Web platform like Twitter or StackOverflow"
... So why not call it WAMPWS?
- wamp is a language neutral spec and an open standard registered at iana.
- implementations not only exist in many languages but they are all interroperable transparently despite all feeling very native to their own language. A failing rpc in js will see the error propagated as a python exception on the other side.
- it works in the browser, yes, but it's also very usable as a way to implement micro services or iot clusters. You are not tied to a particular use case or framework.
- not not simple rpc but routed rpc, so the clients don't need to know each others and you can implement fallback, hot reload or load balancing
- security and authentigication are first class citizen
- wamp comes with a lot of goodies like meta events for introspection or wildcards
Beside, crossbar really need a task queue architecture. It's basically half of it, so i guess we could plug in celery in the mix and some glue code.
NoSuchKeyThe specified key does not exist.implementations/4F6424CF99BA8DC7mv7nfiMNvfiGfUbpMSrbbLzw2pg30iU+BIIxUi+y6ms1+NiTLie+4l1QJFk+6pguD9+FYz8MgH0=
Turns out thst’s for every page in that section.
Of course you could probably do a pretty slick home automation system with this and only a Pi...
It's weird that an RPC involves http->web socket->wamp plus a bunch of pickling etc but hey, it works and saved us a ton of time.
And the whole ecosystem is about open standard and open source. Really good vibes.
I currently use Meteor for webapp development, but when I really look into it the main parts of meteor I use are pub/sub & method calls.
The rest is just react, react router, and the meteor build tools which can be swapped out.
This looks like a promising light weight alternative... plus meteor doesn't run on raspberry pis :(
This reminds me of DDP. Meteor had a lot of good things right: https://github.com/meteor/meteor/blob/master/packages/ddp/DD...
Try http://fuse.rupy.se instead.
I totally didn't get the point. We controlled both the clients and server, so our pre-WAMP was just SOAP style overhead. Meaning useless and confusing.
But the gig paid well and I got some much desired NIO & Netty experience.
"It is difficult to get a man to understand something, when his salary depends upon his not understanding it!" - Upton Sinclair