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
OTP in 15 Minutes or Less
Search
Gavin M. Roy
August 04, 2016
Programming
190
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
OTP in 15 Minutes or Less
Slides for my talk given at the Philly Elixir Meetup on the OTP part of Elixir/OTP.
Gavin M. Roy
August 04, 2016
More Decks by Gavin M. Roy
See All by Gavin M. Roy
RabbitMQ, Event-Driven Architectures, and Data Warehousing
gmr
3
1.1k
Messaging Standards and Systems: AMQP & RabbitMQ
gmr
4
980
Integrating PostgreSQL with RabbitMQ
gmr
6
2k
Sprockets
gmr
2
250
Become a Logging Expert in 30 Minutes
gmr
4
650
An Introduction to Tornado
gmr
7
290
Concurrency with Multiprocessing in Python
gmr
3
420
Other Decks in Programming
See All in Programming
Terraform標準の組織で AWS CDKをどう使うか
mu7889yoon
1
400
生成AI導入の「期待外れ」を乗り越える ー 開発フロー改革が目指す、真の組織変革
starfish719
0
2.6k
torikago - Ruby::Boxで照らすモジュラモノリスの実行境界
se4weed
1
200
PostgreSQL 18で考えるUUID主キー
kazuhiro1982
0
430
作るコストが小さくなった時代 幸せに働くために改めて考えたいこと 〜エンジニアとして価値を出し続けるために注視している二分野〜
yuppeeng
0
130
テーブルをDELETEした
yuzneri
0
120
継続モナドとリアクティブプログラミング
yukikurage
3
650
Haskell/Servantを通してWebミドルウェアを捉え直す
pizzacat83
1
620
20260722_microCMSで考える、AI時代のコンテンツ運用設計
yosh1
0
140
Lean は証明の正しさを確認するためだけのツールって思ってませんか?
inoueasei
1
120
言語を使う側から、作る側へ。 自作 Lisp で得た新たな気づき。
andpad
0
140
Generative UI & AI-Assistants for Your Angular Solutions
manfredsteyer
PRO
1
260
Featured
See All Featured
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
760
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.9k
We Are The Robots
honzajavorek
0
290
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
190
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
230
GraphQLとの向き合い方2022年版
quramy
50
15k
A Modern Web Designer's Workflow
chriscoyier
698
190k
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
330
New Earth Scene 8
popppiees
3
2.4k
Thoughts on Productivity
jonyablonski
76
5.3k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1.1k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
2.1k
Transcript
OTP in 15 Minutes or Less Philly Elixir Meetup August
2016 Gavin M. Roy VP of Architecture AWeber Communications
Processes • Heart of Concurrency • Are light-weight independent tasks
• Share nothing • Communicate via message passing • Implement a basic contract
Processes • Are long lived in a message loop •
Can link to other processes • Can spawn other processes • Can Crash!
Enter OTP It’s not just what you do, it’s how
you do it
What is OTP? • The standard library that ships with
Erlang • Design principles for code structure • A core set of common patterns and behaviors
OTP Concepts • Applications • Collection of Modules • Runtime
Structure / Processes • Supervisors • Manage Processes • gen_* Behaviors • Releases
Applications • Application Resource File Defines application modules, defaults, and
required OTP applications • Application Behavior start/2 and stop/1 {application, name, [ {description, ""}, {vsn, "1"}, {registered, []}, {applications, [ kernel, stdlib ]}, {mod, {server, []}}, {env, []} ]}.
Supervisors Return a list of Child Specifications that • Defines
the process IDs and MFAs • What to do if processes crashes • How to shutdown the processes • What type of processes the children are
Supervision Tree S W S W W S S W
W W W W
gen_server - init/1 - handle_call/3 - handle_cast/2 -
handle_info/2 - terminate/2 - code_change/3
Other OTP Behaviors Built-In • gen_fsm (Deprecated) Finite State Machine
• gen_statem Event State Machine • gen_event Generic event handling behavior 3rd Party Examples • gen_leader Distributed Master/Slave topology • gen_tcp_server Generic TCP Server • gen_rpc Scalable Multi-node RPC library
Releases • Bundle Application • cli control application • Hot-code
swap upgrade steps
Questions? gmr @crad