Erleans is a framework for building distributed applications in Erlang and Elixir based on Microsoft Orleans.
Rebar3 3.13.0 or above or Elixir 1.9+. Easiest way to get the latest Rebar3:
$ rebar3 local upgrade
...
$ export PATH=~/.cache/rebar3/bin:$PATH
Stateful grains are backed by persistent storage and referenced by a primary key set by the grain. An activation of a grain is a single Erlang process in on an Erlang node (silo) in an Erlang cluster. Activation placement is handled by Erleans and communication is over standard Erlang distribution. If a grain is sent a message and does not have a current activation one is spawned.
Grain state is persisted through a database provider with an always increasing change id or etag. If the change id or etag has been by another activation the activation attempting to save state will stop.
Activations are registered through lasp_pg.
Stateless grains have no restriction on the number of activations and do not persist state to a database.
Stateless grain activations are pooled through sbroker while being counted by a gproc resource counter. This allows for the use of sbroker to select an activation if available and to create a new activation if none were available immediately and the number currently activated is less than the max allowed.
Timers that are associated with a grain, meaning if a grain is not active but a reminder for that grain ticks the grain is activated at that time and the reminder is delivered.
Processes can subscribe to grains to receive notifications for grain specific events. If a grain supports observers a group is created through lasp_pg
that observers are added to and to which notifications are sent.
Interface that must be implemented for any persistent store to be used for grains.
Streams have a provider type as well for providing a pluggable stream layer.