WorryFree Computers »
Address
:
[go:
up one dir
,
main page
]
Include Form
Remove Scripts
Accept Cookies
Show Images
Show Referer
Rotate13
Base64
Strip Meta
Strip Title
Session Cookies
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
The World is a Network (and We Are Just Nodes)
Search
Andrea Leopardi
May 11, 2024
Programming
0
120
The World is a Network (and We Are Just Nodes)
Slides for my Gig City Elixir 2024 talk.
Andrea Leopardi
May 11, 2024
Tweet
Share
More Decks by Andrea Leopardi
See All by Andrea Leopardi
BEAM: The Perfect Fit for Networks
whatyouhide
1
130
Update from the Elixir team - 2022
whatyouhide
0
330
Testing Asynchronous OTP
whatyouhide
0
450
Elixir Sightseeing Tour
whatyouhide
0
340
Mint - Disrupting HTTP clients
whatyouhide
0
200
BEAM Architecture Handbook
whatyouhide
7
2.5k
The Evolution of a Language
whatyouhide
0
110
Elixir - functional, concurrent, distributed programming for the rest of us
whatyouhide
2
290
Papers we love: Elixir edition
whatyouhide
5
990
Other Decks in Programming
See All in Programming
multipart/form-dataの省メモリパース / Go Conference 2024 Pre Party #gocon24_preparty
mazrean
0
270
Spring Bootと行レベルセキュリティではじめるマルチテナントアーキテクチャ / Multi-tenant architecture using Row-Level Security
jaguar_imo
1
290
詳解 "Fixing For Loops in Go 1.22" 自作linterをgolangci-lintへコントリビュートした話
qualiarts
8
750
イベント駆動アーキテクチャ導入の手引きと共通の落とし穴 / Guide to Implementing Event-Driven Architecture and Common Pitfalls
nrslib
6
1k
KotlinConf 2024
feliciafaye
0
200
『改訂新版前処理大全』の話と Apache Parquet の話 #TokyoR
bob3bob3
0
170
Make CPU #3 dalance
dalance
1
440
LTのやり方
yosuke_furukawa
PRO
13
1.6k
freeeにおけるSecurity Championの仕事
otyamura
0
420
TypeScriptを活用したi18n対応
minako__ph
8
1.5k
Android アプリのプロジェクトをモダンにし続ける工夫
numeroanddev
1
300
いまどきの分析設計パターン10選
masuda220
PRO
18
5.2k
Featured
See All Featured
Intergalactic Javascript Robots from Outer Space
tanoku
266
26k
WebSockets: Embracing the real-time Web
robhawkes
59
7.1k
Optimising Largest Contentful Paint
csswizardry
14
2.5k
10 Git Anti Patterns You Should be Aware of
lemiorhan
650
58k
Atom: Resistance is Futile
akmur
260
25k
Building Flexible Design Systems
yeseniaperezcruz
321
37k
ParisWeb 2013: Learning to Love: Crash Course in Emotional UX Design
dotmariusz
104
6.7k
Keith and Marios Guide to Fast Websites
keithpitt
408
22k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
23
1.5k
RailsConf 2023
tenderlove
11
630
Clear Off the Table
cherdarchuk
87
310k
How STYLIGHT went responsive
nonsquared
92
4.9k
Transcript
None
ANDREALEOPARDI.COM @WHATYOUHIDE
None
@ITALIANCOMMENTS ITALIANS MAD AT FOOD
None
None
None
None
None
None
None
NETWORK PROGRAMMING
None
BANANA 1 BANANA 2 A = TRUE YO, A IS
TRUE GOTCHA
BANANA 1 BANANA 2 A = TRUE YO, A IS
TRUE GOTCHA X
PERSON 1 PERSON 2 A = TRUE YO, A IS
TRUE GOTCHA X
PROCESS 1 PERSON 2 A = TRUE YO, A IS
TRUE GOTCHA X
PROCESS 1 PERSON 2 A = TRUE YO, A IS
TRUE GOTCHA X
None
CLIENT SERVER
DISTSYS 101
CABLES WAVES
BEAM
MSG1 MSG2
MSG1 MSG2
NODE NODE
NODE NODE
MSG ACK
ref = make_ref() send(dest_pid, {ref, self(), msg}) receive do {^ref,
response} -> # ... end receive do {ref, sender_pid, msg} -> response = act_on_message(msg) send(sender_pid, {ref, response}) end
ref = make_ref() send(dest_pid, {ref, self(), msg}) receive do {^ref,
response} -> # ... after 1000 -> :timeout end receive do {ref, sender_pid, msg} -> response = act_on_message(msg) send(sender_pid, {ref, response}) end
None
:gen_tcp.send(socket, "Hello world") {:ok, data} = :gen_tcp.recv(socket, 0, _timeout =
1000) {:ok, data} = :gen_tcp.recv(socket, 0) response = process_request(data) :gen_tcp.send(socket, response)
:gen_tcp.send(socket, "Hello world") receive do {:tcp, ^socket, response} -> #
... after 1000 -> :timeout end receive do {:tcp, socket, data} -> response = process_request(data) :gen_tcp.send(socket, response) end
GENSERVER.CALL/3
None
SERVERS
CLIENT CLIENT
REACTIVE
None
None
SUPERVISORS
None
None
CLIENTS
GEN_STATEM
None
IT'S ABOUT THE GUARANTEES
RESTARTING A PROCESS IS ABOUT BRINGING IT BACK TO A
STABLE, KNOWN STATE. FROM THERE, THINGS CAN BE RETRIED. WHEN THE INITIALIZATION ISN'T STABLE, SUPERVISION IS WORTH VERY LITTLE.
LET IT CRASH™? ...NO
PATTERN MATCHING BINARIES
<<message_id::binary-size(2), qr::1, opcode::4, flag_aa::1, flag_tc::1, flag_rd::1, flag_ra::1, _reserved::3, rcode::4, qd_count::16,
an_count::16, ns_count::16, ar_count::16, answer::binary>> = dns_packet
WHY IS THE BEAM SUCH A GREAT FIT?
None
- ERLANG BLOG POST ABOUT MESSAGE PASSING - MY BLOG
POST ON TCP CONNECTIONS IN ELIXIR - MY BLOG POST ON GEN_STATEM CONNECTIONS - "IT'S ALL ABOUT THE GUARANTEES" BY FRED HEBERT - THOUSAND ISLANDS ELIXIR LIBRARY - END-TO-END ARGUMENTS IN SYSTEM DESIGN PAPER - BINARY PATTERN MATCHING REFERENCE
@WHATYOUHIDE THANK YOU!