Skip to content

Proof of concept of the Process-Oriented Programming paradigm using Elixir OTP. Using GenStage, every process is an OTP supervision tree to ensure that the processes are restared on failure.

Notifications You must be signed in to change notification settings

ethanvaughn/soa-concept

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

soa-concept

Proof of concept of the Process-Oriented Programming paradigm employed by Elixir OTP. Using GenStage, every process is an OTP supervision tree to ensure that the processes are restarted on failure.

The key to this concept is to implement the Service-oriented architecture (SOA) between two services. This is particularly enabled by Elixir and OTP.

From the article "A Guide to Process-oriented Programming in Elixir and OTP" by Michael Latta:

The use of separate processes to receive [data] allows each [piece of data] to be received independent of any other [piece of data], logged upon receipt, and batched to the next set of processes, reducing load on those systems significantly. For a system that consumes a large amount of data, reducing the volume of data by use of layers of processes is a common and useful pattern.

By performing the computation in an isolated set of processes, we can manage the load on those processes and ensure their stability and resource requirements.

By placing the result presentation in an isolated set of processes, we both control load to the rest of the system and allow the set of processes to be scaled dynamically for load.

From the article "Supervison trees and applications" in the Elixir Hexdocs:

Elixir developers tend to refer to those practices as "defensive programming". That's because a live production system has dozens of different reasons why something can go wrong. The disk can fail, memory can be corrupted, bugs, the network may stop working for a second, etc. If we were to write software that attempted to protect or circumvent all of those errors, we would spend more time handling failures than writing our own software!

About

Proof of concept of the Process-Oriented Programming paradigm using Elixir OTP. Using GenStage, every process is an OTP supervision tree to ensure that the processes are restared on failure.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages