Skip to content

Add Erlang as example to process isolation (Isolate Mutations) #18

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/modules/patterns/pages/isolate-mutations.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ Bulkheads are most easily installed by having the compartments communicate using

Only use mutable state for local computations, within the _consistency boundary_ of the bulkheaded component—a _unit of consistency_ that provides a safe haven for mutations, completely unobservable by the rest of the world. When the component is done with the local processing and ready to tell the world about its results, then it creates an immutable value representing the result—a _fact_— and publishes it to the world.

The bulkheaded components should ideally use single-threaded execution to simplify the programming model and avoid concurrency-related problems such as deadlocks, race conditions, and corrupt data. For example, https://nodejs.org/[Node.js] https://nodejs.org/[{tab}, window="new tab"], https://akka.io/[Akka] https://akka.io/[{tab}, window="new tab"], https://lmax-exchange.github.io/disruptor/[Disruptor] https://lmax-exchange.github.io/disruptor/[{tab}, window="new tab"], or implementation of the https://en.wikipedia.org/wiki/Reactor_pattern[Reactor] https://en.wikipedia.org/wiki/Reactor_pattern[{tab}, window="new tab"] Pattern and its variants offer this functionality.
The bulkheaded components should ideally use single-threaded execution to simplify the programming model and avoid concurrency-related problems such as deadlocks, race conditions, and corrupt data. For example, https://nodejs.org/[Node.js] https://nodejs.org/[{tab}, window="new tab"], https://www.erlang.org/[Erlang/OTP] https://www.erlang.org/[{tab}, window="new tab"], https://akka.io/[Akka] https://akka.io/[{tab}, window="new tab"], https://lmax-exchange.github.io/disruptor/[Disruptor] https://lmax-exchange.github.io/disruptor/[{tab}, window="new tab"], or implementation of the https://en.wikipedia.org/wiki/Reactor_pattern[Reactor] https://en.wikipedia.org/wiki/Reactor_pattern[{tab}, window="new tab"] Pattern and its variants offer this functionality.

In this model, others can rely on stable and immutable values for their reasoning, whereas each component can internally still safely benefit from the advantages of mutability (like the simplicity of coding and algorithmic efficiency), strong consistency (providing https://en.wikipedia.org/wiki/ACID[ACID] https://en.wikipedia.org/wiki/ACID[{tab}, window="new tab"] semantics), and reduced coordination and contention (through the https://mechanical-sympathy.blogspot.com/2011/09/single-writer-principle.html[Single Writer Principle] https://mechanical-sympathy.blogspot.com/2011/09/single-writer-principle.html[{tab}, window="new tab"]).
In this model, others can rely on stable and immutable values for their reasoning, whereas each component can internally still safely benefit from the advantages of mutability (like the simplicity of coding and algorithmic efficiency), strong consistency (providing https://en.wikipedia.org/wiki/ACID[ACID] https://en.wikipedia.org/wiki/ACID[{tab}, window="new tab"] semantics), and reduced coordination and contention (through the https://mechanical-sympathy.blogspot.com/2011/09/single-writer-principle.html[Single Writer Principle] https://mechanical-sympathy.blogspot.com/2011/09/single-writer-principle.html[{tab}, window="new tab"]).