• This repository has been archived on 18/Aug/2022
  • Stars
    star
    186
  • Rank 207,316 (Top 5 %)
  • Language
    JavaScript
  • License
    Apache License 2.0
  • Created over 8 years ago
  • Updated almost 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A new pattern for distributed system development

Metaparticle [This repo is old and deprecated, please visit https://metaparticle.io

NB: This work was an experiment. The ideas have moved on to a second implementation that you can find here:

About

Metaparticle is intended to radically simplify the process of building distributed systems. Metaparticle intends to remove much of the boilerplate associated with implementing and deploying common distributed system patterns. Metaparticle enables you to focus on your code, while allowing you to treat your architecture as code as well.

Metaparticle does this using a code as config approach to defining your infrastructure. This approach is intended to work with containerized applications regardless of the language in which those applications are written. Additionally, if you choose to code in Javascript, you can blend your code and your infrastructure in a single file.

Metaparticle works by defining service patterns, which you can instantiate via simple code. This code contains both the definition of your architecture as well as the implementation of the service itself.

Currently Metaparticle supports the following service patterns:

  • Scatter/Gather (aka Fan-Out/Fan-In)
  • Shard: Choose a replica based on a user-supplied sharding function
  • Spread: Spread load uniformly across all replicas

Without further ado, here are some examples:

Hello World

Prerequisites

Metaparticle is written for NodeJS, you need to have node and npm installed.

Instructions from NodeJS:

$ npm install metaparticle

If you want to run the Kubernetes examples below, then you also need a working Kubernetes cluster and kubectl configured correctly.

Walkthrough

There is a complete tutorial style walkthrough of the concepts behind metaparticle, starting here.

Distributed examples

The previous examples are fun, but they don't really deploy beyond a single machine. Here are instructions for using metaparticle to deploy to Kubernetes.

FAQ

Why?

Configuration and deployment has long been a central challenge of distributed system design and operations. Repeatedly people have taken the approach of defining domain specific languages (DSLs) and gradually transforming them into programming languages that are incomplete, hard to test, hard to read, lacking in idioms and proper tooling and many, many failings that make them challenging and brittle to use.

Instead, we take a code as config approach where we use a proper, fully functional idiomatic programming language as the basis for expressing the configuration of the system. Consequently, we can bring to bear the full set of tools available in that language, including: unit tests, code review, style guides, standard libraries and more. Imagine writing unit tests for your infrastructure!

Where are you going?

Plans include drinking more coffee. Also possibly writing more code.

In the off chance that I do write more code, it will likely be about the following things:

  • Incorporating services implemented in something other than node.js
  • Figuring out something about storage.

Can I help?

Absolutely! File issues, send PRs.

Can you tell me more about...?

For now you are going to have to look at the examples and read the code. More documentation is forthcoming.

More Repositories

1

designing-distributed-systems-labs

Labs for the Designing Distributed Systems book.
JavaScript
1,249
star
2

designing-distributed-systems

Sample code and configuration files from the Designing Distributed Systems book.
Python
904
star
3

gcp-live-k8s-visualizer

Source code for the Kubernetes visualizer used in the GCP Live Container Engine Demo
JavaScript
214
star
4

configula

Experimental configuration generator inspired by JSX
Go
140
star
5

ksql

Query Kubernetes API objects using SQL.
JavaScript
129
star
6

kbp-sample

Sample app for Kubernetes best practices book from O'Reilly
JavaScript
86
star
7

kubesanity

KubeSanity a sanity checking framework for Kubernetes
Python
84
star
8

kubernetes-adduser

Simple tool for adding users to Kubernetes clusters
Shell
49
star
9

py-k4a

python libraries for the kinect for Azure
C
46
star
10

cl-k8s

Common Lisp Client for Kubernetes
Common Lisp
33
star
11

kubectl-select

A simple plugin for kubectl that enables the selection of resources.
Go
24
star
12

topz

A simple utility for running 'top' as a webserver.
Go
19
star
13

arduino-air-quality-exporter

An exporter from Arduino to prometheus for Air Quality metrics.
C++
15
star
14

k8s-playbooks

Some ansible playbooks for managing my k8s cluster(s)
Shell
14
star
15

dns-sync

A declarative synchronization tool for managing cloud DNS records.
Go
11
star
16

caddy-wasm

WebAssembly (WASM) extension for the caddy2 web server.
Go
9
star
17

typescript

A Typescript client for Kubernetes
TypeScript
9
star
18

dotnet-dockerfile

Simple .NET core library for parsing and generating Dockerfiles
C#
9
star
19

kubernetes-teams

Kubernetes teams app
JavaScript
9
star
20

acs-ignite-demos

Demos for my sessions at ignite.
Shell
7
star
21

devops-days-seattle-2019

Demos from DevOps Days 2019
Shell
7
star
22

aci-bridge-k8s

Experimental ACI Bridge for Kubernetes
TypeScript
6
star
23

wazero-http

Module implementation of the wasi-http spec for wasi-go
Go
4
star
24

dev-wasm

[moved, see https://github.com/dev-wasm] Giant docker image to make wasm building easy.
Dockerfile
3
star
25

eraser

A simple daemon for ensuring that images are removed from a machine.
C#
3
star
26

air-quality-display

Arduino app for displaying air quality
C++
3
star
27

arc-prometheus

arc-prometheus
3
star
28

admission-control-sdk

Javascript SDK for building Kubernetes admission controllers [work in progress]
JavaScript
3
star
29

dapr-demo

Shell
3
star
30

vs-docker

A visual studio plugin for interacting with the Docker API (Build, Run, Stop)
JavaScript
3
star
31

container-survey

Questions to ask in the monthly container survey.
2
star
32

oss-canada-demos

Shell
2
star
33

k8s-community-survey

Docker image for analyzing kubernetes community survey data
Jupyter Notebook
2
star
34

client-java

Java client library for Kubernetes
Java
2
star
35

mongo-k8s

MongoDB configuration for Kubernetes
2
star
36

simple-node

JavaScript
1
star
37

mongoose-api

JavaScript
1
star
38

cloud-primitives

Cloud primitives for cloudy cloud
TypeScript
1
star
39

js-sdk

Actions SDK for Javascript
JavaScript
1
star
40

cri-base

A simple base application for implementing Kubernetes Container Runtime Interface Servers
Go
1
star
41

micropython-ota

Python
1
star
42

webinar

Shell
1
star
43

velocity-demos

HTML
1
star
44

drawing

TypeScript
1
star
45

acs-build-demos

Demos for the ACS build session
Shell
1
star
46

wasi-http-examples

Examples of using the WASI HTTP API in WebAssembly
1
star
47

wasi-http-ts

Experimental HTTP client for typescript and WebAssembly
TypeScript
1
star
48

hostname-server

Simple server that responds with path and hostname.
JavaScript
1
star
49

dev-wasm-dapr

TypeScript
1
star
50

azure-cloud-shell

TypeScript
1
star
51

ghc-feature

A DevContainer feature that installs the Glasgow Haskell Compiler
Shell
1
star
52

rabbitmq-arc

RabbitMQ Configuration for Azure Arc
1
star