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
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
470
Simplifying systems with Elixir
sasajuric
2
580
Metagrokking Elixir
sasajuric
4
300
Solid Ground
sasajuric
15
1.2k
Solid Ground
sasajuric
3
900
Elixir - valentine edition
sasajuric
0
140
Phoenix
sasajuric
1
240
Phoenix
sasajuric
0
130
Other Decks in Programming
See All in Programming
humanlayerのブログから学ぶ、良いCLAUDE.mdの書き方
tsukamoto1783
0
160
メルカリのリーダビリティチームが取り組む、AI時代のスケーラブルな品質文化
cloverrose
2
500
Grafana:建立系統全知視角的捷徑
blueswen
0
310
Python札幌 LT資料
t3tra
7
1.1k
AI Agent の開発と運用を支える Durable Execution #AgentsInProd
izumin5210
7
2.2k
Basic Architectures
denyspoltorak
0
640
なぜSQLはAIぽく見えるのか/why does SQL look AI like
florets1
0
410
GISエンジニアから見たLINKSデータ
nokonoko1203
0
200
ThorVG Viewer In VS Code
nors
0
750
責任感のあるCloudWatchアラームを設計しよう
akihisaikeda
3
130
副作用をどこに置くか問題:オブジェクト指向で整理する設計判断ツリー
koxya
1
560
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
330
Featured
See All Featured
GraphQLとの向き合い方2022年版
quramy
50
14k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
51k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
A Modern Web Designer's Workflow
chriscoyier
698
190k
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
0
190
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
Optimising Largest Contentful Paint
csswizardry
37
3.6k
Building Adaptive Systems
keathley
44
2.9k
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
110
Thoughts on Productivity
jonyablonski
74
5k
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
0
300
Designing for humans not robots
tammielis
254
26k
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