Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Elixir - Exploring actor-based systems
Search
Michał Muskała
September 23, 2017
Programming
1
110
Elixir - Exploring actor-based systems
Talk given at PartialConf 2017 in Sofia, Bulgaria
Michał Muskała
September 23, 2017
Tweet
Share
More Decks by Michał Muskała
See All by Michał Muskała
From Elixir to Erlang - Experience report
michalmuskala
0
73
What is the BEAM?
michalmuskala
0
93
Elixir & Ecosystem Update SF 2020
michalmuskala
0
43
Let there be light
michalmuskala
0
770
What actually is the BEAM?
michalmuskala
6
1.7k
Optimising for the BEAM
michalmuskala
2
750
Extending OTP with custom behaviours
michalmuskala
0
170
Abandoning models - embracing data
michalmuskala
0
260
Ecto - the past, the present, the future
michalmuskala
5
1.2k
Other Decks in Programming
See All in Programming
gunshi
kazupon
1
140
Graviton と Nitro と私
maroon1st
0
180
KIKI_MBSD Cybersecurity Challenges 2025
ikema
0
1.2k
CSC307 Lecture 05
javiergs
PRO
0
490
AIフル活用時代だからこそ学んでおきたい働き方の心得
shinoyu
0
110
例外処理とどう使い分ける?Result型を使ったエラー設計 #burikaigi
kajitack
16
5.8k
AIエージェント、”どう作るか”で差は出るか? / AI Agents: Does the "How" Make a Difference?
rkaga
4
1.9k
LLM Observabilityによる 対話型音声AIアプリケーションの安定運用
gekko0114
2
400
2026年 エンジニアリング自己学習法
yumechi
0
110
AIによるイベントストーミング図からのコード生成 / AI-powered code generation from Event Storming diagrams
nrslib
2
1.7k
フルサイクルエンジニアリングをAI Agentで全自動化したい 〜構想と現在地〜
kamina_zzz
0
390
開発者から情シスまで - 多様なユーザー層に届けるAPI提供戦略 / Postman API Night Okinawa 2026 Winter
tasshi
0
160
Featured
See All Featured
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.8k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
61
A Soul's Torment
seathinner
5
2.2k
Designing for Timeless Needs
cassininazir
0
120
A Tale of Four Properties
chriscoyier
162
24k
Writing Fast Ruby
sferik
630
62k
Java REST API Framework Comparison - PWX 2021
mraible
34
9.1k
The Cost Of JavaScript in 2023
addyosmani
55
9.4k
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
75
Raft: Consensus for Rubyists
vanstee
141
7.3k
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
55
49k
Music & Morning Musume
bryan
47
7k
Transcript
ELIXIR Exploring actor-based systems
ELIXIR Exploring actor-based systems The good parts
THE COMMUNITY
None
MICHAŁ MUSKAŁA http://michal.muskala.eu/ https://github.com/michalmuskala/ @michalmuskala
http://omt.tech/ Orther Mulelid-Tynes Technology, Inc.
THE MODERN COMPUTING
None
None
ACTOR MODEL
Actor Model Communicating Sequential Processes π-calculus Software Transactional Memory
None
FUNCTIONAL PROGRAMMING
• Explicit state • Transformation instead of mutation
– José Valim “Functional programming is associated with concurrency but
it was not by design. It just happens that, by making the complex parts of our system explicit, solving more complicated issues like concurrency becomes much simpler.”
None
None
Switch Switch
Server Server Browser Endpoints Mobile
None
2 MILLION CONNECTIONS on a single server https://blog.whatsapp.com/196/1-million- is-so-2011
None
None
http://www.phoenixframework.org/blog/the-road-to-2-million-websocket-connections
ELIXIR CONCURRENT FUNCTIONAL
Sequential code
Sequential code Functional code
None
x1 = async_func1() x2 = async_func2(x1) x3 = async_func3(x2) x4
= async_func4(x3) x5 = async_func5(x4) x6 = async_func6(x5)
async_func1() |> async_func2() |> async_func3() |> async_func4() |> async_func5() |>
async_func6()
None
None
OTP
DB Web Mailer Websockets
DB Web Mailer Websockets Supervisor
Application
None
None
app1@node1 app1@node2
– Joe Armstrong “We do not have ONE web-server handling
2 millions sessions. We have 2 million webservers handling one session each.”
GOALS OF ELIXIR
THE GOALS OF ELIXIR • COMPATIBILITY • EXTENSIBILITY • PRODUCTIVITY
None
THE GOALS OF ELIXIR • COMPATIBILITY • EXTENSIBILITY • PRODUCTIVITY
THE GOALS OF ELIXIR • COMPATIBILITY • EXTENSIBILITY • PRODUCTIVITY
• PRODUCTIVITY • MAINTAINABILITY • RELIABILITY
COMPATIBILITY
https://elixir-lang.org/crash-course.html
EXTENSIBILITY
defmodule Test do use ExUnit.Case, async: true test "math works"
do assert 1 + 2 == 2 end end
None
from w in Weather, where: w.prcp <= 0.0 or is_nil(w.prcp),
order_by: w.city, select: w
defmacro if(condition, clauses) do optimize_boolean(quote do case unquote(condition) do x
when x in [false, nil] -> unquote(else_clause) _ -> unquote(do_clause) end end) end
PRODUCTIVITY
None
None
None
None
HEXDOCS • https://hexdocs.pm/elixir/String.html • https://hexdocs.pm/elixir/1.5.0/String.html • https://hexdocs.pm/phoenix/Phoenix.Channel.html • https://hexdocs.pm/phoenix/1.2.0/Phoenix.Channel.html
None
None
None
None
None
DEMO
MAINTAINABILITY
RELIABILITY
HOW DO I START?
elixir-lang.org
None
None
• http://elixir-lang.org • http://www.erlang.org • http://nerves-project.com • http://www.phoenixframework.org/
ELIXIR Exploring actor-based systems
None