otto/eventbus
R Tyler Croy 58cdae28cc
Prototype the travis-ci processor pushing directly into the tasks.for_auction channel
This doesn't help too terribly much at this point, but at least it's a means of
getting a .travis-ci.yml into the system
2020-01-13 19:41:07 -08:00
..
src Prototype the travis-ci processor pushing directly into the tasks.for_auction channel 2020-01-13 19:41:07 -08:00
static Add the default channels as described in RFC 0003 2019-12-30 07:30:06 -08:00
templates Start passing around messages internally which can be serialized to JSON 2019-12-27 12:54:44 -08:00
.gitignore Incorporate the newer actix-web components which use async/await 2019-12-27 11:26:40 -08:00
Cargo.toml Refactor the EventBusClient code into the eventus crate where it belongs 2020-01-11 16:18:14 -08:00
README.adoc Update the eventbus README to include some more details about what it does. 2020-01-05 18:46:55 -08:00

README.adoc

<html lang="en"> <head> </head>

Otto Eventbus

THe eventbus is the core of the Otto ecosystem, which provides stateless pubsub channels and stateful queues over WebSocket connections.

Other services in the Otto ecosystem are expected to register for events by subscribing to different channels. Events from these channels will be received over a single WebSocket connection.

API

All messages to ("inputs") and from ("outputs") the eventbus are serialized as JSON.

WebSocket connections must be initiated to http://EVENTBUS_URL/ws/.

Inputs

Subscribe

{
  "meta" : {
    "channel" : "<channel name>",
    "ts" : "<iso-8601 timestamp>"
  },
  "msg" : {
    "type" : "subscribe",
    "client" : "<client uuid>"
  }
}

Unsubscribe

{
  "meta" : {
    "channel" : "<channel name>",
    "ts" : "<iso-8601 timestamp>"
  },
  "msg" : {
    "type" : "unsubscribe",
    "client" : "<client uuid>"
  }
}

Publish

{
  "meta" : {
    "channel" : "<channel name>",
    "ts" : "<iso-8601 timestamp>"
  },
  "msg" : {
    "type" : "publish",
    "_comment" : "The payload can be any arbitrary JSON object",
    "payload" : {
      "<arbitrary>" : "<json>"
    }
  }
}

Outputs

Heartbeat

{
  "meta" : {
    "channel" : "<channel name>",
    "ts" : "<iso-8601 timestamp>"
  },
  "msg" : {
    "type" : "heartbeat"
  }
}

Message

{
  "meta" : {
    "channel" : "<channel name>",
    "ts" : "<iso-8601 timestamp>"
  },
  "msg" : {
    "type" : "message",
    "_comment" : "The payload can be any arbitrary JSON object",
    "payload" : {
      "<arbitrary>" : "<json>"
    }
  }
}

Implementations

The Otto eventbus is intended to provide an API shim which can be easily ported to a number of backend durable queueing and eventing systems.

There are currently no other implementations other than the in-memory implementation in this directory.

</html>