SlideShare a Scribd company logo
Phoenix Framework (Elixir)
A productive web framework that does not compromise speed and maintainability
Svein Fidjestøl
Webstep Fokus
January 2016
Intel Haswell-E
2015
?✓
Timeline
1986: Erlang 2012: Elixir 2015: Phoenix Framework
2015: 3 GHz, 8(16) Cores2002: 3 GHz, 1 Core1986: 0.016 GHz, 1 Core
Elixir
Modern programming language
Erlang Virtual Machine (BEAM)
Erlang compatible
Battle-tested concurrency and distribution model
IEx: Interactive Shell
Mix: Build and package management tool
Elixir
2012: R&D project at Plataformatec (Brazil). First public release.
2014: Version 1.0.0. Some real-world usage of Elixir in production systems.
2016: Version 1.2.0
Elixir
In Python
" ".join(map(str.capitalize, "hello_there_world".split("_")))
In Elixir
"hello_there_world"
|> String.split("_")
|> Enum.map(&String.capitalize/1)
|> Enum.join(" ")
using the pipeline operator: |>
Elixir
In C#
"hello_there_world"
.Split('_')
.Select(x => textInfo.ToTitleCase(x))
.Aggregate((a, b) => a + " " + b);
or
string.Join(" ",
"hello_there_world"
.Split('_')
.Select(x => textInfo.ToTitleCase(x)))
Erlang
Used in 50 % of all telecom switches
Erlang Virtual Machine (BEAM)
Massively Scalable
High Availability
Actor Model
Unfamiliar syntax -- Erlang started life as a modified Prolog, and this shows.
Erlang
1986: Proprietary Language (Ericsson)
1995: OTP (“Open Telecom Platform”)
1998: Erlang/OTP Open Sourced
2008: Facebook Chat
2010: WhatsApp
Other: RabbitMQ, CouchDB, Riak, Yahoo delicious.com, Pinterest, Amazon SimpleDB
Erlang
Functions are defined basically by a mathematical formula
area({square, Side}) -> Side * Side;
area({circle, Radius}) -> math:pi() * Radius * Radius.
“square” and “circle” are atoms since they start with a lowercase letter
“Side” and “Radius” are variables since they start with an uppercase letter
Erlang
Decode TCP segments:
decode(<< SourcePort:16, DestinationPort:16,
SequenceNumber:32,
AckNumber:32,
DataOffset:4, _Reserved:4, Flags:8,
WindowSize:16,
Checksum:16, UrgentPointer:16,
Payload/binary>>) when DataOffset>4
“SourcePort:16”: 16 is the number of bits to be matched to the variable SourcePort
“when DataOffset>4”: Guard expression, can use simple tests and variable comparisons
Erlang
Quicksort
qsort([]) -> [];
qsort([X|Xs]) ->
qsort([Y || Y <- Xs, Y =< X]) ++ [X] ++ qsort([Y || Y <- Xs, Y > X]).
Elixir
DEMO
Phoenix Framework
Web Framework for Elixir, inspired by Ruby on Rails
MVC (Model - View - Controller)
Optimized for “Developer joy” and productivity
Massively better performance than RoR (and concurrency actually works!)
Plug
Ecto
Channels (Sockets), PubSub, etc.
Phoenix Framework
2014: First appeared
2015: Version 1.0
2016: Version 1.1
Phoenix Framework
Linux, OS X, Windows
PostgreSQL, MySql, SQL Server
Works great on all combinations
Easy to get started
Easily deployed to Heroku
Efficient! Can even run on a Raspberry PI 2:
540 requests per second on a $35 piece of hardware using on average 90% CPU and only 16 MB RAM
Plug
Pipeline
Authentication
Other Request Headers
Logging
Ecto
ORM mapper, without the “O”
Familiar syntax
Type safe
query = from w in Weather,
where: w.prcp > 0 or is_nil(w.prcp),
select: w
Framework dependencies
node.js (optional, for development)
PostgreSQL (default)
SQL Server also works fine using the TDS Adapter for Ecto
Framework dependencies
Erlang
fs
ranch
poolboy
decimal
poison
cowlib
cowboy
Framework dependencies
Elixir
plug
ecto
Client side
brunch.io (Optional, asset management)
One convenient package
Don’t have to worry about dependencies
Mix build system (Elixir dependencies)
Hex package manager (Erlang dependencies)
Code editor: e.g. Atom with language-elixir plugin
Phoenix Framework
DEMO
Deployment
Linux / Mac / Windows
Heroku
Elixir buildpack for Heroku
Real world use
Bleacher Report: http://bleacherreport.com/
Second largest sport website in the world
80 million unique users per month
Far above 100,000 requests per minute
Highly personalized content
Previously used Ruby on Rails
Performance issues, needed lots of caching layers
Phoenix allows a real-time strategy instead of caching
Real world use
High-level benefits
Scalability
Fault-tolerance
Functional
Meta-programming
Specific benefits
List manipulation
Highly personalized real-time lists
Questions?

