[erlang-questions] Considering a Generic Transaction System in Erlang

Jesper Louis Andersen jesper.louis.andersen@REDACTED
Tue Oct 20 12:53:58 CEST 2015

On Fri, Oct 9, 2015 at 12:07 AM, Jörgen Brandt <brandjoe@REDACTED>

> Consider an application (with transient software faults),
> processing user queries.

I think this is the central point of the mail. One of the usual Erlang
approaches is to rely on stable storage and checkpointing for these kinds
of work units.

Stable storage means that you can write to disk, sync data, and then you
have a linearizable point in time after which data are safe on the disk and
can be re-read.

Checkpointing means to track on stable storage whenever the system reaches
some safe invariant state.

In order to make sure progress happens, even under the possibility of
transient errors, one must figure out how to checkpoint invariant state
such that it can be recovered. In some cases, you don't need truly
persistent storage, but can simply ship the state to another process, or
even system.

The other ingredient you need is that of idempotent operations. That is,
you can rerun an operation/subtask and it will produce the same result as
before, or it will return early with the answer if the answer is already
evaluated and cached.

Given these two ingredients, you don't need to use transactions. You just
reinject unfulfilled obligations into the system and you track which
obligations that deadline.

A project like Apache Storm implements this workflow, and I'm 99% sure a
lot of Erlang projects exist for this, though the names eludes me right now.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20151020/49751ef6/attachment.htm>

More information about the erlang-questions mailing list