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
0
120
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
1k
Messaging Standards and Systems: AMQP & RabbitMQ
gmr
4
870
Integrating PostgreSQL with RabbitMQ
gmr
6
1.8k
Sprockets
gmr
2
170
Become a Logging Expert in 30 Minutes
gmr
4
590
An Introduction to Tornado
gmr
7
220
Concurrency with Multiprocessing in Python
gmr
3
340
Other Decks in Programming
See All in Programming
1BRC--Nerd Sniping the Java Community
gunnarmorling
0
340
Komplexe Oberflächen mit SVG und der Web Animation API
joergneumann
0
680
Elm 0.19.0 Changes
bkuhlmann
0
490
障害対応を起点としたもっといい開発と運用のサイクル作りのためにできること / Hatena Enginner Seminar #29
polamjag
0
240
サイコロで理解する統計的仮説検定の考え方
tatamiya
4
960
Kotlin Multiplatform at Stable and Beyond (Android Makers 2024)
zsmb
0
310
try! Swift Tokyo 初参加報告LT
hinakko2
0
220
Code Reviews
bkuhlmann
4
890
Rubyでたのしむクリエイティブコーディング/Enjoy Creative coding with Ruby
chobishiba
1
180
スクラムガイドのスプリントレトロスペクティブを改めて読みかえしてみた / Re-reading the Sprint Retrospective Section in the Scrum Guide
mackey0225
3
450
R言語の環境構築と基礎 Tokyo.R 112
bob3bob3
0
270
TYPO3 v13 – The road to LTS: What's new and new APIs
luisasofie_xoxo
0
210
Featured
See All Featured
Docker and Python
trallard
34
2.7k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
2
3.4k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
227
16k
Put a Button on it: Removing Barriers to Going Fast.
kastner
58
3.1k
Typedesign – Prime Four
hannesfritz
36
2.1k
Into the Great Unknown - MozCon
thekraken
10
1k
The Invisible Side of Design
smashingmag
294
49k
Fireside Chat
paigeccino
21
2.6k
Stop Working from a Prison Cell
hatefulcrawdad
266
19k
For a Future-Friendly Web
brad_frost
172
9k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
30
6k
5 minutes of I Can Smell Your CMS
philhawksworth
199
19k
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