More Related Content

What's hot (20)

PDF
Awesome Concurrency with Elixir Tasks
Jonathan Magen
 
PDF
Droidcon Nigeria 2021 - Still Sleeping on KMM?
Emmanuel Kehinde
 
PDF
Multiplatform shared codebase with Kotlin/Native - UA Mobile 2019
Eugene Kurko
 
PPTX
Ansible Tutorial For Beginners | What Is Ansible And How It Works? | Ansible ...
Simplilearn
 
PDF
Building Elixir App Release with Distillery and Docker
Mickey Chen
 
KEY
Intro to Erlang
Ken Pratt
 
PDF
Automating the Cloud with Terraform, and Ansible
Brian Hogan
 
PDF
Productive OpenCL with Intel Xeon Phi Coprocessors
Intel IT Center
 
KEY
Managing Eclipse Preferences for Teams (EclipseCon 2011)
Netcetera
 
PPTX
Configuration primer
feanil
 
PDF
Erlang - Concurrent Language for Concurrent World
Zvi Avraham
 
PDF
Lightning Talk: Erlang on Xen - Mikhail Bortnyk
Elixir Club
 
PPTX
Ansible training | redhat Ansible 2.5 Corporate course - GOT
keerthi124
 
PDF
A shallow dive into the elixir compiler
Jeffrey Chan
 
PPTX
Creating Perl modules with Dist::Zilla
Mark Gardner
 
PDF
Open stack and_vagrant-os-meetup-2015
yfauser
 
PDF
Let's Get Acquainted: Ansible! / Symfony Camp UA 2014
Igor Brovchenko
 
PDF
eZ Publish Platform 5.4 public webinar
Roland Benedetti
 
PDF
Vancouver Erlang Meetup cferl & Mule Transport Plug
David Dossot
 
PPTX
Tamir Dresher - Async Streams in C#
Tamir Dresher
 
Awesome Concurrency with Elixir Tasks
Jonathan Magen
 
Droidcon Nigeria 2021 - Still Sleeping on KMM?
Emmanuel Kehinde
 
Multiplatform shared codebase with Kotlin/Native - UA Mobile 2019
Eugene Kurko
 
Ansible Tutorial For Beginners | What Is Ansible And How It Works? | Ansible ...
Simplilearn
 
Building Elixir App Release with Distillery and Docker
Mickey Chen
 
Intro to Erlang
Ken Pratt
 
Automating the Cloud with Terraform, and Ansible
Brian Hogan
 
Productive OpenCL with Intel Xeon Phi Coprocessors
Intel IT Center
 
Managing Eclipse Preferences for Teams (EclipseCon 2011)
Netcetera
 
Configuration primer
feanil
 
Erlang - Concurrent Language for Concurrent World
Zvi Avraham
 
Lightning Talk: Erlang on Xen - Mikhail Bortnyk
Elixir Club
 
Ansible training | redhat Ansible 2.5 Corporate course - GOT
keerthi124
 
A shallow dive into the elixir compiler
Jeffrey Chan
 
Creating Perl modules with Dist::Zilla
Mark Gardner
 
Open stack and_vagrant-os-meetup-2015
yfauser
 
Let's Get Acquainted: Ansible! / Symfony Camp UA 2014
Igor Brovchenko
 
eZ Publish Platform 5.4 public webinar
Roland Benedetti
 
Vancouver Erlang Meetup cferl & Mule Transport Plug
David Dossot
 
Tamir Dresher - Async Streams in C#
Tamir Dresher
 

Viewers also liked (18)

ODP
Using Erlang in an Embedded and Cross-Compiled World
Frank Hunleth
 
