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
Saša Jurić
October 31, 2016
Programming
1.1k
2
Share
What's the fuss about Phoenix?
WebCamp Zagreb, 2016
Saša Jurić
October 31, 2016
More Decks by Saša Jurić
See All by Saša Jurić
Such Great Heights, Code BEAM Lite, Amsterdam 2018
sasajuric
0
200
Simplifying systems with Elixir - Belgrade
sasajuric
3
480
Simplifying systems with Elixir
sasajuric
2
600
Metagrokking Elixir
sasajuric
4
320
Solid Ground
sasajuric
15
1.3k
Solid Ground
sasajuric
3
930
Elixir - valentine edition
sasajuric
0
150
Phoenix
sasajuric
1
260
Phoenix
sasajuric
0
150
Other Decks in Programming
See All in Programming
Why Laravel apps break—Mastering the fundamentals to keep them maintainable
kentaroutakeda
1
310
inferと仲良くなる10分間
ryokatsuse
1
270
JavaDoc 再入門
nagise
0
210
権限チェックの一貫性を型で守る TypeScript による多層防御
mnch
4
970
TypeScriptだけでAIエージェントを作る フロント・エージェント・インフラのフルスタック実践
har1101
6
1.2k
3Dシーンの圧縮
fadis
1
470
横断組織出身のQAEがインプロセスQAEでつまずいたこと・活かせたこと
ty89
0
460
AI駆動開発勉強会 広島支部 第一回勉強会 AI駆動開発概要とワークショップ
hayatoshimiu
0
410
net-httpのHTTP/2対応について
naruse
0
340
AI時代だからこそ「Bloc」を採用する価値があるのかもしれない
takuroabe
0
260
Talking to terminals (and how they talk back) (KotlinConf 2026)
jakewharton
PRO
1
160
Inspired By RubyKaigi (EN)
atzzcokek
0
420
Featured
See All Featured
HDC tutorial
michielstock
2
680
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
320
What does AI have to do with Human Rights?
axbom
PRO
1
2.2k
GitHub's CSS Performance
jonrohan
1033
470k
The Limits of Empathy - UXLibs8
cassininazir
1
340
Building Flexible Design Systems
yeseniaperezcruz
330
40k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
11k
Optimising Largest Contentful Paint
csswizardry
37
3.7k
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
520
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
470
Heart Work Chapter 1 - Part 1
lfama
PRO
7
36k
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