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
The World is a Network (and We Are Just Nodes)
Search
Andrea Leopardi
May 11, 2024
Programming
270
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
The World is a Network (and We Are Just Nodes)
Slides for my Gig City Elixir 2024 talk.
Andrea Leopardi
May 11, 2024
More Decks by Andrea Leopardi
See All by Andrea Leopardi
Agentic Elixir
whatyouhide
0
630
The Umbrella and the Range
whatyouhide
0
76
gen_statem - OTP's Unsung Hero
whatyouhide
2
370
BEAM: The Perfect Fit for Networks
whatyouhide
1
280
Update from the Elixir team - 2022
whatyouhide
0
470
Testing Asynchronous OTP
whatyouhide
1
590
Elixir Sightseeing Tour
whatyouhide
0
510
Mint - Disrupting HTTP clients
whatyouhide
0
320
BEAM Architecture Handbook
whatyouhide
7
3.1k
Other Decks in Programming
See All in Programming
プロジェクトコードをキレイキレイしよう!暗黙的な参照を読み解く静的解析
ostk0069
0
190
Spec-Driven Development - Why Vaadin Is the Perfect Fit
simas
PRO
0
180
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
500
sbt 2.0: takeoff
eed3si9n
0
180
Vue.jsで作る空間解析アプリとCapacitorプラグインのData Bridge
hal_spidernight
1
130
Seven New Principles of Software Engineering
yegor256
0
380
Compiling a real-world CLI tool to native with Static Hermes
tmikov2023
0
140
ChromeでローカルLLM
ryu1013
0
180
Kotlinの15年とServer-Side Kotlin
n_takehata
1
170
Railsバージョンを4倍にした話
optim
0
840
エージェントを使い続けるためのメタワーク / Meta-work for keeping using the agent
rkaga
6
2k
LLM 101
dalinaum
0
360
Featured
See All Featured
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
56
3.5k
Ruling the World: When Life Gets Gamed
codingconduct
0
430
Odyssey Design
rkendrick25
PRO
2
900
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.5k
Paper Plane (Part 1)
katiecoart
PRO
2
12k
The Spectacular Lies of Maps
axbom
PRO
1
1.1k
A better future with KSS
kneath
240
18k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
440
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
470
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
230
23k
Being A Developer After 40
akosma
PRO
92
590k
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
950
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!