AL Design Doc: Drafting the Abstract Machine for Elixir

Thanks, I think that’s enough for me to work on a minimal prototype based on my own understanding, then we can compare (and my efforts do not need to block anything).

I’d also then like to note a correspondence that I think will be important: in a system with partial information (where different participants can only see parts of the history), but some commitment to the history is fully public information, it should be possible to craft the event log operations in such a way that everyone can share a single event log, but the specific operations which they can perform (e.g. on which objects) are limited based on the information which is available to them. The “state structure” part of @vveiln’s post here provides a concordant picture of this overall structure.

Concretely, for example, we could build an event log on top of the current RM:

  1. Events are represented as resources.
  2. Appending to the event log ~ creating a resource.
  3. Reading from the event log ~ reading a previously created resource.
  4. Rules for when it is valid to append a particular event to the event log are enforced by resource logics (where the RM structure then allows these rules to be of the form “it is valid to append event X iff. events Y and Z exist in history and have not yet been marked as used”).

The RM structure then enforces that everyone can share an event log and that any appends to that log will follow the rules, even though different participants may have only partial information (which may limit which appends they can perform).

Representing operations on a particular object as a series of events (ordered subset of the event log) is a natural fit here, since it fits this form of rule (the previous version of an object can only be used to create the next version once) – this is (roughly) what we did with Goose.

My question for you here is then: what form of rules (for when certain appends to the event log are valid) have you been envisioning? Would this be (implicitly) defined by the rules of the abstract machine? I do think that we should have some notion of whether an event log is “valid” (which these rules would determine).

1 Like