Today I’ve released a project called gossiperl
. Gossiperl is a language agnostic gossip middleware written in Erlang. The purpose of the project was purely research on gossip based systems, as well as, learning Erlang.
Main intent was to create a common communication middleware enabled over gossip using a standard binary transport mechanism. Gossiperl is a result of over 6 months of research, reading, learning, planning and implementation. Gossiperl uses Apache Thrift binary serialisation over UDP. Gossiperl is intended for projects where order of delivery is not important and latency is acceptable. Intended projects require a messaging layer but not necessarily want to implement their own communication stack.
Gossiperl provides distributed subscriptions over gossip via UDP with Thrift digests secured with AES-256.
Gossiperl overlay contains a number of members — could be servers in a cluster. These servers do some common operations and the data has to be shared across the cluster. Every server within the cluster runs a gossiperl daemon. All servers connect over a gossip overlay. Application requiring exchanging the data connect to the local member and subscribe for a certain digest type. Other instances of same application connected to members on other nodes of a cluster (overlay) publish digests of expected type to gossip. The data is being forwarded across the overlay, only to the members that actually require receiving the data. Gossiperl is a presence mechanism and a message bus.
The main features of gossiperl:
- multiple overlays — adding / removing overlays at runtime
- reconfiguration at runtime
- presence mechanism
- distributed subscriptions with “at least once delivery” semantics
- every overlay secured using separate AES-256 symmetric key / iv combination
- local subscribers secured using subscriber specific secret
- language agnostic — uses Apache Thrift for all communication
- REST API with HTTPS and authentication provided
- statistics (using InfluxDB)
Being a research code and a subject of learning Erlang, gossiperl might not be the highest quality Erlang code in the wild. It is also not intended to be used in production environments. The work on gossiperl is ongoing.
Currently only the main codebase is available. Unit tests, end to end tests, client libraries for different languages and deployment / packaging tools will be released soon (it won’t be months). Most of these parts are written but need to be structured for shipping.
Additionally, there is development on providing communication across physical locations. This enables gossiperl to operate in a multi datacenter deployment, using RAFT consensus. Every seed of every overlay will elect an overlay leader, the leaders of different racks will exchange the data across locations.
I hope some find this stuff useful. If you do, please let me know! The code is available on github under MIT license. Some basic documentation / brain dump can be found in the github wiki. The main website of the project is at gossiperl.com. The list of work items, issues and bugs is at github issues.
It’s been fun building the basics. There’s more fun ahead.