All Projects → SocketCluster → plugins

SocketCluster / plugins

Licence: other
List of SocketCluster http://socketcluster.io plugins - Pull requests welcome.

Plugins

List of SocketCluster plugins/modules.

If you've built a frontend or backend plugin for SocketCluster, feel free to make a PR and share it with the community. The idea is that this repo will eventually turn into "a marketplace for SocketCluster plugins".

Clients drivers

The curated list of client drivers for SC is here: https://github.com/SocketCluster/client-drivers

Open source plugins

Presence

CRUD

Frontend

Backend

Protocol standardization

Codecs

Codecs are useful for compressing entire SC messages into another intermediary format before they are are sent over the wire - They are also responsible for decompressing messages back into their original SC protocol format when they arrive on the other side.

  • sc-codec-min-bin https://github.com/SocketCluster/sc-codec-min-bin - A codec for compressing SC messages into a minimal binary format before transmiting them over the wire. This is ideal for games and other high-throughput applications.
  • sc-codec-pbf https://github.com/sammccord/sc-codec-pbf - A codec for decoding and encoding protocol buffers, a compact binary format for structured data serialization. Extremely fast and light, but requires that you only send objects that can be encoded with a proto message you define at configuration time, or strings.

Broker engines

A broker engine is reponsible for sharing/synchronizing pub/sub channels (and optionally, data) between SC brokers. A broker engine is responsible for exposing an exchange object for interacting with message brokers on the backend. The API of different broker engines may vary.

Open source examples

Contribution guidelines

  • Make sure your plugin has a Github repo and a README.md file.
  • The name of your plugin (both frontend and backend) should start with sc-
  • Look at existing plugins above and try to follow conventions were possible.

Frontend

  • Publish to bower.
  • Other than that, it's whatever works; just keep it clean and documented!

Backend

  • Publish to npm

Your backend plugin should expose an attach(scObject[, options, callback]) method - The scObject argument should be an instance of one of the following classes: SocketCluster, SCWorker, SCServer, SCSocket or Broker. Right now, the user will have to attach your plugin manually to the appropriate scObject, but there are plans to automate this so that users will be able to install your plugin using a socketcluster install mypluginname command. The class of the scObject depends on which part of SC's architecture are affected:

If attached from master process server.js, scObject will be:

If attached from workerController worker.js, scObject will be one of:

If attached from brokerController broker.js, scObject will be:

Internally, your plugin should extend the functionality of the scObject provided.

You should use private events instead of public ones (where possible) to prevent the user from interfering with your plugin's logic. For example, use the '_handshake', '_connection', '_disconnection' and '_disconnect' events instead of their public counterparts 'handshake', 'connection', 'disconnection' and 'disconnect'...

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].