PDF
ELIXIR Node poster Denmark 2014
ELIXIR
 
PDF
ELIXIR Node poster Finland 2014
ELIXIR
 
PDF
ELIXIR Node poster Italy 2014
ELIXIR
 
PDF
ELIXIR and Impact presentation given by Jackie Hunter, Chief Executive, BBSRC...
ELIXIR
 
PDF
ELIXIR Node poster Switzerland 2014
ELIXIR
 
PDF
ELIXIR Node poster Israel 2014
ELIXIR
 
PDF
ELIXIR Node poster EMBL EBI
ELIXIR
 
PDF
ELIXIR Node poster Slovenia 2014
ELIXIR
 
PDF
ELIXIR Node poster Estonia 2014
ELIXIR
 
PDF
ELIXIR Node poster UK 2014
ELIXIR
 
PDF
Current and future plans for ELIXIR presentation given by Niklas Blomberg, EL...
ELIXIR
 
PDF
Use the @types, Luke
Brooklyn Zelenka
 
PDF
Embedded Erlang, Nerves, and SumoBots
Frank Hunleth
 
PPTX
Elixirs
Sadaqat Ali
 
PDF
Building a Network IP Camera using Erlang
Frank Hunleth
 
PDF
Introduction to Elixir
Diacode
 
PDF
My adventure with Elm
Yan Cui
 
Using Erlang in an Embedded and Cross-Compiled World
Frank Hunleth
 
ELIXIR Node poster Denmark 2014
ELIXIR
 
ELIXIR Node poster Finland 2014
ELIXIR
 
ELIXIR Node poster Italy 2014
ELIXIR
 
ELIXIR and Impact presentation given by Jackie Hunter, Chief Executive, BBSRC...
ELIXIR
 
ELIXIR Node poster Switzerland 2014
ELIXIR
 
ELIXIR Node poster Israel 2014
ELIXIR
 
ELIXIR Node poster EMBL EBI
ELIXIR
 
ELIXIR Node poster Slovenia 2014
ELIXIR
 
ELIXIR Node poster Estonia 2014
ELIXIR
 
ELIXIR Node poster UK 2014
ELIXIR
 
Current and future plans for ELIXIR presentation given by Niklas Blomberg, EL...
ELIXIR
 
Use the @types, Luke
Brooklyn Zelenka
 
Embedded Erlang, Nerves, and SumoBots
Frank Hunleth
 
Elixirs
Sadaqat Ali
 
Building a Network IP Camera using Erlang
Frank Hunleth
 
Introduction to Elixir
Diacode
 
My adventure with Elm
Yan Cui
 
Ad

Similar to Introduction to Phoenix Framework (Elixir) 2016-01-07 (20)

ODP
Basics Of Elixir and Phoenix
OnorioCatenacci
 
PPTX
Introduction to functional programming, with Elixir
kirandanduprolu
 
PPTX
Phoenix: Sent 200 OK in 3 μs
Manos Emmanouilidis
 
PDF
20240412 QFM010 Elixir Reading List March 2024
Matthew Sinclair
 
PDF
Phoenix Framework for the realtime web
Pedro Medeiros
 
PDF
Functional Programming With Elixir
Framgia Vietnam
 
PDF
Intro to Elixir talk
Carlos I. Peña
 
PDF
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
PDF
20240303 QFM006 Elixir Reading List February 2024
Matthew Sinclair
 
PDF
Introduction to Phoenix Web Framework
Riza Fahmi
 
PDF
Elixir and elm
Mix & Go
 
PDF
Elixir
Marek Kirejczyk
 
PDF
Introduction to Elixir And Phoenix
Neven Rakonić
 
PPTX
Elixir in the Wild
Benjamin Cates
 
ODP
Elm & Elixir: Functional Programming and Web
Publitory
 
PDF
Brief Intro to Phoenix - Elixir Meetup at BukaLapak
Riza Fahmi
 
PDF
Phoenix demysitify, with fun
Tai An Su
 
PPTX
Repeating History...On Purpose...with Elixir
Barry Jones
 
PDF
Elixir intro
Anton Mishchuk
 
PDF
Elixir for aspiring Erlang developers
Torben Dohrn
 
Basics Of Elixir and Phoenix
OnorioCatenacci
 
Introduction to functional programming, with Elixir
kirandanduprolu
 
