Acknowledgments |
|
ix | |
Introduction |
|
xi | |
|
|
1 | (14) |
|
The Case for Real-Time Systems |
|
|
1 | (2) |
|
The Layers of a Real-Time System |
|
|
3 | (3) |
|
|
6 | (3) |
|
Achieving Real-Time in Elixir |
|
|
9 | (1) |
|
Building Real-Time Systems |
|
|
10 | (1) |
|
|
10 | (5) |
|
Part I Powering Real-Time Applications with Phoenix |
|
|
|
2 Connect a Simple WebSocket |
|
|
15 | (12) |
|
|
16 | (1) |
|
Connecting our First WebSocket |
|
|
17 | (1) |
|
|
18 | (5) |
|
Long Polling, a Real-Time Alternative |
|
|
23 | (2) |
|
WebSockets and Phoenix Channels |
|
|
25 | (1) |
|
|
26 | (1) |
|
3 First Steps with Phoenix Channels |
|
|
27 | (26) |
|
What are Phoenix Channels? |
|
|
28 | (1) |
|
Understanding Channel Structure |
|
|
29 | (8) |
|
|
37 | (1) |
|
Send and Receive Messages |
|
|
38 | (7) |
|
|
45 | (6) |
|
|
51 | (2) |
|
4 Restrict Socket and Channel Access |
|
|
53 | (14) |
|
|
53 | (1) |
|
Add Authentication to Sockets |
|
|
54 | (5) |
|
Add Authorization to Channels |
|
|
59 | (3) |
|
Use Authentication from JavaScript |
|
|
62 | (1) |
|
When to Write a New Socket |
|
|
63 | (2) |
|
|
65 | (2) |
|
5 Dive Deep into Phoenix Channels |
|
|
67 | (24) |
|
Design for Unreliable Connections |
|
|
67 | (4) |
|
Use Channels in a Cluster |
|
|
71 | (3) |
|
Customize Channel Behavior |
|
|
74 | (5) |
|
|
79 | (10) |
|
|
89 | (2) |
|
6 Avoid Performance Pitfalls |
|
|
91 | (30) |
|
|
92 | (6) |
|
Keep Your Channels Asynchronous |
|
|
98 | (3) |
|
Build a Scalable Data Pipeline |
|
|
101 | (16) |
|
|
117 | (4) |
|
Part II Building a Real-Time Application |
|
|
|
7 Build a Real-Time Sneaker Store |
|
|
121 | (20) |
|
From Product Requirements to a Plan |
|
|
122 | (2) |
|
|
124 | (1) |
|
Render Real-Time HTML with Channels |
|
|
125 | (6) |
|
Update a Client with Real-Time Data |
|
|
131 | (4) |
|
|
135 | (5) |
|
|
140 | (1) |
|
8 Break Your Application with Acceptance Tests |
|
|
141 | (20) |
|
The Power of Acceptance Testing |
|
|
142 | (1) |
|
Break Your App Like a User |
|
|
143 | (5) |
|
Break Your App Like a Server |
|
|
148 | (5) |
|
Automate Acceptance Tests With Hound |
|
|
153 | (7) |
|
|
160 | (1) |
|
9 Build a Real-Time Shopping Cart |
|
|
161 | (30) |
|
|
162 | (3) |
|
Scaffold Your Shopping Cart Channel |
|
|
165 | (6) |
|
Build Your Shopping Cart Channel |
|
|
171 | (10) |
|
Add Real-Time Out-Of-Stock Alerts |
|
|
181 | (5) |
|
Acceptance Test the Shopping Cart |
|
|
186 | (4) |
|
|
190 | (1) |
|
10 Track Connected Carts with Presence |
|
|
191 | (30) |
|
Plan Your Admin Dashboard |
|
|
192 | (2) |
|
On Track with Phoenix Tracker |
|
|
194 | (2) |
|
Use Tracker in an Application |
|
|
196 | (5) |
|
Phoenix Tracker Versus Presence |
|
|
201 | (1) |
|
Scaffold the Admin Dashboard |
|
|
202 | (5) |
|
Track Shopping Carts in Real-Time |
|
|
207 | (4) |
|
Assemble the Admin Dashboard |
|
|
211 | (3) |
|
Load Test the Admin Dashboard |
|
|
214 | (2) |
|
|
216 | (5) |
|
Part III Bringing Real-Time Applications to Production |
|
|
|
11 Deploy Your Application to Production |
|
|
221 | (16) |
|
|
222 | (3) |
|
Achieve Scalability with Load Balancing |
|
|
225 | (3) |
|
|
228 | (3) |
|
Cluster Your BEAM Nodes Together |
|
|
231 | (2) |
|
Advanced Phoenix Channel Configuration |
|
|
233 | (2) |
|
|
235 | (2) |
|
12 Manage Real-Time Resources |
|
|
237 | (20) |
|
Getting Comfortable with Elixir's Scheduler |
|
|
237 | (5) |
|
Manage Your Application's Memory Effectively |
|
|
242 | (7) |
|
Inspect a Running Application |
|
|
249 | (4) |
|
|
253 | (4) |
|
Part IV Exploring Front-End Technologies |
|
|
|
13 Hands-On with Phoenix LiveView |
|
|
257 | (18) |
|
Getting Started with LiveView |
|
|
258 | (6) |
|
Build a LiveView Product Page |
|
|
264 | (6) |
|
Write Tests for a LiveView |
|
|
270 | (3) |
|
|
273 | (2) |
|
14 Single-Page Apps with React |
|
|
275 | (16) |
|
Manage Channel State in React |
|
|
276 | (1) |
|
Write Channels as Components |
|
|
277 | (3) |
|
|
280 | (7) |
|
|
287 | (1) |
|
|
288 | (1) |
|
|
289 | (2) |
Bibliography |
|
291 | (2) |
Index |
|
293 | |