{"id":13550687,"url":"https://github.com/lasp-lang/lasp","last_synced_at":"2025-10-04T16:30:55.239Z","repository":{"id":55075068,"uuid":"20682452","full_name":"lasp-lang/lasp","owner":"lasp-lang","description":"Prototype implementation of Lasp in Erlang.","archived":true,"fork":false,"pushed_at":"2021-03-02T15:30:15.000Z","size":34470,"stargazers_count":892,"open_issues_count":6,"forks_count":71,"subscribers_count":52,"default_branch":"master","last_synced_at":"2024-09-30T03:41:57.072Z","etag":null,"topics":["crdt","distributed-systems","erlang","lasp"],"latest_commit_sha":null,"homepage":"http://lasp-lang.org","language":"Erlang","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lasp-lang.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-06-10T11:12:41.000Z","updated_at":"2024-08-23T10:59:30.000Z","dependencies_parsed_at":"2022-08-14T11:20:09.664Z","dependency_job_id":null,"html_url":"https://github.com/lasp-lang/lasp","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lasp-lang%2Flasp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lasp-lang%2Flasp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lasp-lang%2Flasp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lasp-lang%2Flasp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lasp-lang","download_url":"https://codeload.github.com/lasp-lang/lasp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235274286,"owners_count":18963889,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["crdt","distributed-systems","erlang","lasp"],"created_at":"2024-08-01T12:01:36.238Z","updated_at":"2025-10-04T16:30:48.957Z","avatar_url":"https://github.com/lasp-lang.png","language":"Erlang","readme":"Lasp\n=======================================================\n\n[![Build Status](https://travis-ci.org/lasp-lang/lasp.svg?branch=master)](https://travis-ci.org/lasp-lang/lasp)\n\n## Overview\n\nLasp is a programming model for synchronization-free computations.\n\n## Installing\n\nLasp requires Erlang 19 or greater.  Once you have Erlang installed, do\nthe following to install and build Lasp.\n\n```\n$ git clone git@github.com:lasp-lang/lasp.git\n$ cd lasp\n$ make\n```\n\n## Creating a small cluster\nClone Lasp:\n```\n$ git clone https://github.com/lasp-lang/lasp.git\n```\n\nRun two shells\n```\n$ rebar3 shell --name a@127.0.0.1\n$ rebar3 shell --name b@127.0.0.1\n```\n\nExceute to node a:\n```erlang\n1\u003e lasp_peer_service:join('a@127.0.0.1').\nok\n2\u003e lasp_peer_service:members().\n{ok,['a@127.0.0.1','b@127.0.0.1']}\n```\n\nExecute node b:\n```erlang\n1\u003e lasp_peer_service:members().\n{ok,['a@127.0.0.1','b@127.0.0.1']}     \n```\n\nGo back to node a and run:\n```erlang\n3\u003e Content = #{what =\u003e i_am_an_awmap_value}.\n\n% create a lasp CRDT\nAwMapVarName = \u003c\u003c\"awmap\"\u003e\u003e.\nKey1 = \u003c\u003c\"key1\"\u003e\u003e.\nAwMapType = {state_awmap, [state_mvregister]}.\n{ok, {AwMap, _, _, _}} = lasp:declare({AwMapVarName, AwMapType}, AwMapType).\n\n% Update the CRDT with the content\n{ok, _} = lasp:update(AwMap, {apply, Key1, {set, nil, Content}}, term_to_binary(self())).\n```\n\nGo to node b and retrieve the content of the CRDT:\n```erlang\n2\u003e {ok,[{_, AwMapSet}]} = lasp:query({\u003c\u003c\"awmap\"\u003e\u003e,{state_awmap,[state_mvregister]}}).\n\n3\u003e sets:to_list(AwMapSet).\n% [#{what =\u003e i_am_an_awmap_value}]\n```\n\n## Running a shell\n\nYou can run a Erlang shell where you can interact with a Lasp node by\ndoing the following:\n\n```\n$ make shell\n```\n\n## Running the test suite\n\nTo run the test suite, which will execute all of the Lasp scenarios, use\nthe following command.\n\n```bash\n$ make check\n```\n\n## Notes\n\nIf using the Distributed Erlang backend, make sure that all nodes are configured to use the same cookie.\n\n## Code examples\n\n[This blog post](http://marianoguerra.org/posts/playing-with-lasp-and-crdts.html) by [@marianoguerra](https://github.com/marianoguerra) contains concise sample code.\n","funding_links":[],"categories":["Erlang","others"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flasp-lang%2Flasp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flasp-lang%2Flasp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flasp-lang%2Flasp/lists"}