Presentation: Modeling the Real World With Elixir/OTP
This presentation is now available to view on InfoQ.com
Watch videoWhat You’ll Learn
-
Learn how actors are an easy way to model real world concurrency problems.
-
Hear PagerDuty’s use case for leveraging Elixir to build a highly scalable architecture.
-
Understand an approach to building concurrent systems that do not use shared memory and instead use a message passing paradigm.
Abstract
Building software that interacts with the real world is not as trivial as it sounds. When you build software that interacts with the real world, you have model your program to represent the real world. The traditional approach to modeling this is to model real-world events sequentially, one after the other. This falls in line with the von Neumann architecture of a computer where a CPU fetches one instruction at a time. In reality, this does not fit the real world. In the real world, an unimaginable number of events occur simultaneously. In fact, most programming languages used today, model the world in a sequential way, where one event happens at a time and failures and errors are an exception, not the norm. Elixir, a language built on top of the Erlang BEAM VM provides not only built in concurrency primitives but effective error handling that makes modeling the real world a natural exercise.
In this talk, I would provide the audience with a walkthrough of concurrency support and error handling in Elixir. This will be followed by a quick run-through of modeling a simple system and running a large number of concurrent BEAM processes along with graceful error handling behaviour.
What is the focus of your work today?
I work on event-based systems that leverage Elixir/OTP and quite a bit of Apache Kafka. My team is building a platform for enriching and processing high volumes of data in real time.
We’re working on what we call the event intelligence platform. Essentially, customers sent us all sorts of monitoring data including things like email integrations, legacy monitoring tools, and new monitoring tools. That can be several hundred thousand or even millions of events per second. Our systems are built and designed with this sort of scale in mind.
What’s the motivation for this talk?
The motivation is twofold. First, the actor model despite having been around for a while does not have as much adoption as shared-memory based traditional concurrency models. Therefore one of the motivating factors behind this talk to help the audience model a “real world” problem with Elixir’s actors (BEAM processes and OTP abstractions).
The second is to briefly touch on how Elixr and OTP provide clean abstractions around event-based modeling, briefly touching on event-sourcing. I hope to tie this back into the fact real-world problems are generally event based.
The talk is called Modeling the Real World With Elixir/OTP. Is it language talk or will you be talking things like event sourcing architectures with Elixir?
This is mostly a language talk. It’s really about how choosing a language helped us gain a better architecture. While I will be briefly touching on concepts like event sourcing, I’m really assuming the audience is familiar with it already. It’s really about how you can use OTP and Elixir (essentially anything built on top of Beam) to build concurrent systems.
How do you describe the persona and level of the target audience?
I would describe the target persona to be engineers familiar with the concepts of event sourcing and actor-model but not aware how Elixir or OTP provides such abstractions around it. Ideally, people from other senior backgrounds such as JVM based languages will be a good target.
What do you want this persona to walk away from your talk with?
The target persona should walk away with the feeling that actors are an easy way to model real-world concurrency problems and additionally feeling that Elixir makes a good fit for such problems.
What do you feel is the most important trend in software right now?
With the rise in log and event-based systems such as Apache Kafka, I feel that there is an industry-wide shift in modeling state as event sequences. I feel that this is a very important shift from the traditional way of persisting state.
Similar Talks
Scaling DB Access for Billions of Queries Per Day @PayPal
Software Engineer @PayPal
Petrica Voicu
Psychologically Safe Process Evolution in a Flat Structure
Director of Software Development @Hunter_Ind
Christopher Lucian
Not Sold Yet, GraphQL: A Humble Tale From Skeptic to Enthusiast
Software Engineer @Netflix
Garrett Heinlen
Let's talk locks!
Software Engineer @Samsara
Kavya Joshi
PID Loops and the Art of Keeping Systems Stable
Senior Principal Engineer @awscloud
Colm MacCárthaigh
Are We Really Cloud-Native?
Director of Technology @Luminis_eu
Bert Ertman
The Trouble With Learning in Complex Systems
Senior Cloud Advocate @Microsoft
Jason Hand
How Did Things Go Right? Learning More From Incidents
Site Reliability Engineering @Netflix
Ryan Kitchens
Graceful Degradation as a Feature
Director of Product @GremlinInc