Cluster Assembly. Modular middleware for distributed computing
CASM is short for Cluster Assembly. It is a low-level toolkit for developing efficient, reliable and secure distributed systems. It is entirely peer-to-peer and requires no coordinator nodes or other infrastructure. It is built using libp2p and integrates seamlessly into the Protocol Labs ecosystem.
CASM appeals to developers in search of firm ground on which to build distributed systems. It offers zero-cost abstractions1 that put you in control of trade-offs, while enforcing key properties of well-behaved systems.
In particular, the following invariants are preserved throughout the public API:
- Cluster membership is dynamic.
- Data is automatically signed and validated.
- Network protocols are partition-available and low-latency.
- Security is provided through Object Capabilities.
Users can stack additional guarantees in application logic. For example, you can build a consistent database out of CASM parts.
CASM follows a modular, "Lego bricks" design, allowing you to pick and choose the pieces you want.
Feature | Package | Description |
---|---|---|
RPC | pkg/ |
Fast & extensible RPC for communicating between nodes, with capability-based security. |
Bootstrap | pkg/boot |
Pluggable strategies for discovering and joining clusters. |
Peer Exchange | pkg/pex |
Lightweight gossip-based protocol for randomly sampling peers. Ideal for building caches. |
Clustering | pkg/cluster |
Unstructured service providing a global view of the cluster2. |
Run go get github.com/wetware/casm
with modules enabled.
The best place to get help is on Matrix, or by asking a question on the Wetware Q&A Board.
We're friendly! Drop in and say hi! 👋
Organizations using CASM in production
Blocknative |
- The term "zero-cost" is obviously a figure of speech, which is intended to emphasize the following point. As a matter of principle, CASM emphasizes "thin", non-leaky abstractions that do not significantly impact performance.
- In the spirit of zero-cost abstractions, CASM's clustering protocol provides PA/EL guarantees. No effort is made to provide a consistent view between nodes, because (a) it is rarely needed in practice, and (b) this configuration provides you with the greatest flexibility. CASM provides an ideal foundation on which to build more specialized (including consistent) systems.
- UnsServ: Unstructured Peer-to-Peer Services [pdf]