SlideShare a Scribd company logo
Phoenix for Rubyists
Concurrency and Scalability with Productivity
by Doug Goldie
Code Cauldron
Why New Language ?
Scalability
Concurrency
Productivity of Rails
Why New Language or Framework?
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.
The observation is

What are we getting …. more chips, more multi-core machines.
What do we need?
Handle Multicores
Distributed Systems
Massive concurrency
But still with Productivity
What do we build?
Any Web Applications
Distributed Systems
But we still want
productivity
The Answer
Phoenix
Elixir
Erlang
What do we build?
Any Web Applications
Distributed Systems
But we still want productivity
Any Web Application
Classic CRUD monolith
Single page app (SPA) - with any frontend
Realtime app
productivity and performance.
Distributed Systems
Small distributed apps.
Large-Scale distributed, fault-tolerant system
Phoenix as the Web component
Elixir for the other components.
productivity and performance.
Agenda
Elixir in 10 minutes
Basic Phoenix app
Real-time app
Distributed systems
Some really contrarian, disruptive ideas !!
- Rails like demo

- Non-rails like demo - realtime

- web component for a distributed, fault tolerant system

- use this platform to do things in a really contrarian way.
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
Erlang is designed for massive concurrency. Erlang processes are lightweight (grow and shrink dynamically) with small memory footprint, fast to create and terminate,
and the scheduling overhead is low.
Chat demo
Classic real-time example
Phoenix channels / topics
Server A
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
Server B
Erlang
Erlang
Erlang
Erlang
Erlang
Erlang
Erlang
A real world Rails app needs other software.

other things: sidekiq, docker, ???
Server A
Server B
Erlang
Erlang
Erlang
Erlang
Erlang
Erlang
Erlang
A real world Rails app needs other software.

other things: sidekiq, docker, ???
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
This isn’t just large-scale problems. We build distributed systems all the time.

A real world Rails app needs other software.

other things: sidekiq, docker, ???
Of course there are large-scale problems to solve.
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
–Robert Virding
“Erlang is for building systems.”
Processes
• basic unit of work
• message passing
• no shared state
• high concurrency
Erlang is designed for massive concurrency. 

Erlang processes are

— lightweight (grow and shrink dynamically) 

— with small memory footprint, 

— fast to create and terminate, and 

— the scheduling overhead is low.
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
Erlang is designed for massive concurrency. Erlang processes are lightweight (grow and shrink dynamically) with small memory footprint, fast to create and terminate,
and the scheduling overhead is low.
Scheduler
uses multiple cores out of the box
Actor Model
OTP
• supervision trees
• behaviors
• applications
• releases
• release handling
Erlang is designed for massive concurrency. 

Erlang processes are

— lightweight (grow and shrink dynamically) 

— with small memory footprint, 

— fast to create and terminate, and 

— the scheduling overhead is low.
OTP
Library of Design Patterns
Behaviors
Client Server
Supervisors and Workers
Gen Server
Lifecycle of GenServer
Fault-tolerance
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”
separate?
Umbrella demo
Phoenix and Elixir have Umbrella apps.
Separate Applications in one repo.
Server A Server B
HTTP Server Nginx and Phusion Passenger Erlang
Request processing Ruby on Rails Erlang
Long-running requests Go Erlang
Server-wide state Redis Erlang
Persistable data Redis / MongoDB Erlang
Background jobs Cron, Bash scripts, and Ruby Erlang
Service crash recovery Upstart Erlang
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

More Related Content

What's hot

Reasonable app development
Reasonable app developmentReasonable app development
Reasonable app development
Arnar Þór Sveinsson
 
Java Architectures - a New Hope
Java Architectures - a New HopeJava Architectures - a New Hope
Java Architectures - a New Hope
Eberhard Wolff
 
Architecting for Continuous Delivery
Architecting for Continuous DeliveryArchitecting for Continuous Delivery
Architecting for Continuous DeliveryAxel Fontaine
 
Why docker@localhost is not even remotely near DevOps?
Why docker@localhost is not even remotely near DevOps?Why docker@localhost is not even remotely near DevOps?
Why docker@localhost is not even remotely near DevOps?
Wojciech Gawroński
 
Life Beyond Rails: Creating Cross Platform Ruby Apps
Life Beyond Rails: Creating Cross Platform Ruby AppsLife Beyond Rails: Creating Cross Platform Ruby Apps
Life Beyond Rails: Creating Cross Platform Ruby Apps
Tristan Gomez
 
The dev ops code has no servers
The dev ops code has no serversThe dev ops code has no servers
The dev ops code has no servers
Ed Anderson
 
Learn Elixir at Manchester Lambda Lounge
Learn Elixir at Manchester Lambda LoungeLearn Elixir at Manchester Lambda Lounge
Learn Elixir at Manchester Lambda Lounge
Chi-chi Ekweozor
 
Onion Architecture and the Blog
Onion Architecture and the BlogOnion Architecture and the Blog
Onion Architecture and the Blog
barryosull
 
Network with node
Network with nodeNetwork with node
Network with node
Philipp Fehre
 
Microservice - All is Small, All is Well?
Microservice - All is Small, All is Well?Microservice - All is Small, All is Well?
Microservice - All is Small, All is Well?
Eberhard Wolff
 
Programming for the Internet of Things
Programming for the Internet of ThingsProgramming for the Internet of Things
Programming for the Internet of Things
Kinoma
 
Scaling Machine Learning Systems up to Billions of Predictions per Day
Scaling Machine Learning Systems up to Billions of Predictions per DayScaling Machine Learning Systems up to Billions of Predictions per Day
Scaling Machine Learning Systems up to Billions of Predictions per Day
Carmine Paolino
 
Elixir Programming Language 101
Elixir Programming Language 101Elixir Programming Language 101
Elixir Programming Language 101
Around25
 
Scaling LoL Chat to 70M Players
Scaling LoL Chat to 70M PlayersScaling LoL Chat to 70M Players
Scaling LoL Chat to 70M Players
Michał Ptaszek
 
Celery workshop
Celery workshopCelery workshop
Celery workshop
Eswar Vandanapu
 
Stackato v6
Stackato v6Stackato v6
Stackato v6
Jonas Brømsø
 
Seattle Spark Meetup Mobius CSharp API
Seattle Spark Meetup Mobius CSharp APISeattle Spark Meetup Mobius CSharp API
Seattle Spark Meetup Mobius CSharp API
shareddatamsft
 
Still waiting for IPv6? Try the inlets-operator
Still waiting for IPv6? Try the inlets-operatorStill waiting for IPv6? Try the inlets-operator
Still waiting for IPv6? Try the inlets-operator
Alex Ellis
 
What's new on Rails 5
What's new on Rails 5What's new on Rails 5
What's new on Rails 5
Guilherme Carlos
 

What's hot (20)

Reasonable app development
Reasonable app developmentReasonable app development
Reasonable app development
 
Java Architectures - a New Hope
Java Architectures - a New HopeJava Architectures - a New Hope
Java Architectures - a New Hope
 
Architecting for Continuous Delivery
Architecting for Continuous DeliveryArchitecting for Continuous Delivery
Architecting for Continuous Delivery
 
Why docker@localhost is not even remotely near DevOps?
Why docker@localhost is not even remotely near DevOps?Why docker@localhost is not even remotely near DevOps?
Why docker@localhost is not even remotely near DevOps?
 
Life Beyond Rails: Creating Cross Platform Ruby Apps
Life Beyond Rails: Creating Cross Platform Ruby AppsLife Beyond Rails: Creating Cross Platform Ruby Apps
Life Beyond Rails: Creating Cross Platform Ruby Apps
 
The dev ops code has no servers
The dev ops code has no serversThe dev ops code has no servers
The dev ops code has no servers
 
Learn Elixir at Manchester Lambda Lounge
Learn Elixir at Manchester Lambda LoungeLearn Elixir at Manchester Lambda Lounge
Learn Elixir at Manchester Lambda Lounge
 
Onion Architecture and the Blog
Onion Architecture and the BlogOnion Architecture and the Blog
Onion Architecture and the Blog
 
Network with node
Network with nodeNetwork with node
Network with node
 
Selenium
SeleniumSelenium
Selenium
 
Microservice - All is Small, All is Well?
Microservice - All is Small, All is Well?Microservice - All is Small, All is Well?
Microservice - All is Small, All is Well?
 
Programming for the Internet of Things
Programming for the Internet of ThingsProgramming for the Internet of Things
Programming for the Internet of Things
 
Scaling Machine Learning Systems up to Billions of Predictions per Day
Scaling Machine Learning Systems up to Billions of Predictions per DayScaling Machine Learning Systems up to Billions of Predictions per Day
Scaling Machine Learning Systems up to Billions of Predictions per Day
 
Elixir Programming Language 101
Elixir Programming Language 101Elixir Programming Language 101
Elixir Programming Language 101
 
Scaling LoL Chat to 70M Players
Scaling LoL Chat to 70M PlayersScaling LoL Chat to 70M Players
Scaling LoL Chat to 70M Players
 
Celery workshop
Celery workshopCelery workshop
Celery workshop
 
Stackato v6
Stackato v6Stackato v6
Stackato v6
 
Seattle Spark Meetup Mobius CSharp API
Seattle Spark Meetup Mobius CSharp APISeattle Spark Meetup Mobius CSharp API
Seattle Spark Meetup Mobius CSharp API
 
Still waiting for IPv6? Try the inlets-operator
Still waiting for IPv6? Try the inlets-operatorStill waiting for IPv6? Try the inlets-operator
Still waiting for IPv6? Try the inlets-operator
 
What's new on Rails 5
What's new on Rails 5What's new on Rails 5
What's new on Rails 5
 

Similar to Phoenix for Rubyists

Immutable Infrastructure: the new App Deployment
Immutable Infrastructure: the new App DeploymentImmutable Infrastructure: the new App Deployment
Immutable Infrastructure: the new App Deployment
Axel Fontaine
 
The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ...
 The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ... The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ...
The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ...
Josef Adersberger
 
Migrating Hundreds of Legacy Applications to Kubernetes - The Good, the Bad, ...
Migrating Hundreds of Legacy Applications to Kubernetes - The Good, the Bad, ...Migrating Hundreds of Legacy Applications to Kubernetes - The Good, the Bad, ...
Migrating Hundreds of Legacy Applications to Kubernetes - The Good, the Bad, ...
QAware GmbH
 
APIs distribuidos con alta escalabilidad
APIs distribuidos con alta escalabilidadAPIs distribuidos con alta escalabilidad
APIs distribuidos con alta escalabilidad
Software Guru
 
Jfokus 2015 - Immutable Server generation: the new App Deployment
Jfokus 2015 - Immutable Server generation: the new App DeploymentJfokus 2015 - Immutable Server generation: the new App Deployment
Jfokus 2015 - Immutable Server generation: the new App Deployment
Axel Fontaine
 
Scaling with Symfony - PHP UK
Scaling with Symfony - PHP UKScaling with Symfony - PHP UK
Scaling with Symfony - PHP UK
Ricard Clau
 
Web technologies lesson 1
Web technologies   lesson 1Web technologies   lesson 1
Web technologies lesson 1nhepner
 
2016 - Open Mic - IGNITE - Open Infrastructure = ANY Infrastructure
2016 - Open Mic - IGNITE - Open Infrastructure = ANY Infrastructure2016 - Open Mic - IGNITE - Open Infrastructure = ANY Infrastructure
2016 - Open Mic - IGNITE - Open Infrastructure = ANY Infrastructure
devopsdaysaustin
 
OpenStack Preso: DevOps on Hybrid Infrastructure
OpenStack Preso: DevOps on Hybrid InfrastructureOpenStack Preso: DevOps on Hybrid Infrastructure
OpenStack Preso: DevOps on Hybrid Infrastructure
rhirschfeld
 
GlobalsDB: Its significance for Node.js Developers
GlobalsDB: Its significance for Node.js DevelopersGlobalsDB: Its significance for Node.js Developers
GlobalsDB: Its significance for Node.js Developers
Rob Tweed
 
Viridians on Rails
Viridians on RailsViridians on Rails
Viridians on Rails
Viridians
 
An introduction to the ruby ecosystem
An introduction to the ruby ecosystemAn introduction to the ruby ecosystem
An introduction to the ruby ecosystem
Geison Goes
 
Evolving Services Into A Cloud Native World
Evolving Services Into A Cloud Native WorldEvolving Services Into A Cloud Native World
Evolving Services Into A Cloud Native World
Iain Hull
 
Ruby On Rails
Ruby On RailsRuby On Rails
Ruby On Rails
Gautam Rege
 
After the LAMP, it's time to get MEAN
After the LAMP, it's time to get MEANAfter the LAMP, it's time to get MEAN
After the LAMP, it's time to get MEAN
Jeff Fox
 
Is Enterprise Java Still Relevant (JavaOne 2015 session)
Is Enterprise Java Still Relevant (JavaOne 2015 session)Is Enterprise Java Still Relevant (JavaOne 2015 session)
Is Enterprise Java Still Relevant (JavaOne 2015 session)
Ian Robinson
 
Docker security microservices
Docker security  microservicesDocker security  microservices
Docker security microservices
Vishwas Manral
 
Ruby on Rails (RoR) as a back-end processor for Apex
Ruby on Rails (RoR) as a back-end processor for Apex Ruby on Rails (RoR) as a back-end processor for Apex
Ruby on Rails (RoR) as a back-end processor for Apex
Espen Brækken
 

Similar to Phoenix for Rubyists (20)

Immutable Infrastructure: the new App Deployment
Immutable Infrastructure: the new App DeploymentImmutable Infrastructure: the new App Deployment
Immutable Infrastructure: the new App Deployment
 
The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ...
 The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ... The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ...
The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ...
 
Migrating Hundreds of Legacy Applications to Kubernetes - The Good, the Bad, ...
Migrating Hundreds of Legacy Applications to Kubernetes - The Good, the Bad, ...Migrating Hundreds of Legacy Applications to Kubernetes - The Good, the Bad, ...
Migrating Hundreds of Legacy Applications to Kubernetes - The Good, the Bad, ...
 
SGCE 2015 REST APIs
SGCE 2015 REST APIsSGCE 2015 REST APIs
SGCE 2015 REST APIs
 
APIs distribuidos con alta escalabilidad
APIs distribuidos con alta escalabilidadAPIs distribuidos con alta escalabilidad
APIs distribuidos con alta escalabilidad
 
Jfokus 2015 - Immutable Server generation: the new App Deployment
Jfokus 2015 - Immutable Server generation: the new App DeploymentJfokus 2015 - Immutable Server generation: the new App Deployment
Jfokus 2015 - Immutable Server generation: the new App Deployment
 
Scaling with Symfony - PHP UK
Scaling with Symfony - PHP UKScaling with Symfony - PHP UK
Scaling with Symfony - PHP UK
 
Web technologies lesson 1
Web technologies   lesson 1Web technologies   lesson 1
Web technologies lesson 1
 
2016 - Open Mic - IGNITE - Open Infrastructure = ANY Infrastructure
2016 - Open Mic - IGNITE - Open Infrastructure = ANY Infrastructure2016 - Open Mic - IGNITE - Open Infrastructure = ANY Infrastructure
2016 - Open Mic - IGNITE - Open Infrastructure = ANY Infrastructure
 
OpenStack Preso: DevOps on Hybrid Infrastructure
OpenStack Preso: DevOps on Hybrid InfrastructureOpenStack Preso: DevOps on Hybrid Infrastructure
OpenStack Preso: DevOps on Hybrid Infrastructure
 
GlobalsDB: Its significance for Node.js Developers
GlobalsDB: Its significance for Node.js DevelopersGlobalsDB: Its significance for Node.js Developers
GlobalsDB: Its significance for Node.js Developers
 
Viridians on Rails
Viridians on RailsViridians on Rails
Viridians on Rails
 
An introduction to the ruby ecosystem
An introduction to the ruby ecosystemAn introduction to the ruby ecosystem
An introduction to the ruby ecosystem
 
Evolving Services Into A Cloud Native World
Evolving Services Into A Cloud Native WorldEvolving Services Into A Cloud Native World
Evolving Services Into A Cloud Native World
 
Ruby On Rails
Ruby On RailsRuby On Rails
Ruby On Rails
 
Concurrency in ruby
Concurrency in rubyConcurrency in ruby
Concurrency in ruby
 
After the LAMP, it's time to get MEAN
After the LAMP, it's time to get MEANAfter the LAMP, it's time to get MEAN
After the LAMP, it's time to get MEAN
 
Is Enterprise Java Still Relevant (JavaOne 2015 session)
Is Enterprise Java Still Relevant (JavaOne 2015 session)Is Enterprise Java Still Relevant (JavaOne 2015 session)
Is Enterprise Java Still Relevant (JavaOne 2015 session)
 
Docker security microservices
Docker security  microservicesDocker security  microservices
Docker security microservices
 
Ruby on Rails (RoR) as a back-end processor for Apex
Ruby on Rails (RoR) as a back-end processor for Apex Ruby on Rails (RoR) as a back-end processor for Apex
Ruby on Rails (RoR) as a back-end processor for Apex
 

Recently uploaded

Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
Matt Welsh
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns
 
De mooiste recreatieve routes ontdekken met RouteYou en FME
De mooiste recreatieve routes ontdekken met RouteYou en FMEDe mooiste recreatieve routes ontdekken met RouteYou en FME
De mooiste recreatieve routes ontdekken met RouteYou en FME
Jelle | Nordend
 
Designing for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web ServicesDesigning for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web Services
KrzysztofKkol1
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
Globus
 
Software Testing Exam imp Ques Notes.pdf
Software Testing Exam imp Ques Notes.pdfSoftware Testing Exam imp Ques Notes.pdf
Software Testing Exam imp Ques Notes.pdf
MayankTawar1
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
wottaspaceseo
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
Globus
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
informapgpstrackings
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
Globus
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
Globus
 
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
XfilesPro
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
AMB-Review
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Globus
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
IES VE
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Anthony Dahanne
 
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Hivelance Technology
 

Recently uploaded (20)

Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
 
De mooiste recreatieve routes ontdekken met RouteYou en FME
De mooiste recreatieve routes ontdekken met RouteYou en FMEDe mooiste recreatieve routes ontdekken met RouteYou en FME
De mooiste recreatieve routes ontdekken met RouteYou en FME
 
Designing for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web ServicesDesigning for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web Services
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
 
Software Testing Exam imp Ques Notes.pdf
Software Testing Exam imp Ques Notes.pdfSoftware Testing Exam imp Ques Notes.pdf
Software Testing Exam imp Ques Notes.pdf
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
 
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
 
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
 

Phoenix for Rubyists

  • 1. Phoenix for Rubyists Concurrency and Scalability with Productivity by Doug Goldie Code Cauldron
  • 2. Why New Language ? Scalability Concurrency Productivity of Rails Why New Language or Framework?
  • 3. 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. The observation is What are we getting …. more chips, more multi-core machines.
  • 4. What do we need? Handle Multicores Distributed Systems Massive concurrency But still with Productivity
  • 5. What do we build? Any Web Applications Distributed Systems But we still want productivity
  • 7. What do we build? Any Web Applications Distributed Systems But we still want productivity
  • 8. Any Web Application Classic CRUD monolith Single page app (SPA) - with any frontend Realtime app productivity and performance.
  • 9. Distributed Systems Small distributed apps. Large-Scale distributed, fault-tolerant system Phoenix as the Web component Elixir for the other components. productivity and performance.
  • 10. Agenda Elixir in 10 minutes Basic Phoenix app Real-time app Distributed systems Some really contrarian, disruptive ideas !! - Rails like demo - Non-rails like demo - realtime - web component for a distributed, fault tolerant system - use this platform to do things in a really contrarian way.
  • 12. Elixir in 10 minutes placeholder
  • 16. Real-time Features Phoenix Channels Topics Elixir & Erlang Massive concurrency Actor model Processes
  • 17. 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 Erlang is designed for massive concurrency. Erlang processes are lightweight (grow and shrink dynamically) with small memory footprint, fast to create and terminate, and the scheduling overhead is low.
  • 18.
  • 19. Chat demo Classic real-time example Phoenix channels / topics
  • 20. Server A 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 Server B Erlang Erlang Erlang Erlang Erlang Erlang Erlang A real world Rails app needs other software. other things: sidekiq, docker, ???
  • 21. Server A Server B Erlang Erlang Erlang Erlang Erlang Erlang Erlang A real world Rails app needs other software. other things: sidekiq, docker, ???
  • 23. 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 This isn’t just large-scale problems. We build distributed systems all the time. A real world Rails app needs other software. other things: sidekiq, docker, ???
  • 24. Of course there are large-scale problems to solve.
  • 26. with only 10 engineers! In 2014, sold for $19 Billion. 465 million users 550 servers
  • 27. Erlang History Developed over 25 years ago by Ericsson for building Telcom products Released as open source in 1998.
  • 28. Requirements • high concurrency • distribution • fault tolerant • soft realtime • high availability • external interfaces • hot code upgrade
  • 29. –Robert Virding “Erlang is for building systems.”
  • 30. Processes • basic unit of work • message passing • no shared state • high concurrency Erlang is designed for massive concurrency. Erlang processes are — lightweight (grow and shrink dynamically) — with small memory footprint, — fast to create and terminate, and — the scheduling overhead is low.
  • 31. 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 Erlang is designed for massive concurrency. Erlang processes are lightweight (grow and shrink dynamically) with small memory footprint, fast to create and terminate, and the scheduling overhead is low.
  • 34. OTP • supervision trees • behaviors • applications • releases • release handling Erlang is designed for massive concurrency. Erlang processes are — lightweight (grow and shrink dynamically) — with small memory footprint, — fast to create and terminate, and — the scheduling overhead is low.
  • 35. OTP Library of Design Patterns Behaviors Client Server Supervisors and Workers
  • 39.
  • 40. 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” separate?
  • 41. Umbrella demo Phoenix and Elixir have Umbrella apps. Separate Applications in one repo.
  • 42. Server A Server B HTTP Server Nginx and Phusion Passenger Erlang Request processing Ruby on Rails Erlang Long-running requests Go Erlang Server-wide state Redis Erlang Persistable data Redis / MongoDB Erlang Background jobs Cron, Bash scripts, and Ruby Erlang Service crash recovery Upstart Erlang
  • 44. Erlang review • massive concurrency • Processes • OTP • Virtual Machine (BEAM)
  • 45. Elixir review • BEAM (Erlang VM) • modern syntax • macros • tooling • community • documentation
  • 46. Phoenix review • pipelines • changesets • contexts • channels/topics • umbrella apps