Content deleted Content added
Rescuing 2 sources and tagging 0 as dead.) #IABot (v2.0.9.3) (Whoop whoop pull up - 12943 |
|||
(9 intermediate revisions by 9 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
==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===
WAMP is architectured around client–client communications
* Clients connect to the router using a transport, establishing a session.
Line 43 ⟶ 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 60 ⟶ 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 128 ⟶ 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 141 ⟶ 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]]
|}
[[Tavendo]], the company from which originated the protocol, is also the author of [[Crossbar.io]], which promotes itself as the de facto router implementation.<ref>{{cite web|title=Crossbar.io is the name of the most full-featured router|date=26 December 2014 |url=http://www.slideshare.net/sametmax/intro-wamp}}</ref> As they are promoting
==Use cases==
Line 183 ⟶ 181:
WAMP also targets the IoT, where it is used in the same way as [[MQTT]]<ref>{{cite web|url=https://into.aalto.fi/download/attachments/12324178/Huang_Fuguo_thesis_2.pdf|title=Moreover, we compared WAMP with other registered WebSocket subprotocols (MBWS, SOAP and STOMP) in terms of the related features; and with other potential protocols (CoAP and MQTT), in terms of the related practical deployments.|access-date=2015-01-12|archive-date=2016-05-13|archive-url=https://web.archive.org/web/20160513073741/https://into.aalto.fi/download/attachments/12324178/Huang_Fuguo_thesis_2.pdf|url-status=dead}}</ref> as a light and efficient medium to orchestrate clusters of connected objects. The implementations in various languages make it suitable to control and monitor small devices such as the [[Raspberry Pi]] (in Python) or the Tessel<ref>[https://www.youtube.com/watch?v=WY7KzrRm8XY Tessel alarm app with Crossbar.io]</ref> (in JavaScript).
And last but not least, WAMP can act as an enterprise service bus, serving as the link between
==Evolution==
Line 249 ⟶ 247:
|
|-
|
|
| {{ya}}
Line 353 ⟶ 351:
|
|-
|
|
|
|