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
Phoenix for Rubyists
Search
Doug Goldie
August 26, 2018
Programming
35
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Phoenix for Rubyists
Introduction to Elixir and Phoenix
Doug Goldie
August 26, 2018
More Decks by Doug Goldie
See All by Doug Goldie
Phoenix for Rubyists with notes
dgoldie
0
42
Other Decks in Programming
See All in Programming
Cloudflare is Agents
chimame
0
170
生成AI導入の「期待外れ」を乗り越える ー 開発フロー改革が目指す、真の組織変革
starfish719
0
4.7k
GDG Korea Android: 2026 I/O Extended ~ What's new in Android development tools
pluu
0
230
仕様書を書く前にハーネスを作る - Agent Native開発は「探索を速く、判定を固く」
gotalab555
4
1.7k
yield再入門 #phpcon
o0h
PRO
0
1.1k
React本体のコードリーディング
high_g_engineer
1
150
実装をデザインガイドラインに追従させるための取り組み / 260731-dip-mosh-design-system
dachi023
0
3.3k
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
630
jsmini JavaScript Engine を作ってみた話
yosuke_furukawa
PRO
0
330
Claude Code全社展開のためにやったことn選~プラグイン302個・コミッター271人を支えるために~
kenchan
5
1.6k
AWS CDK を「作」ってみた 〜フルスクラッチで見えた CDK の裏側〜 / aws-cdk-from-scratch
gotok365
3
2.8k
ここ半年くらいでAIに作らせたR用ツール
eitsupi
0
390
Featured
See All Featured
How to train your dragon (web standard)
notwaldorf
97
6.8k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
53k
Technical Leadership for Architectural Decision Making
baasie
3
490
A better future with KSS
kneath
240
18k
Balancing Empowerment & Direction
lara
6
1.2k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
201
75k
Bash Introduction
62gerente
615
220k
Writing Fast Ruby
sferik
630
63k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.9k
Facilitating Awesome Meetings
lara
57
7.1k
Designing for Timeless Needs
cassininazir
1
440
Transcript
Phoenix for Rubyists Concurrency and Scalability with Productivity by Doug
Goldie Code Cauldron
Bunny Trails Learning something new…. Why are you here?
New Language/Framework Scalability Concurrency Multicore machines Productivity of Rails
Moore’s Law is Dead! number of transistors in a dense
integrated circuit doubles approximately every two years. We are seeing more multi-core machines with more cores.
What do we build? Any Web Applications Distributed Systems But
we still want productivity
Today Phoenix Elixir Erlang
Web Applications Classic CRUD monolith Single page app (SPA) -
with any frontend Realtime app productivity and performance.
Distributed Systems Large-Scale distributed, fault-tolerant system Phoenix as the Web
component Elixir for the other components. Small distributed apps. productivity and performance.
Agenda Elixir in 10 minutes Basic Phoenix app Real-time app
Distributed systems Some really contrarian, disruptive ideas !!
Elixir
Elixir in 10 minutes placeholder
Basic Web Application
Phoenix demo Classic Rails example
Real-time Application
Real-time Features Phoenix Channels Topics Elixir & Erlang Massive concurrency
Actor model Processes
Processes • lightweight, small memory, fast to create and terminate
• message passing • no shared data • links and monitors • error handling Erlang is designed for massive concurrency
None
Chat demo Classic real-time example Phoenix channels / topics presence
http://work.stevegrossi.com/2016/07/11/building-a- chat-app-with-elixir-and-phoenix-presence/
Distributed Systems
HTTP Server Nginx and Phusion Passenger Request processing Ruby on
Rails Long-running requests Go Server-wide state Redis Persistable data Redis / MongoDB Background jobs Cron, Bash scripts, and Ruby Service crash recovery Upstart Erlang Erlang Erlang Erlang Erlang Erlang Erlang Server A Server B
None
Hard Problem to Solve
with only 10 engineers! In 2014, sold for $19 Billion.
465 million users 550 servers
Erlang History Developed over 25 years ago by Ericsson for
building Telcom products Released as open source in 1998.
Requirements • high concurrency • distribution • fault tolerant •
soft realtime • high availability • external interfaces • hot code upgrade
Processes • lightweight, small memory, fast to create and terminate
• message passing • no shared data • links and monitors • error handling Erlang is designed for massive concurrency
Scheduler
OTP Library of Design Patterns Behaviors Client Server Supervisors and
Workers
Gen Server
Lifecycle of GenServer
Fault-tolerance
None
Quotes “Best kept secret in software” - Evan Miller,
author of Chicago Boss “Erlang is about building Systems” - Robert Virding “Erlang makes the easy things hard and the hard things easy”
Umbrella demo Phoenix and Elixir have Umbrella apps. Separate Applications
in one repo.
Disruptive Ideas Service-Oriented Architectures MicroServices Web Services: json Front-end Frameworks?
Are there better ways?
Review
Erlang review • massive concurrency • Processes • OTP •
Virtual Machine (BEAM)
Elixir review • BEAM (Erlang VM) • modern syntax •
macros • tooling • community • documentation
Phoenix review • pipelines • changesets • contexts • channels/topics
• umbrella apps