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
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
260
Concurrency with Multiprocessing in Python
gmr
3
400
Other Decks in Programming
See All in Programming
高速開発のためのコード整理術
sutetotanuki
1
410
AI Schema Enrichment for your Oracle AI Database
thatjeffsmith
0
320
カスタマーサクセス業務を変革したヘルススコアの実現と学び
_hummer0724
0
730
それ、本当に安全? ファイルアップロードで見落としがちなセキュリティリスクと対策
penpeen
7
3.9k
MDN Web Docs に日本語翻訳でコントリビュート
ohmori_yusuke
0
650
Vibe Coding - AI 驅動的軟體開發
mickyp100
0
180
プロダクトオーナーから見たSOC2 _SOC2ゆるミートアップ#2
kekekenta
0
220
AI時代のキャリアプラン「技術の引力」からの脱出と「問い」へのいざない / tech-gravity
minodriven
21
7.4k
ぼくの開発環境2026
yuzneri
0
240
AgentCoreとHuman in the Loop
har1101
5
240
コントリビューターによるDenoのすゝめ / Deno Recommendations by a Contributor
petamoriken
0
210
AIエージェントのキホンから学ぶ「エージェンティックコーディング」実践入門
masahiro_nishimi
5
590
Featured
See All Featured
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
230
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Product Roadmaps are Hard
iamctodd
PRO
55
12k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
280
Making Projects Easy
brettharned
120
6.6k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
650
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3k
Principles of Awesome APIs and How to Build Them.
keavy
128
17k
Art, The Web, and Tiny UX
lynnandtonic
304
21k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Navigating Weather and Climate Data
rabernat
0
110
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
67
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