Skip to content
Victor Dudochkin edited this page Jul 9, 2018 · 5 revisions

Online Technical Documentation

WAMP Router Library, Client Library, and Router Service Initially forked from nexus project to adjust for wampire

Wampire logo

Why Wampire - another WAMP implementation

Rust is used increasingly for building distributed systems, web and micro-service infrastructure.
All of these frequently need a communication system that WAMP is ideally suited for.
So, a full-featured Rust implementation of WAMP that provides both router and client libraries is called for. The implementation must be reliable, have good performance characteristics, and provide highly usable APIs. Wampire strives to be the Rust implementation of WAMP that accomplishes all of these goals, and is actively supported and maintained for continued improvement wherever possible.

Features Easily Accessible

The programming libraries included are intended to be simple to use while allowing the developer to take full advantage of the WAMP advanced profile features provided.
Extended functionality in the Meta API and in publication filtering offers enhanced support for a client to make decisions about message recipients.

Different Transport Options

Various transport and message encoding options are available.
This includes a special transport specifically for Wampire clients embedded in the same application as a Wampire router, that allows the clients to communicate directly with the router in-process, without any interprocess communication or message encoding overhead.

Package Components

The Wampire project provides a WAMP router library, client library, and stand-alone WAMP router service.
These components can be used together to facilitate communication in distributed systems, or can be used independently to interoperate with other WAMP client or router implementations. Using a Wampire client with a Wampire router allows all Wampire features and functionality to be fully utilized.

Router Library

The router library can be used to build custom WAMP routers or to embed a WAMP router in an application. The router code is located in the project root directory, and is imported into your project by

[dependencies]
wampire = "0.1"

See the Router Library for a walk-through of creating a WAMP server that can be part of your application.

Client Library

The client library can be used to build clients that connect to any WAMP server, or to communicate in-process with a WAMP router embedded in the same application. The client code is located in the client/ directory of this project, and is imported into you code by

[dependencies]
wampire = "0.1"

See the Client Library for a walk-through of creating a simple client.
See the pub/sub client examples for an examples of subscribe and publish clients, and the rpc client examples for examples of caller and callee clients.

The same callee client from the RPC examples is also implemented as a client embedded in the server application, and uses in-process communication to the router.
Embedding a client in the same application as the router is how an application can itself can provide functionality via the router's pub/sub and RPC facilities.

Router Service

The router service can be run as-is to provide WAMP routing.
This is useful when you need a general-purpose WAMP router without having to write any code to provide one. The service code is located in the wampire/ directory of this project. It is built by the running cargo build.