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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
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
Make SRE Operations Easier with Azure SRE Agent
kkamegawa
0
5.2k
Observability in Practice:Grafana 與 Edge Device SRE 的那些事
blueswen
0
160
OSもどきOS
arkw
0
480
Spring Security 実践 ─ GraphQL APIで実務に役立つ 認証・認可 を学ぶ
wagyu
0
210
Swiftのレキシカルスコープ管理
kntkymt
0
220
Semantic Version 単位で戦略を柔軟に変えて、パッケージアップデートを自動化する
daitasu
0
200
Old Dog, New Tricks: The Java 25 Reinvention - JNation
bazlur_rahman
0
150
AIで効率化できた業務・日常
ochtum
0
120
依存関係から依存物へ―Dependencyという言葉の歴史をひも解く
j_lee
0
110
Modding RubyKaigi for Myself
yui_knk
0
910
タクシーアプリ『GO』の バックエンド開発のおける AI利活用と若者のすべて
pyama86
3
1.9k
正しくソフトウェアを作る、前提を疑うための認知の視点 / doubt-premise
minodriven
20
6.4k
Featured
See All Featured
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.5k
A designer walks into a library…
pauljervisheath
211
24k
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.8k
Optimising Largest Contentful Paint
csswizardry
37
3.7k
A better future with KSS
kneath
240
18k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
200
Speed Design
sergeychernyshev
33
1.8k
AI: The stuff that nobody shows you
jnunemaker
PRO
8
700
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
3.4k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
570
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.5k
Building Flexible Design Systems
yeseniaperezcruz
330
40k
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