Wrapping Up
In this chapter, you learned to build simple client/server APIs with Phoenix channels. Though the problem had many layers, it was easy to understand the flow because clients connected to servers, and both sides maintained the connection until the conversation was over. Along the way:
-
You learned to connect to a server-side channel through an ES6 client.
-
We built a server-side channel with both long-polling and WebSocket support.
-
We built a simple API to let users join a channel.
-
We processed inbound messages from OTP with handle_info and channels with handle_in.
-
We sent broadcast messages with broadcast!.
-
We authenticated users with Phoenix.Token.
-
We persisted annotations with Ecto, and exposed those new features through our Multimedia ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access