casm

module
v0.0.0-...-055f8da Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 20, 2023 License: Apache-2.0, MIT

README

🧬 CASM

Cluster Assembly. Modular middleware for distributed computing

GoDoc Go Report Card Go Matrix

What is CASM?

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.

Design

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:

  1. Cluster membership is dynamic.
  2. Data is automatically signed and validated.
  3. Network protocols are partition-available and low-latency.
  4. 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.

Features

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.

Getting Started

Installation

Run go get github.com/wetware/casm with modules enabled.

Getting Support

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! 👋

CASM Users

Organizations using CASM in production

Blocknative
Blocknative

Contributors

Footnotes

  1. 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.
  2. 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.

References

  • UnsServ: Unstructured Peer-to-Peer Services [pdf]

Directories

Path Synopsis
cmd
internal
mock
Package mock contains mockgen targets from external dependencies.
Package mock contains mockgen targets from external dependencies.
mock/libp2p
Package mock_libp2p is a generated GoMock package.
Package mock_libp2p is a generated GoMock package.
mock/net
Package mock_net is a generated GoMock package.
Package mock_net is a generated GoMock package.
mock/pkg
Package mock_casm is a generated GoMock package.
Package mock_casm is a generated GoMock package.
mock/pkg/cluster
Package mock_cluster is a generated GoMock package.
Package mock_cluster is a generated GoMock package.
mock/pkg/cluster/pulse
Package mock_pulse is a generated GoMock package.
Package mock_pulse is a generated GoMock package.
mock/pkg/cluster/routing
Package mock_routing is a generated GoMock package.
Package mock_routing is a generated GoMock package.
mock/pkg/cluster/view
Package mock_view is a generated GoMock package.
Package mock_view is a generated GoMock package.
mock/pkg/socket
Package mock_socket is a generated GoMock package.
Package mock_socket is a generated GoMock package.
util/log
Package logutil contains shared utilities for configuring loggers from a cli context.
Package logutil contains shared utilities for configuring loggers from a cli context.
pkg
boot/socket
Package socket implements signed sockets for bootstrap services.
Package socket implements signed sockets for bootstrap services.
boot/util
Package bootutil provides utilities for parsing and instantiating boot services
Package bootutil provides utilities for parsing and instantiating boot services
cluster
Package cluster exports an asynchronously updated model of the swarm.
Package cluster exports an asynchronously updated model of the swarm.
cluster/pulse
Package pulse provides ev cluster-management service based on pubsub.
Package pulse provides ev cluster-management service based on pubsub.
internal/mock/pkg/cluster
Package mock_cluster is a generated GoMock package.
Package mock_cluster is a generated GoMock package.
pex
socket
Package socket implements signed datagram sockets.
Package socket implements signed datagram sockets.
stm
Package stm implements software-transactional memory (STM).
Package stm implements software-transactional memory (STM).
util/proto
Package protoutil contains utilities for working with libp2p's protocol.ID.
Package protoutil contains utilities for working with libp2p's protocol.ID.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL