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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
あなたはユーザーではない #PdENight
kajitack
4
340
PJのドキュメントを全部Git管理にしたら、一番喜んだのはAIだった
nanaism
0
240
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
410
nuget-server - あなたが必要だったNuGetサーバー
kekyo
PRO
0
190
クライアントワークでSREをするということ。あるいは事業会社におけるSREと同じこと・違うこと
nnaka2992
1
310
RubyとGoでゼロから作る証券システム: 高信頼性が求められるシステムのコードの外側にある設計と運用のリアル
free_world21
0
220
オブザーバビリティ駆動開発って実際どうなの?
yohfee
3
740
AWS Infrastructure as Code の新機能 2025 総まとめ 〜SA 4人による怒涛のデモ祭り〜
konokenj
10
3.2k
go directiveを最新にしすぎないで欲しい話──あるいは、Go 1.26からgo mod initで作られるgo directiveの値が変わる話 / Go 1.26 リリースパーティ
arthur1
2
490
社内規程RAGの精度を73.3% → 100%に改善した話
oharu121
13
7.7k
Codexに役割を持たせる 他のAIエージェントと組み合わせる実務Tips
o8n
3
1.1k
encoding/json/v2のUnmarshalはこう変わった:内部実装で見る設計改善
kurakura0916
0
350
Featured
See All Featured
Odyssey Design
rkendrick25
PRO
2
540
How to build a perfect <img>
jonoalderson
1
5.2k
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
250
Abbi's Birthday
coloredviolet
2
5.2k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
69
Site-Speed That Sticks
csswizardry
13
1.1k
Scaling GitHub
holman
464
140k
Agile that works and the tools we love
rasmusluckow
331
21k
The browser strikes back
jonoalderson
0
760
The untapped power of vector embeddings
frankvandijk
2
1.6k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.4k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.4k
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