Best Flask open-source libraries and packages

Dino

Distributed notifications using websockets
Updated 5 months ago

Dino

Build Status coverage Code Climate License

Dino is a distributed notification service intended to push events to groups of clients. Example use cases are chat server, real-time notifications for websites, push notifications for mobile apps, multi-player browser games, and more. Dino is un-opinionated and any kind of events can be sent, meaning Dino only acts as the router of events between clients.

Any number of nodes can be started on different machines or same machine on different port. Flask will handle connection routing using either Redis or RabbitMQ as a message queue internally. An nginx reverse proxy needs to sit in-front of all these nodes with sticky sessions (ip_hash). Fail-over can be configured in nginx for high availability.

Documentation is hosed on GitHub Pages.

Dino Architecture

Monitoring

Loads of metrics is by default being collected by Dino and sent to statsd. To enable statsd monitoring, configure the statsd block in dino.yaml to point to your statsd instance:

Dino Grafana

Future features

  • The socket.io flask cluster only acts as the router of events,
  • Flask nodes sends events to kafka cluster,
  • Kafka cluster enriches streams with a timestamp and sequence id,
  • Flask nodes subscribe on certain streams, such as events to be broadcasted (e.g. messages in a chat room),
  • For other streams such as updating acls, managing rooms, user info, another application will subscribe and store maybe in a relational db,
  • An application will subscribe to the e.g. message streams to store data in cassandra.