Web Application Messaging Protocol: Difference between revisions

Content deleted Content added
Yobot (talk | contribs)
m WP:CHECKWIKI error fixes, added Empty section (2), uncategorised tags using AWB (10765)
No edit summary
Line 3:
==Characteristics==
 
{{Empty section|date=January 2015}}
 
 
===Structure===
 
WAMP requires<ref>[http://crossbar.io/docs/Router-Transports/ Crossbar.io router transport ]</ref> a reliable, ordered, [[full-duplex]] message channel as a [[transport layer]], and by default uses Websocket. However, implementations can use other transports matching these characteristics and communicate with WAMP over raw sockets,<ref>{{cite web|url=https://github.com/tavendo/WAMP/issues/63|title=WAMP can run over Raw transports instead of WebSocket. Each message is prefixed with a uint32 (big endian) that provides the (serialized) length of the following WAMP message.}}</ref> [[Unix ___domain socket|Unix sockets]], [[Push technology#Long polling|HTTP long poll]] or [[ZeroMQ]].<ref>{{cite web|title=We could use raw sockets, like the ones Ratchet is built on, but ZeroMQ is a library that just makes sockets easier. |url=http://socketo.me/docs/push}}</ref>
Line 13:
To identify remote procedures and PUB/SUB topics without conflicts, WAMP also needs an ID space allowing global assignment and resolution. Because the protocol is Web native - Websocket being the preferred transport - HTTP [[URI]]s are used.
 
===Workflow===
 
WAMP is architectured around client-client communications, with a central software, the router, dispatching messages between them. The typical data exchange workflow is:<ref>[https://github.com/tavendo/WAMP/raw/master/spec/figure/sessions2.png WAMP internals bird view diagram]</ref>
Line 25:
This can have subtle variations depending of the underling transport.<ref>{{cite web|title=The Long-Poll Transport is able to transmit a WAMP session over plain old HTTP 1.0/1.1. This is realized by the Client issuing HTTP/POSTs requests, one for sending, and one for receiving|url=https://github.com/tavendo/WAMP/blob/master/spec/advanced.md#long-poll-transport}}</ref> However, implementation details are hidden to the end user who only programs with the two high-level primitives that are RPC and PUB/SUB.
 
===Security===
 
As WAMP uses Websocket, connections can be wrapped in [[Transport Layer Security|SSL]] for encryption. Even when full [[confidentiality]] it not established, several mechanisms are implemented to isolate components and avoid [[Man-in-the-middle attack|MITM]] attacks. Default implementations ensure that trying to register an already registered procedure will fail.
Line 35:
==Implementations==
 
{{Empty section|date=January 2015}}
 
===Clients===
 
As WAMP main targets are Web applications and the Internet of Things, the first client implementations are in languages well established in these industries:
Line 89 ⟶ 88:
For the same reason, integrating legacy projects can also require work. As an example, most popular Web Python frameworks are using [[WSGI]], a synchronous API, and running a WAMP clients inside a WSGI worker needs manual adapters such as [https://pypi.python.org/pypi/crochet crochet].
 
==Router=Routers===
 
Routers can be embedded directly into the application code, and for this reason some client libraries also provide a router. But since it's a moving part, it is best used as a swappable black box just like one would consider [[Apache HTTP Server|Apache]] or [[Nginx]] for [[Hypertext Transfer Protocol|HTTP]]: