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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
AIコードレビューの導入・運用と AI駆動開発における「AI4QA」の取り組みについて
hagevvashi
0
570
Windows on Ryzen and I
seosoft
0
410
Claude Code Skill入門
mayahoney
0
440
Takumiから考えるSecurity_Maturity_Model.pdf
gessy0129
1
170
Agentic AI: Evolution oder Revolution
mobilelarson
PRO
0
200
Vuetify 3 → 4 何が変わった?差分と移行ポイント10分まとめ
koukimiura
0
210
Everything Claude Code OSS詳細 — 5層構造の中身と導入方法
targe
0
150
CSC307 Lecture 15
javiergs
PRO
0
270
RailsのValidatesをSwift Macrosで再現してみた
hokuron
0
140
AI活用のコスパを最大化する方法
ochtum
0
340
飯MCP
yusukebe
0
390
S3ストレージクラスの「見える」「ある」「使える」は全部違う ─ 体験から見た、仕様の深淵を覗く
ya_ma23
0
1.2k
Featured
See All Featured
RailsConf 2023
tenderlove
30
1.4k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
680
The Limits of Empathy - UXLibs8
cassininazir
1
270
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
91
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
200
The Cost Of JavaScript in 2023
addyosmani
55
9.8k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
86
YesSQL, Process and Tooling at Scale
rocio
174
15k
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
0
250
First, design no harm
axbom
PRO
2
1.1k
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