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
1
240
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
The Umbrella and the Range
whatyouhide
0
30
gen_statem - OTP's Unsung Hero
whatyouhide
2
290
BEAM: The Perfect Fit for Networks
whatyouhide
1
230
Update from the Elixir team - 2022
whatyouhide
0
440
Testing Asynchronous OTP
whatyouhide
1
540
Elixir Sightseeing Tour
whatyouhide
0
460
Mint - Disrupting HTTP clients
whatyouhide
0
280
BEAM Architecture Handbook
whatyouhide
7
2.9k
The Evolution of a Language
whatyouhide
0
180
Other Decks in Programming
See All in Programming
インターン生でもAuth0で認証基盤刷新が出来るのか
taku271
0
150
Grafana:建立系統全知視角的捷徑
blueswen
0
280
16年目のピクシブ百科事典を支える最新の技術基盤 / The Modern Tech Stack Powering Pixiv Encyclopedia in its 16th Year
ahuglajbclajep
5
760
クラウドに依存しないS3を使った開発術
simesaba80
0
220
AIによるイベントストーミング図からのコード生成 / AI-powered code generation from Event Storming diagrams
nrslib
2
1.3k
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
730
生成AI時代を勝ち抜くエンジニア組織マネジメント
coconala_engineer
0
39k
フロントエンド開発の勘所 -複数事業を経験して見えた判断軸の違い-
heimusu
7
2.5k
Canon EOS R50 V と R5 Mark II 購入でみえてきた最近のデジイチ VR180 事情、そして VR180 静止画に活路を見出すまで
karad
0
140
AtCoder Conference 2025
shindannin
0
930
AI時代を生き抜く 新卒エンジニアの生きる道
coconala_engineer
1
530
AI 駆動開発ライフサイクル(AI-DLC):ソフトウェアエンジニアリングの再構築 / AI-DLC Introduction
kanamasa
11
5.3k
Featured
See All Featured
Paper Plane
katiecoart
PRO
0
45k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
98
Leading Effective Engineering Teams in the AI Era
addyosmani
9
1.5k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
1
36
4 Signs Your Business is Dying
shpigford
187
22k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.2k
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
110
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
61
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
5.1k
Being A Developer After 40
akosma
91
590k
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!