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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Andrea Leopardi
May 11, 2024
Programming
260
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
490
The Umbrella and the Range
whatyouhide
0
66
gen_statem - OTP's Unsung Hero
whatyouhide
2
350
BEAM: The Perfect Fit for Networks
whatyouhide
1
270
Update from the Elixir team - 2022
whatyouhide
0
460
Testing Asynchronous OTP
whatyouhide
1
580
Elixir Sightseeing Tour
whatyouhide
0
490
Mint - Disrupting HTTP clients
whatyouhide
0
310
BEAM Architecture Handbook
whatyouhide
7
3k
Other Decks in Programming
See All in Programming
ローカルLLMでどこまでコードが書けるか -拡張版 / How much code can be written on a local LLM Extended
kishida
11
4.1k
Java × distroless で 軽量なコンテナイメージを / Java on Distroless
contour_gara
0
540
Composerを使ったサプライチェーン攻撃の様子を眺めてみる #phpstudy
o0h
PRO
2
250
肥大化するレガシーコードに立ち向かうためのインターフェース分離と依存の逆転 / JJUG CCC 2026 Spring
hirokunimaeta
0
550
Semantic Version 単位で戦略を柔軟に変えて、パッケージアップデートを自動化する
daitasu
1
240
Technical Debt: Understanding it Rightly, Engaging it Rightly #LaravelLiveJP
shogogg
0
230
「AIで開発し、AIを届ける」をEvalでつなぐ 〜AIネイティブに始めるプロダクト開発の実践〜 / Connecting "Develop with AI, deliver AI" with Eval
rkaga
4
5.1k
Signal Forms: Beyond the Basics @ngBaguette 2026 in Paris
manfredsteyer
PRO
0
250
技術記事、 専門家としてのプログラマ、 言語化
mizchi
13
5.9k
そのテスト、説明できますか?~LWテスト戦略FW~のご紹介
nakahara
0
130
3Dシーンの圧縮
fadis
1
770
Spec Driven Development | AI Summit Lisbon
danielsogl
PRO
0
190
Featured
See All Featured
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.3k
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
2
850
XXLCSS - How to scale CSS and keep your sanity
sugarenia
250
1.3M
Being A Developer After 40
akosma
91
590k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.2k
Ruling the World: When Life Gets Gamed
codingconduct
0
250
Design in an AI World
tapps
1
240
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2k
Mobile First: as difficult as doing things right
swwweet
225
10k
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!