Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Crossbar | 2,038 | 3 months ago | 282 | other | Python | |||||
Crossbar.io - WAMP application router | ||||||||||
Thruway | 649 | 63 | 17 | 2 years ago | 33 | February 18, 2022 | 31 | mit | PHP | |
PHP Client and Router Library for Autobahn and WAMP (Web Application Messaging Protocol) for Real-Time Application Messaging | ||||||||||
Wampsharp | 383 | 52 | 19 | 3 months ago | 95 | August 30, 2023 | 37 | other | C# | |
A C# implementation of WAMP (The Web Application Messaging Protocol) | ||||||||||
Turnpike | 246 | 2 years ago | 1 | January 29, 2015 | 32 | mit | Go | |||
Go implementation of a WAMP (Web Application Messaging Protocol) client and router | ||||||||||
Nexus | 244 | 11 | 2 months ago | 14 | September 23, 2023 | 21 | mit | Go | ||
Full-feature WAMP v2 router and client written in Go | ||||||||||
Minion | 122 | 2 | 2 years ago | 9 | September 07, 2020 | 8 | mit | PHP | ||
A Simplified Client for WAMP v2 (Web Application Messaging Protocol) with command line support - PHP WebSocket Made Easy | ||||||||||
Wamp.io | 79 | 4 | 2 | 10 years ago | 4 | May 29, 2013 | 13 | JavaScript | ||
An implementation of the Autobahn WebSockets RPC/PubSub: WebSocket Application Messaging Protocol (WAMP) for WebSocket.IO or Engine.IO | ||||||||||
Spell | 64 | 1 | 10 months ago | 2 | September 14, 2015 | 11 | apache-2.0 | Elixir | ||
Spell is a Web Application Messaging Protocol (WAMP) client implementation in Elixir. WAMP is an open standard WebSocket subprotocol that provides two application messaging patterns in one unified protocol: Remote Procedure Calls + Publish & Subscribe: http://wamp.ws/ | ||||||||||
Clj Wamp | 55 | 3 | 8 years ago | 16 | October 05, 2015 | 6 | epl-1.0 | Clojure | ||
WebSocket Application Messaging Protocol (WAMP) for Clojure and HTTP Kit | ||||||||||
Wampire | 29 | 1 | a year ago | 5 | June 01, 2022 | 4 | mit | Rust | ||
Asynchronous Rust implementation of a WAMP (Web Application Messaging Protocol) client and router |
Thruway is an open source client and router implementation of WAMP (Web Application Messaging Protocol), for PHP. Thruway uses an event-driven, non-blocking I/O model (reactphp), perfect for modern real-time applications.
Basic Spec read more
Advanced Spec read more
* Thruway specific features
Thruway is only supported on PHP 5.6 and up.
Create a directory for the test project
$ mkdir thruway
Switch to the new directory
$ cd thruway
Download Composer more info
$ curl -sS https://getcomposer.org/installer | php
Download Thruway and dependencies
$ php composer.phar require voryx/thruway
If you're going to also use the Thruway Client install a client transport. You'll need this to run the examples
$ php composer.phar require thruway/pawl-transport
Start the WAMP router
$ php vendor/voryx/thruway/Examples/SimpleWsRouter.php
Thruway is now running on 127.0.0.1 port 9090
<?php
require __DIR__ . '/vendor/autoload.php';
use Thruway\ClientSession;
use Thruway\Peer\Client;
use Thruway\Transport\PawlTransportProvider;
$client = new Client("realm1");
$client->addTransportProvider(new PawlTransportProvider("ws://127.0.0.1:9090/"));
$client->on('open', function (ClientSession $session) {
// 1) subscribe to a topic
$onevent = function ($args) {
echo "Event {$args[0]}\n";
};
$session->subscribe('com.myapp.hello', $onevent);
// 2) publish an event
$session->publish('com.myapp.hello', ['Hello, world from PHP!!!'], [], ["acknowledge" => true])->then(
function () {
echo "Publish Acknowledged!\n";
},
function ($error) {
// publish failed
echo "Publish Error {$error}\n";
}
);
// 3) register a procedure for remoting
$add2 = function ($args) {
return $args[0] + $args[1];
};
$session->register('com.myapp.add2', $add2);
// 4) call a remote procedure
$session->call('com.myapp.add2', [2, 3])->then(
function ($res) {
echo "Result: {$res}\n";
},
function ($error) {
echo "Call Error: {$error}\n";
}
);
});
$client->start();
You can also use AutobahnJS or any other WAMPv2 compatible client.
Here are some [examples] (tavendo/AutobahnJS)
Here's a plunker that will allow you to run some tests against a local router
For AngularJS on the frontend, use the Angular WAMP wrapper.