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
What's the fuss about Phoenix?
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Saša Jurić
October 31, 2016
Programming
2
1.1k
What's the fuss about Phoenix?
WebCamp Zagreb, 2016
Saša Jurić
October 31, 2016
Tweet
Share
More Decks by Saša Jurić
See All by Saša Jurić
Such Great Heights, Code BEAM Lite, Amsterdam 2018
sasajuric
0
190
Simplifying systems with Elixir - Belgrade
sasajuric
3
480
Simplifying systems with Elixir
sasajuric
2
590
Metagrokking Elixir
sasajuric
4
300
Solid Ground
sasajuric
15
1.3k
Solid Ground
sasajuric
3
910
Elixir - valentine edition
sasajuric
0
140
Phoenix
sasajuric
1
240
Phoenix
sasajuric
0
130
Other Decks in Programming
See All in Programming
Claude Codeログ基盤の構築
giginet
PRO
7
3.4k
CSC307 Lecture 14
javiergs
PRO
0
480
PHPで TLSのプロトコルを実装してみる
higaki_program
0
240
Go Conference mini in Sendai 2026 : Goに新機能を提案し実装されるまでのフロー徹底解説
yamatoya
0
610
grapheme_strrev関数が採択されました(あと雑感)
youkidearitai
PRO
1
230
ふつうの Rubyist、ちいさなデバイス、大きな一年
bash0c7
0
1.1k
Takumiから考えるSecurity_Maturity_Model.pdf
gessy0129
1
150
Codexに役割を持たせる 他のAIエージェントと組み合わせる実務Tips
o8n
4
1.4k
RAGでハマりがちな"Excelの罠"を、データの構造化で突破する
harumiweb
9
2.9k
Claude Code Skill入門
mayahoney
0
400
守る「だけ」の優しいEMを抜けて、 事業とチームを両方見る視点を身につけた話
maroon8021
3
1.1k
API Platformを活用したPHPによる本格的なWeb API開発 / api-platform-book-intro
ttskch
1
150
Featured
See All Featured
Code Reviewing Like a Champion
maltzj
528
40k
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
0
240
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Building Applications with DynamoDB
mza
96
7k
Building the Perfect Custom Keyboard
takai
2
710
Into the Great Unknown - MozCon
thekraken
40
2.3k
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
100
RailsConf 2023
tenderlove
30
1.4k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
2
990
Agile that works and the tools we love
rasmusluckow
331
21k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.7k
Transcript
What’s the fuss about Phoenix? @sasajuric aircloak.com
Phoenix web framework Elixir programming language Erlang VM written in
runs on
productivity simplicity maintainability interoperability fault-tolerance scalability
Erlang is a programming language used to build massively scalable
soft real-time systems with requirements on high availability. erlang.org
None
None
separate execution no shared memory separate garbage collection cooperation through
communication isolated crashes detectable crashes of other processes
run different "things" separately
scheduler scheduler scheduler scheduler CPU CPU CPU CPU Erlang VM
Node 1 Node 2 Node 3
None
None
DEMO
conn conn your code
conn conn plug
conn log conn handle authenticate authorize fetch session
endpoint conn conn router controller
endpoint conn conn router controller endpoint conn conn router controller
endpoint conn conn router controller
CODE
client server socket
client server
client server join "lobby" send "room:42", "message", payload send "room:42",
"message", payload socket send “lobby", "rooms", payload join "room:42"
socket client channel channel socket client channel channel
import Socket from "phoenix" socket = new Socket("/socket") socket.connect() room
= socket.channel("room:elixir", payload) room.join()
room.push("some_event", payload) room.on("some_event", (payload) => { // ... })
defmodule MyEndpoint do socket "/socket", MySocket # ... end
defmodule MySocket do use Phoenix.Socket transport :websocket, Phoenix.Transports.WebSocket transport :longpoll,
Phoenix.Transports.LongPoll channel "lobby", LobbyChannel channel "room:*", RoomChannel # ... end
defmodule RoomChannel do use Phoenix.Channel def join(topic, payload, socket) do
# ... end def handle_in(event, payload, socket) do # ... end def handle_info(erlang_message, socket) do # ... end end
push(socket, event, payload) broadcast(socket, event, payload) broadcast_from(socket, event, payload)
on_some_ui_event(() => channel.push("user_message", payload)) channel.on("user_message", (payload) => render(payload))
defmodule RoomChannel do # ... def handle_in(event, payload, socket) do
broadcast(socket, event, payload) # ... end # ... end
conference program chat
conference program chat ticket purchasing newsletters ratings raffles administration …
start simple go far
onboarding - getting started guides - Elixir - Phoenix -
elixirforum.com
40% off with code ctwwczg at manning.com https://joind.in/talk/60946