#back-end #protocols #body #server #user #null #flubber

flubber-backend-proto

The protocol between the Flubber server and Flubber backends

1 unstable release

0.1.0-alpha Dec 7, 2019

#44 in #null

Apache-2.0/MIT

17KB
265 lines

flubber

A multi-service chat bouncer.

TODOs

  • Track unreads
  • Emotes
  • CI, build Docker ctr, etc
  • Edits
  • Channel topics
  • Track users
  • "Identities" (as o2m w/ users on several backends)
  • Spec out client-server protocol
  • Make a "notes to self" backend

License

Licensed under either of

  • Apache License, Version 2.0, in LICENSE-APACHE
  • MIT License, in LICENSE-MIT

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.


lib.rs:

The protocol between the server and backends.

Example Session

P: {"backend_name": "Example", "backend_version": [0, 0, 1], "protocol_version": [0, 1, 0]}
S: {"sequence_number": 0, "body": {"type": "RoomLookup", "value": "#general"}}
P: {"sequence_number": 0, "body": {"type": "RoomID", "value": "#general"}}
S: {"sequence_number": 1, "body": {"type": "RoomJoin", "value": "#general"}}
P: {"sequence_number": 1, "body": {"type": "Success", "value": null}}
S: {"sequence_number": 2, "body": {"type": "MessageSend", "value": {"recipient": "#general", "attachments": [], "content": {"type": "Text", "value: "Hello, world!"}, "extra": null}}}
P: {"sequence_number": 2, "body": {"type": "MessageID", "value": "test"}}

TODO:

  • Work out how emotes should work
    • EmoteID? Store emotes by hash?
  • Users

Dependencies

~2–3MB
~61K SLoC