Content deleted Content added
mNo edit summary |
|||
(7 intermediate revisions by 7 users not shown) | |||
Line 2:
{{Advert|date=October 2016}}
'''WAMP''' is a [[WebSocket]] subprotocol registered at [[Internet Assigned Numbers Authority|IANA]],<ref>[https://www.iana.org/assignments/websocket/websocket.xml IANA protocols listing page]</ref> specified<ref>[https://github.com/tavendo/WAMP/blob/master/spec/basic.md WAMP basic profile specifications]</ref> to offer routed [[Remote procedure call|RPC]] and [[Publish–subscribe pattern|PubSub]]. Its design goal<ref>{{cite web|url=https://wamp-proto.org/intro.html|title=Using WAMP you can build distributed systems out of application components which are loosely coupled and communicate in (soft) real-time.}}</ref> is to provide an open [[Web standards|standard]] for soft, real-time message exchange between application components and ease the creation of [[loosely coupled]] architectures based on [[microservices]]. Because of this, it is a suitable [[enterprise service bus]] (ESB),<ref>[http://www.slideshare.net/KSDaemon/wamp-en-exported A few words about WAMP]</ref> fit for developing responsive web applications or
==Characteristics==
Line 8:
===Structure===
WAMP requires<ref>
Message [[serialization]] assumes<ref>[https://github.com/tavendo/WAMP/blob/master/spec/basic.md#serializations WAMP serialization]</ref> integers, strings and ordered sequence types are available, and defaults to [[JSON]] as the most common format offering these. Implementations often provide [[MessagePack]] as a faster alternative to JSON
===Workflow===
Line 41:
Unlike with traditional RPCs, which are addressed directly from a caller to the entity offering the procedure (typically a server backend) and are strictly unidirectional (client-to-server), RPCs in WAMP are routed by a middleware and work bidirectionally.
Registration of RPCs is with the WAMP router, and calls to procedures are similarly issued to the WAMP router. This means first of all that a client can issue all RPCs via the single connection to the WAMP router, and does not need to have any knowledge what client is currently offering the procedure, where that client resides or how to address it. This can indeed change between calls, opening up the possibility for advanced features such as [[Load balancing (computing)|load-balancing]] or fail-over for procedure calls.
It additionally means that all WAMP clients are equal in that they can offer procedures for calling. This avoids the traditional distinction between clients and server backends, and allows architectures where browser clients call procedures on other browser clients, with an API that feels like peer to peer communication.
Line 58:
! Language
|-
|
| [[JavaScript]] for the [[AngularJS]] framework
|-
|
| [[C++]] 11
|-
| wamplv
| [[LabVIEW]] (G)
|-
|
| JavaScript ([[Web browser|browser]] and [[Node.js]])
|-
|
| [[Python (programming language)|Python]]
|-
| wampy
| [[Python (programming language)|Python]]
|-
|
| [[Perl]]
|-
|
| JavaScript for the [[Backbone.js]] library
|-
|
| C++ 11
|-
| Erwa
| [[Erlang (programming language)|Erlang]]
|-
| Jawampa
| [[Java (programming language)|Java]]
|-
| [|
| [[Lua (programming language)|Lua]]
|-
| MDWamp
| [[Objective-C]]
|-
| Minion
| [[PHP]]
|-
| rx.wamp
| JavaScript for the [[React (JavaScript library)|React]] library
|-
|
| PHP
|-
|
| C++
|-
| wampcc
| C++
|-
|
| [[C Sharp (programming language)|C#]]
|-
|
| JavaScript (browser only)
|-
| nexus
| [[Go (programming language)|Go]]
|}
Line 126:
However, the persistent nature of WebSocket connections requires the use of non-blocking libraries and [[Asynchronous I/O|asynchronous]] [[Application programming interface|API]]s. In languages with one official mechanism such as JavaScript, Erlang or Go, this is not an issue. But for languages with several competing solutions for asynchronous programming, such as Python or PHP, it forces the client author to commit to a specific part of the ecosystem.
For the same reason, integrating legacy projects can also require work. As an example, most popular Web Python frameworks are using [[Web Server Gateway Interface|WSGI]], a synchronous API, and running a WAMP client inside a WSGI worker needs manual adapters such as
===Routers===
Line 139:
! Language
|-
|
| [[Erlang (programming language)|Erlang]]
|-
|
| Python (CPython and [[PyPy]])
|-
| Erwa
| Erlang
|-
| wampcc
| C++
|-
| Jawampa
| Java
|-
|
| PHP
|-
| wamp.rt
| JavaScript (Node.js only)
|-
|
| C#
|-
| Wiola
| [[Lua (programming language)|Lua]]
|-
|
| JavaScript (Node.js only)
|-
| nexus
| [[Go (programming language)|Go]]
|}
Line 247:
|
|-
|
|
| {{ya}}
Line 351:
|
|-
|
|
|
|