SlideShare a Scribd company logo
@josevalim / phoenixframework.org
Glossary
• Phoenix (web framework)
• Elixir (programming language)
• Erlang VM
Phoenix Framework
http://blog.whatsapp.com/index.php/
2012/01/1-million-is-so-2011/
2 million connections
on a single node
Intel Xeon CPU X5675 @ 3.07GHz
24 CPU - 96GB
Using 40% of CPU and Memory
Phoenix
Channels
var socket = new Phoenix.Socket("/ws");
socket.connect();
var channel = socket.channel(“chat:lobby");
channel.on("user_joined", function(message){
// ...
});
channel.on("new_message", function(msg){
// ...
});
$input.on("enter", function(e){
channel.push("new_message", {
content: $input.val(),
username: App.username
});
});
channel.join();
defmodule Chat.UserSocket do
use Phoenix.Socket
channel "chat:lobby", Chat.LobbyChannel
channel "room:*", Chat.RoomChannel
# def connect(params, socket)
# def id(socket)
end
defmodule Chat.LobbyChannel do
use Phoenix.Channel
def join("chat:lobby", message, socket) do
broadcast! socket, “user_joined”,
%{username: message[“username"]}
{:ok, socket}
end
def handle_in("new_message", message, socket) do
broadcast socket, "new_message",
%{content: message["content"],
username: messages[“username"]}
socket
end
end
Server
Browser
Native Mobile
Embedded Device
“Browser" (IE)
Outsideview
Server
Insideview
Client Server
Transport
socket.connect()
Channels
socket.join(channel)
Pubsub
• Distributed Erlang
• Redis
• PostgreSQL?
• XMPP?
• Isolated
• Concurrent
Subscriberspersecond
Time (s)
Clients
htop
phoenixframework.org
Phoenix Framework
Performance
HTTP(S)
Performance
Library Throughput (req/s) Latency (ms)
Plug (elixir) 198 328 0.63
Phoenix (elixir) 179 685 0.61
Gin (go) 176 156 0.65
Play (scala) 171 236 1.89
Express Cluster (node) 92 064 1.24
Martini (go) 32 077 3.35
Sinatra (ruby) 30 561 3.50
Rails (ruby) 11 903 8.50
$ wrk -t20 -c100 -d30S --timeout 2000
https://github.com/mroth/phoenix-showdown
Insideview
Client Server
• Isolated
• Concurrent
/users
/users
/
/admin
/search?q=elixir
IsolatedandConcurrent
• Crashes are isolated
• Data is isolated

(GC is per process, no global pauses)
• Load balances on IO and CPU

(efficient on multicore)
Productivity
Productivity
• Short-term productivity
• Documentation / Guides
• Workflows / Generators
• Long-term productivity
• Introspection
• Maintainability
Phoenix Framework
Phoenix Framework
Generatorsaslearningtools
$ mix phoenix.gen.html
$ mix phoenix.gen.json
$ mix phoenix.gen.channel
More…
• Form builders
• Static build tools with ES6 as default
• Live reloading
• Pretty error pages
• First-class concurrent test tools
• Packages via hex.pm
Longterm
productivity:
Applications
Application
Pubsub
Super
visor
TCP
Client
Applications
• Package and run our code
• Can be started and stopped as a unit
• Provide unified configuration
• Hold processes and state in the
supervision tree
ObserverDemo
Applications
• Introspection & Monitoring
• Visibility of the application state
• Easy to break into "components"
• Reasoning when things go wrong
Summingup
phoenixframework.org
Phoenix Framework
elixir-lang.org
Phoenix Framework
consulting and software engineering
@josevalim / phoenixframework.org

More Related Content

PDF
OAuth 2.0 Web Messaging Response Mode - OpenID Summit Tokyo 2015
PDF
文字コードに起因する脆弱性とその対策(増補版)
PDF
Oracle Integration Cloud 概要(20200507版)
PDF
SQLインジェクション総”習”編
PDF
Go言語で作る webアプリ@gocon 2013 spring
PDF
Xbyakの紹介とその周辺
PPTX
Keycloakの紹介と最新開発動向
PDF
AWSのPCI DSSへの取り組みと 押さえておきたい耳寄り情報
OAuth 2.0 Web Messaging Response Mode - OpenID Summit Tokyo 2015
文字コードに起因する脆弱性とその対策(増補版)
Oracle Integration Cloud 概要(20200507版)
SQLインジェクション総”習”編
Go言語で作る webアプリ@gocon 2013 spring
Xbyakの紹介とその周辺
Keycloakの紹介と最新開発動向
AWSのPCI DSSへの取り組みと 押さえておきたい耳寄り情報

What's hot (20)

PDF
ネットワーク ゲームにおけるTCPとUDPの使い分け
PDF
IDベース暗号の概観と今後の展望(次世代セキュア情報基盤ワークショップ )
PDF
暗号技術入門
PDF
Power app custom api v0.1.21.1221
PDF
[Golang] 以 Mobile App 工程師視角,帶你進入 Golang 的世界 (Introduction of GoLang)
PPTX
Test studio
PDF
Wazuh 打造 XDR 資安防護機制經驗分享 [2025/05/17] @台灣資安大會 @台北南港展覽二館
PDF
React Native - Getting Started
PDF
OpenID Connect 入門 〜コンシューマーにおけるID連携のトレンド〜
PPTX
FAPI and beyond - よりよいセキュリティのために
PPTX
PHPとシグナル、その裏側
PDF
Modern Authentication -- FIDO2 Web Authentication (WebAuthn) を学ぶ --
PDF
React(TypeScript) + Go + Auth0 で実現する管理画面
PDF
レシピの作り方入門
PDF
Kotlin vs Java | Edureka
PPTX
Introduction to Node js
PDF
Flyway使いたい
PDF
Go言語でBot開発やってみた
PDF
Object Oriented Programming with Laravel - Session 1
PPTX
Keycloakのステップアップ認証について
ネットワーク ゲームにおけるTCPとUDPの使い分け
IDベース暗号の概観と今後の展望(次世代セキュア情報基盤ワークショップ )
暗号技術入門
Power app custom api v0.1.21.1221
[Golang] 以 Mobile App 工程師視角,帶你進入 Golang 的世界 (Introduction of GoLang)
Test studio
Wazuh 打造 XDR 資安防護機制經驗分享 [2025/05/17] @台灣資安大會 @台北南港展覽二館
React Native - Getting Started
OpenID Connect 入門 〜コンシューマーにおけるID連携のトレンド〜
FAPI and beyond - よりよいセキュリティのために
PHPとシグナル、その裏側
Modern Authentication -- FIDO2 Web Authentication (WebAuthn) を学ぶ --
React(TypeScript) + Go + Auth0 で実現する管理画面
レシピの作り方入門
Kotlin vs Java | Edureka
Introduction to Node js
Flyway使いたい
Go言語でBot開発やってみた
Object Oriented Programming with Laravel - Session 1
Keycloakのステップアップ認証について
Ad

Similar to Phoenix Framework (20)

PDF
Node.js 101 with Rami Sayar
PDF
FITC - Node.js 101
PPTX
Webservices
PPT
Shell scripting - By Vu Duy Tu from eXo Platform SEA
PDF
Low Level Exploits
PPTX
Introduction to Phoenix Framework (Elixir) 2016-01-07
PDF
Echtzeitapplikationen mit Elixir und GraphQL
PDF
Nodejs a-practical-introduction-oredev
PDF
Introduction to linux
PDF
soft-shake.ch - Hands on Node.js
KEY
Using Smalltalk for controlling robotics systems
PDF
Elixir Into Production
KEY
Socket.io
PPT
JUDCon Brazil 2013 - Vert.x an introduction
PDF
Zenoh Tutorial
PDF
Felix HTTP - Paving the road to the future
PDF
A (Mis-) Guided Tour of the Web Audio API
PDF
Remote Notifications
PPT
Synapseindia dot net development web applications with ajax
PDF
WebSocket
Node.js 101 with Rami Sayar
FITC - Node.js 101
Webservices
Shell scripting - By Vu Duy Tu from eXo Platform SEA
Low Level Exploits
Introduction to Phoenix Framework (Elixir) 2016-01-07
Echtzeitapplikationen mit Elixir und GraphQL
Nodejs a-practical-introduction-oredev
Introduction to linux
soft-shake.ch - Hands on Node.js
Using Smalltalk for controlling robotics systems
Elixir Into Production
Socket.io
JUDCon Brazil 2013 - Vert.x an introduction
Zenoh Tutorial
Felix HTTP - Paving the road to the future
A (Mis-) Guided Tour of the Web Audio API
Remote Notifications
Synapseindia dot net development web applications with ajax
WebSocket
Ad

More from Pivorak MeetUp (20)

PDF
Lisp(Lots of Irritating Superfluous Parentheses)
PDF
Some strange stories about mocks.
PDF
Business-friendly library for inter-service communication
PDF
How i was a team leader once
PDF
Rails MVC by Sergiy Koshovyi
PDF
Introduction to Rails by Evgeniy Hinyuk
PPTX
Ruby OOP (in Ukrainian)
PDF
Testing in Ruby
PDF
Ruby Summer Course by #pivorak & OnApp - OOP Basics in Ruby
PDF
The Saga Pattern: 2 years later by Robert Pankowecki
PDF
Data and Bounded Contexts by Volodymyr Byno
PDF
Successful Remote Development by Alex Rozumii
PDF
Origins of Elixir programming language
PDF
Functional Immutable CSS
PDF
Multi language FBP with Flowex by Anton Mishchuk
PDF
Detective story of one clever user - Lightning Talk By Sergiy Kukunin
PDF
CryptoParty: Introduction by Olexii Markovets
PDF
How to make first million by 30 (or not, but tryin') - by Marek Piasecki
PDF
GIS on Rails by Oleksandr Kychun
PDF
Unikernels - Keep It Simple to the Bare Metal
Lisp(Lots of Irritating Superfluous Parentheses)
Some strange stories about mocks.
Business-friendly library for inter-service communication
How i was a team leader once
Rails MVC by Sergiy Koshovyi
Introduction to Rails by Evgeniy Hinyuk
Ruby OOP (in Ukrainian)
Testing in Ruby
Ruby Summer Course by #pivorak & OnApp - OOP Basics in Ruby
The Saga Pattern: 2 years later by Robert Pankowecki
Data and Bounded Contexts by Volodymyr Byno
Successful Remote Development by Alex Rozumii
Origins of Elixir programming language
Functional Immutable CSS
Multi language FBP with Flowex by Anton Mishchuk
Detective story of one clever user - Lightning Talk By Sergiy Kukunin
CryptoParty: Introduction by Olexii Markovets
How to make first million by 30 (or not, but tryin') - by Marek Piasecki
GIS on Rails by Oleksandr Kychun
Unikernels - Keep It Simple to the Bare Metal

Recently uploaded (20)

PPTX
CHAPTER 2 - PM Management and IT Context
PPTX
assetexplorer- product-overview - presentation
PDF
How to Make Money in the Metaverse_ Top Strategies for Beginners.pdf
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PPTX
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PDF
Product Update: Alluxio AI 3.7 Now with Sub-Millisecond Latency
PPTX
Operating system designcfffgfgggggggvggggggggg
DOCX
Greta — No-Code AI for Building Full-Stack Web & Mobile Apps
PPTX
Oracle Fusion HCM Cloud Demo for Beginners
PDF
17 Powerful Integrations Your Next-Gen MLM Software Needs
PPTX
Why Generative AI is the Future of Content, Code & Creativity?
PPTX
Advanced SystemCare Ultimate Crack + Portable (2025)
PDF
Website Design Services for Small Businesses.pdf
PDF
iTop VPN 6.5.0 Crack + License Key 2025 (Premium Version)
PDF
How AI/LLM recommend to you ? GDG meetup 16 Aug by Fariman Guliev
PDF
AutoCAD Professional Crack 2025 With License Key
PDF
Designing Intelligence for the Shop Floor.pdf
PPTX
Weekly report ppt - harsh dattuprasad patel.pptx
CHAPTER 2 - PM Management and IT Context
assetexplorer- product-overview - presentation
How to Make Money in the Metaverse_ Top Strategies for Beginners.pdf
Adobe Illustrator 28.6 Crack My Vision of Vector Design
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
Navsoft: AI-Powered Business Solutions & Custom Software Development
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
Product Update: Alluxio AI 3.7 Now with Sub-Millisecond Latency
Operating system designcfffgfgggggggvggggggggg
Greta — No-Code AI for Building Full-Stack Web & Mobile Apps
Oracle Fusion HCM Cloud Demo for Beginners
17 Powerful Integrations Your Next-Gen MLM Software Needs
Why Generative AI is the Future of Content, Code & Creativity?
Advanced SystemCare Ultimate Crack + Portable (2025)
Website Design Services for Small Businesses.pdf
iTop VPN 6.5.0 Crack + License Key 2025 (Premium Version)
How AI/LLM recommend to you ? GDG meetup 16 Aug by Fariman Guliev
AutoCAD Professional Crack 2025 With License Key
Designing Intelligence for the Shop Floor.pdf
Weekly report ppt - harsh dattuprasad patel.pptx

Phoenix Framework