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
0
180
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
Tweet
Share
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
960
Integrating PostgreSQL with RabbitMQ
gmr
6
1.9k
Sprockets
gmr
2
240
Become a Logging Expert in 30 Minutes
gmr
4
630
An Introduction to Tornado
gmr
7
270
Concurrency with Multiprocessing in Python
gmr
3
410
Other Decks in Programming
See All in Programming
encoding/json/v2のUnmarshalはこう変わった:内部実装で見る設計改善
kurakura0916
0
350
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
290
Takumiから考えるSecurity_Maturity_Model.pdf
gessy0129
1
130
今、アーキテクトとして 品質保証にどう関わるか
nealle
0
200
AI主導でFastAPIのWebサービスを作るときに 人間が構造化すべき境界線
okajun35
0
610
文字コードの話
qnighy
44
17k
Go1.26 go fixをプロダクトに適用して困ったこと
kurakura0916
0
330
ふつうのRubyist、ちいさなデバイス、大きな一年 / Ordinary Rubyists, Tiny Devices, Big Year
chobishiba
1
390
AI時代のソフトウェア開発でも「人が仕様を書く」から始めよう-医療IT現場での実践とこれから
koukimiura
0
140
開発ステップを細分化する、破綻しないAI開発体制
kspace
0
110
今更考える「単一責任原則」 / Thinking about the Single Responsibility Principle
tooppoo
3
1.5k
Swift ConcurrencyでよりSwiftyに
yuukiw00w
0
250
Featured
See All Featured
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
1
1.3k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.1k
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
100
Practical Orchestrator
shlominoach
191
11k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.4k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
Side Projects
sachag
455
43k
Unsuck your backbone
ammeep
672
58k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
75
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
99
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
620
Visualization
eitanlees
150
17k
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