Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Elixir - Exploring actor-based systems
Search
Michał Muskała
September 23, 2017
Programming
120
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Elixir - Exploring actor-based systems
Talk given at PartialConf 2017 in Sofia, Bulgaria
Michał Muskała
September 23, 2017
More Decks by Michał Muskała
See All by Michał Muskała
From Elixir to Erlang - Experience report
michalmuskala
0
87
What is the BEAM?
michalmuskala
0
140
Elixir & Ecosystem Update SF 2020
michalmuskala
0
54
Let there be light
michalmuskala
0
810
What actually is the BEAM?
michalmuskala
6
1.7k
Optimising for the BEAM
michalmuskala
2
790
Extending OTP with custom behaviours
michalmuskala
0
210
Abandoning models - embracing data
michalmuskala
0
300
Ecto - the past, the present, the future
michalmuskala
5
1.2k
Other Decks in Programming
See All in Programming
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
510
20260914 AIエージェント時代のPlatform Engineering LLM基盤とプロダクトの責務境界線
kanfab1
7
2.4k
技術的負債を組織課題として解く-増えすぎたマイクロサービスとの戦い-
reimaru
1
2.9k
iOS 27でニュースアプリはどう変わる!? 〜日経電子版の新機能対応と、開発事例から〜
lynnswap
7
13k
個人開発者よ、Honoを使え(おじさんver)
tanahiro2010
2
140
動作中のプログラムの中身をリアルタイムに覗く / Realtime Debugger for CSharp with Roslyn
prota
1
1.8k
UPDATE をやめる — EF Core でマスタをバージョン管理する
panda728
PRO
0
1.2k
AWSに止められる覚悟してますか?
morizo_1984
2
520
最近”作らせてる” ローカルAIアプリの話
akit37
0
410
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
510
SalesForceを内製化!? ~ HR事業を支える顧客管理基盤のインフラを大公開 ~
oku053
0
160
Apple Intelligence を用いた個人情報誤送信防止、及びユーザーリクエスト体験の改善について
yukiny
0
320
Featured
See All Featured
The SEO identity crisis: Don't let AI make you average
varn
0
580
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
340
Code Review Best Practice
trishagee
74
20k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.9k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
1
620
Everyday Curiosity
cassininazir
0
350
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
203
77k
エンジニアに許された特別な時間の終わり
watany
109
250k
How STYLIGHT went responsive
nonsquared
100
6.3k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
440
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
2
2k
Art, The Web, and Tiny UX
lynnandtonic
304
22k
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