Skip to content
Andrew J. Gillis edited this page Aug 31, 2017 · 22 revisions

Online Technical Documentation

WAMP Router Library, Client Library, and Router Service

Overview

The nexus 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.

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 import "github.com/gammazero/nexus". See the server example for an example of adding a WAMP server to you 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 import "github.com/gammazero/nexus/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 provide pub/sub and RPC functionality without having to manage external clients or use inter-process communication.

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 locate in the nexusd/ directory of this project. It is built by the running make in this project, or by building it directly using go build.

System Design

Router Concurrency

Client