Phoenix: Sent 200 OK in 3 μs
Manos Emmanouilidis
 
20240412 QFM010 Elixir Reading List March 2024
Matthew Sinclair
 
Phoenix Framework for the realtime web
Pedro Medeiros
 
Functional Programming With Elixir
Framgia Vietnam
 
Intro to Elixir talk
Carlos I. Peña
 
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
20240303 QFM006 Elixir Reading List February 2024
Matthew Sinclair
 
Introduction to Phoenix Web Framework
Riza Fahmi
 
Elixir and elm
Mix & Go
 
Introduction to Elixir And Phoenix
Neven Rakonić
 
Elixir in the Wild
Benjamin Cates
 
Elm & Elixir: Functional Programming and Web
Publitory
 
Brief Intro to Phoenix - Elixir Meetup at BukaLapak
Riza Fahmi
 
Phoenix demysitify, with fun
Tai An Su
 
Repeating History...On Purpose...with Elixir
Barry Jones
 
Elixir intro
Anton Mishchuk
 
Elixir for aspiring Erlang developers
Torben Dohrn
 
Ad

Recently uploaded (20)

PDF
Transcript: Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
PDF
Kit-Works Team Study_20250627_한달만에만든사내서비스키링(양다윗).pdf
Wonjun Hwang
 
PDF
Future-Proof or Fall Behind? 10 Tech Trends You Can’t Afford to Ignore in 2025
DIGITALCONFEX
 
PDF
Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
PDF
“NPU IP Hardware Shaped Through Software and Use-case Analysis,” a Presentati...
Edge AI and Vision Alliance
 
PDF
UPDF - AI PDF Editor & Converter Key Features
DealFuel
 
PDF
SIZING YOUR AIR CONDITIONER---A PRACTICAL GUIDE.pdf
Muhammad Rizwan Akram
 
PDF
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
PDF
Automating Feature Enrichment and Station Creation in Natural Gas Utility Net...
Safe Software
 
PPTX
MuleSoft MCP Support (Model Context Protocol) and Use Case Demo
shyamraj55
 
PPTX
Digital Circuits, important subject in CS
contactparinay1
 
PPT
Ericsson LTE presentation SEMINAR 2010.ppt
npat3
 
PDF
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Safe Software
 
PDF
AI Agents in the Cloud: The Rise of Agentic Cloud Architecture
Lilly Gracia
 
PDF
What’s my job again? Slides from Mark Simos talk at 2025 Tampa BSides
Mark Simos
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PDF
“Computer Vision at Sea: Automated Fish Tracking for Sustainable Fishing,” a ...
Edge AI and Vision Alliance
 
PDF
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
PPTX
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
PDF
“Squinting Vision Pipelines: Detecting and Correcting Errors in Vision Models...
Edge AI and Vision Alliance
 
Transcript: Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
Kit-Works Team Study_20250627_한달만에만든사내서비스키링(양다윗).pdf
Wonjun Hwang
 
Future-Proof or Fall Behind? 10 Tech Trends You Can’t Afford to Ignore in 2025
DIGITALCONFEX
 
Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
“NPU IP Hardware Shaped Through Software and Use-case Analysis,” a Presentati...
Edge AI and Vision Alliance
 
UPDF - AI PDF Editor & Converter Key Features
DealFuel
 
SIZING YOUR AIR CONDITIONER---A PRACTICAL GUIDE.pdf
Muhammad Rizwan Akram
 
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
Automating Feature Enrichment and Station Creation in Natural Gas Utility Net...
Safe Software
 
MuleSoft MCP Support (Model Context Protocol) and Use Case Demo
shyamraj55
 
Digital Circuits, important subject in CS
contactparinay1
 
Ericsson LTE presentation SEMINAR 2010.ppt
npat3
 
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Safe Software
 
AI Agents in the Cloud: The Rise of Agentic Cloud Architecture
Lilly Gracia
 
What’s my job again? Slides from Mark Simos talk at 2025 Tampa BSides
Mark Simos
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
“Computer Vision at Sea: Automated Fish Tracking for Sustainable Fishing,” a ...
Edge AI and Vision Alliance
 
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
“Squinting Vision Pipelines: Detecting and Correcting Errors in Vision Models...
Edge AI and Vision Alliance
 

Introduction to Phoenix Framework (Elixir) 2016-01-07