xavi

WebSocket channel server

Usage no npm install needed!

<script type="module">
  import xavi from 'https://cdn.skypack.dev/xavi';
</script>

README

Xavi - Realtime Channel Server Build Status

WebSocket interface for highly distributed systems

Server library (node.js)


Features

  • Channel Subscriptions: publish messages to subscribed clients via smart channel propagation.
  • Service Bindings: deploy an integrated system to broadcast messages from distributed backend services.
  • Middleware: manipulate incoming and outgoing messages; add authentication, encoding, and more.

Getting started

Install Xavi

npm install xavi

Create a new Xavi server

var xavi = require("xavi");
var app = xavi.createServer();

Add service bindings

var RedisService = require("xavi-service-redis");
var RabbitService = require("xavi-service-rabbitmq");

app.services.bind("redis.channel", RedisService.extend({
    host: "localhost",
    port: 6379
}));

app.services.bind("rabbit.channel", RabbitService.extend({
    host: "localhost",
    port: 5672
}));

Add middleware

var AuthMiddleware = require("xavi-middleware-auth");
var AuthBackend = require("path/to/auth/backend");

app.middleware.bind(AuthMiddleware.extend({
    backend: new AuthBackend()
}));

Start server

app.listen(8080, "localhost");

To get up and running with the client library, please visit the xavi-client repository.


Contributing

Xavi is completely open source, and welcomes community contributions.

Before you start, please read our contribution guidelines.

At a glance
  • Fork this repository
  • Create a new branch
  • When ready, submit a pull request

To contribute to other Xavi projects, visit the relevant repos:

License

Xavi is distributed under the terms of the MIT License.

© 2014 Football Radar