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
970
Integrating PostgreSQL with RabbitMQ
gmr
6
1.9k
Sprockets
gmr
2
250
Become a Logging Expert in 30 Minutes
gmr
4
650
An Introduction to Tornado
gmr
7
280
Concurrency with Multiprocessing in Python
gmr
3
420
Other Decks in Programming
See All in Programming
決定論的オーケストレーションの設計と実装 / Design and Implementation of Deterministic Orchestration
nrslib
3
1.3k
The ROI of Quarkus for Spring Boot Applications
hollycummins
0
100
例外の正しい扱い方 そのエラー try-catchして大丈夫?
jinwatanabe
0
200
Webフレームワークの ベンチマークについて
yusukebe
0
160
正しくソフトウェアを作る、前提を疑うための認知の視点 / doubt-premise
minodriven
20
6.4k
TSKaigi Night Talks 2026_TypeScriptでサプライチェーンの整合性を型に閉じ込める
geekplus_tech
0
330
AI駆動開発で崩れていくコードベースを立て直す
kyoko_nr_nr
1
450
Spring Security 実践 ─ GraphQL APIで実務に役立つ 認証・認可 を学ぶ
wagyu
0
210
AIチームを指揮するOSS「TAKT」活用術 / How to Use “TAKT,” an OSS Tool for Orchestrating AI Teams
nrslib
6
870
IBM Bobを活用したレガシーアプリの最新化
oniak3ibm
PRO
1
190
RTSPクライアントを自作してみた話
simotin13
0
520
CSC307 Lecture 17
javiergs
PRO
0
320
Featured
See All Featured
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
2
850
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
600
It's Worth the Effort
3n
188
29k
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
540
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.5k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.7k
Principles of Awesome APIs and How to Build Them.
keavy
128
17k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
390
Code Reviewing Like a Champion
maltzj
528
40k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
250
Rails Girls Zürich Keynote
gr2m
96
14k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.5k
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