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
0
32
Phoenix for Rubyists
Introduction to Elixir and Phoenix
Doug Goldie
August 26, 2018
Tweet
Share
More Decks by Doug Goldie
See All by Doug Goldie
Phoenix for Rubyists with notes
dgoldie
0
40
Other Decks in Programming
See All in Programming
コマンドとリード間の連携に対する脅威分析フレームワーク
pandayumi
1
450
なぜSQLはAIぽく見えるのか/why does SQL look AI like
florets1
0
450
CSC307 Lecture 05
javiergs
PRO
0
500
今から始めるClaude Code超入門
448jp
8
8.6k
Vibe Coding - AI 驅動的軟體開發
mickyp100
0
170
なるべく楽してバックエンドに型をつけたい!(楽とは言ってない)
hibiki_cube
0
140
AI前提で考えるiOSアプリのモダナイズ設計
yuukiw00w
0
220
カスタマーサクセス業務を変革したヘルススコアの実現と学び
_hummer0724
0
680
Lambda のコードストレージ容量に気をつけましょう
tattwan718
0
120
余白を設計しフロントエンド開発を 加速させる
tsukuha
7
2.1k
CSC307 Lecture 02
javiergs
PRO
1
780
AIエージェント、”どう作るか”で差は出るか? / AI Agents: Does the "How" Make a Difference?
rkaga
4
2k
Featured
See All Featured
How to Think Like a Performance Engineer
csswizardry
28
2.4k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
120
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
65
A Tale of Four Properties
chriscoyier
162
24k
Prompt Engineering for Job Search
mfonobong
0
160
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
Principles of Awesome APIs and How to Build Them.
keavy
128
17k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
240
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
Evolving SEO for Evolving Search Engines
ryanjones
0
120
[SF Ruby Conf 2025] Rails X
palkan
1
740
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