All Projects → lasp-lang → Lasp

lasp-lang / Lasp

Licence: apache-2.0
Prototype implementation of Lasp in Erlang.

Programming Languages

erlang
1774 projects

Projects that are alternatives of or similar to Lasp

Cause
An EDN-like CRDT (Causal Tree) for Clojure & ClojureScript that automatically tracks history and resolves conflicts.
Stars: ✭ 68 (-92.24%)
Mutual labels:  crdt, distributed-systems
rdoc
Conflict-free replicated JSON implementation in native Go
Stars: ✭ 76 (-91.32%)
Mutual labels:  distributed-systems, crdt
Crdt
CRDT Tutorial for Beginners (a digestible explanation with less math!)
Stars: ✭ 167 (-80.94%)
Mutual labels:  crdt, distributed-systems
sworm
A user-friendly distributed process registry and process supervisor
Stars: ✭ 20 (-97.72%)
Mutual labels:  distributed-systems, crdt
Crdt Playground
Stars: ✭ 215 (-75.46%)
Mutual labels:  crdt, distributed-systems
Rust Crdt
a collection of well-tested, serializable CRDTs for Rust
Stars: ✭ 747 (-14.73%)
Mutual labels:  crdt, distributed-systems
Lizardfs
LizardFS is an Open Source Distributed File System licensed under GPLv3.
Stars: ✭ 793 (-9.47%)
Mutual labels:  distributed-systems
Construct
JavaScript Digital Organisms simulator
Stars: ✭ 17 (-98.06%)
Mutual labels:  distributed-systems
Hemera
🔬 Writing reliable & fault-tolerant microservices in Node.js https://hemerajs.github.io/hemera/
Stars: ✭ 773 (-11.76%)
Mutual labels:  distributed-systems
Awesome Distributed Systems
A curated list to learn about distributed systems
Stars: ✭ 7,263 (+729.11%)
Mutual labels:  distributed-systems
Ddia
《Designing Data-Intensive Application》DDIA中文翻译
Stars: ✭ 10,458 (+1093.84%)
Mutual labels:  distributed-systems
Trek
Trek is a CLI/ncurses explorer for HashiCorp Nomad clusters.
Stars: ✭ 26 (-97.03%)
Mutual labels:  distributed-systems
Microservices Connector
Inter-Service communication framework, support for microservice architecture and distributed system
Stars: ✭ 17 (-98.06%)
Mutual labels:  distributed-systems
Kingbus
A distributed MySQL binlog storage system built on Raft
Stars: ✭ 798 (-8.9%)
Mutual labels:  distributed-systems
Uav coverage
Simulation for planar area coverage by a swarm of UAVs
Stars: ✭ 17 (-98.06%)
Mutual labels:  distributed-systems
Titanoboa
Titanoboa makes complex workflows easy. It is a low-code workflow orchestration platform for JVM - distributed, highly scalable and fault tolerant.
Stars: ✭ 787 (-10.16%)
Mutual labels:  distributed-systems
Vearch
A distributed system for embedding-based retrieval
Stars: ✭ 940 (+7.31%)
Mutual labels:  distributed-systems
Eventsourcing
A library for event sourcing in Python.
Stars: ✭ 760 (-13.24%)
Mutual labels:  distributed-systems
Blockade
Docker-based utility for testing network failures and partitions in distributed applications
Stars: ✭ 834 (-4.79%)
Mutual labels:  distributed-systems
Blog
my blog, using markdown
Stars: ✭ 25 (-97.15%)
Mutual labels:  distributed-systems

Lasp

Build Status

Overview

Lasp is a programming model for synchronization-free computations.

Installing

Lasp requires Erlang 19 or greater. Once you have Erlang installed, do the following to install and build Lasp.

$ git clone [email protected]:lasp-lang/lasp.git
$ cd lasp
$ make

Creating a small cluster

Clone Lasp:

$ git clone https://github.com/lasp-lang/lasp.git

Run two shells

$ rebar3 shell --name [email protected]
$ rebar3 shell --name [email protected]

Exceute to node a:

1> lasp_peer_service:join('[email protected]').
ok
2> lasp_peer_service:members().
{ok,['[email protected]','[email protected]']}

Execute node b:

1> lasp_peer_service:members().
{ok,['[email protected]','[email protected]']}     

Go back to node a and run:

3> Content = #{what => i_am_an_awmap_value}.

% create a lasp CRDT
AwMapVarName = <<"awmap">>.
Key1 = <<"key1">>.
AwMapType = {state_awmap, [state_mvregister]}.
{ok, {AwMap, _, _, _}} = lasp:declare({AwMapVarName, AwMapType}, AwMapType).

% Update the CRDT with the content
{ok, _} = lasp:update(AwMap, {apply, Key1, {set, nil, Content}}, term_to_binary(self())).

Go to node b and retrieve the content of the CRDT:

2> {ok,[{_, AwMapSet}]} = lasp:query({<<"awmap">>,{state_awmap,[state_mvregister]}}).

3> sets:to_list(AwMapSet).
% [#{what => i_am_an_awmap_value}]

Running a shell

You can run a Erlang shell where you can interact with a Lasp node by doing the following:

$ make shell

Running the test suite

To run the test suite, which will execute all of the Lasp scenarios, use the following command.

$ make check

Notes

If using the Distributed Erlang backend, make sure that all nodes are configured to use the same cookie.

Code examples

This blog post by @marianoguerra contains concise sample code.

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].