About This Title

Pages: 326
Published: March 2020
ISBN: 9781680507195
In Print

Skill Level Meter

Real-Time Phoenix

Build Highly Scalable Systems with Channels

by Stephen Bussey

Give users the real-time experience they expect, by using Elixir and Phoenix Channels to build applications that instantly react to changes and reflect the application’s true state. Learn how Elixir and Phoenix make it easy and enjoyable to create real-time applications that scale to a large number of users. Apply system design and development best practices to create applications that are easy to maintain. Gain confidence by learning how to break your applications before your users do. Deploy applications with minimized resource use and maximized performance.

eBook Formats:

  • PDF for desktop/tablets

  • epub for Apple Books, e-readers

  • mobi for Kindle readers

Get all eBook formats here for $27.95 (USD)

Add to Cart we accept visa, mastercard, amex, discover, paypal


Paperback Formats:

Please support indie bookstores!
Find indie bookstores in the U.S. Find indie bookstores around the world.


Real-time applications come with real challenges—persistent connections, multi-server deployment, and strict performance requirements are just a few. Don’t try to solve these challenges by yourself—use a framework that handles them for you. Elixir and Phoenix Channels provide a solid foundation on which to build stable and scalable real-time applications. Build applications that thrive for years to come with the best practices found in this book.

Understand the magic of real-time communication by inspecting the WebSocket protocol in action. Avoid performance pitfalls early in the development life cycle with a catalog of common problems and their solutions. Leverage GenStage to build a data pipeline that improves scalability. Break your application before your users do and deploy with confidence. Build a real-world project using solid application design and testing practices that help make future changes a breeze. Create distributed apps that can scale to many users with tools like Phoenix Tracker. Deploy and monitor your application with confidence and reduce outages.

Deliver an exceptional real-time experience to your users, with easy maintenance, reduced operational costs, and maximized performance, using Elixir and Phoenix Channels.

What You Need

You’ll need Elixir 1.9+ and Erlang/OTP 22+ installed on a Mac OS X, Linux, or Windows machine.

Resources

Releases:

  • P1.0 2020/03/31
  • B9.0 2020/03/09
  • B8.0 2020/01/25
  • B7.0 2020/01/09

Contents & Extracts

Introduction

  • Powering Real-Time Applications with Phoenix
    • Connect a Simple WebSocket excerpt
      • Why WebSockets?
      • Connecting our First WebSocket
      • WebSocket Protocol
      • Long Polling, a Real-Time Alternative
      • WebSockets and Phoenix Channels
      • Wrapping Up
    • First Steps with Phoenix Channels
      • What are Phoenix Channels?
      • Understanding Channel Structure
      • PubSub
      • Send and Receive Messages
      • Channel Clients
      • Wrapping Up
    • Restrict Socket and Channel Access
      • Why Restrict Access?
      • Add Authentication to Sockets
      • Add Authorization to Channels
      • Use Authentication from JavaScript
      • When to Write a New Socket
      • Wrapping Up
    • Dive Deep into Phoenix Channels
      • Design for Unreliable Connections
      • Use Channels in a Cluster excerpt
      • Customize Channel Behavior
      • Write Tests
      • Wrapping Up
    • Avoid Performance Pitfalls
      • Measure Everything
      • Keep Your Channels Asynchronous
      • Build a Scalable Data Pipeline
      • Wrapping Up
  • Building a Real-Time Application
    • Build a Real-Time Sneaker Store
      • From Product Requirements to a Plan
      • Set Up the Project
      • Render Real-Time HTML with Channels excerpt
      • Update a Client with Real-Time Data
      • Run Multiple Servers
      • Wrapping Up
    • Break Your Application with Acceptance Tests
      • The Power of Acceptance Testing
      • Break Your App Like a User
      • Break Your App Like a Server
      • Automate Acceptance Tests With Hound
      • Wrapping Up
    • Build a Real-Time Shopping Cart
      • Plan Your Shopping Cart
      • Scaffold Your Shopping Cart Channel
      • Build Your Shopping Cart Channel
      • Add Real-Time Out-Of-Stock Alerts
      • Acceptance Test the Shopping Cart
      • Wrapping Up
    • Track Connected Carts with Presence
      • Plan Your Admin Dashboard
      • On Track with Phoenix Tracker
      • Use Tracker in an Application
      • Phoenix Tracker Versus Presence
      • Scaffold the Admin Dashboard
      • Track Shopping Carts in Real-Time
      • Assemble the Admin Dashboard
      • Load Test the Admin Dashboard
      • Wrapping Up
  • Bringing Real-Time Applications to Production
    • Deploy Your Application to Production
      • The Lay of the Land
      • Achieve Scalability with Load Balancing
      • Push New Code Safely
      • Cluster Your BEAM Nodes Together
      • Advanced Phoenix Channel Configuration
      • Wrapping Up
    • Manage Real-Time Resources
      • Getting Comfortable with Elixir’s Scheduler
      • Manage Your Application’s Memory Effectively
      • Inspect a Running Application
      • Wrapping Up
  • Exploring Front-End Technologies
    • Hands-On with Phoenix LiveView
      • Getting Started with LiveView
      • Build a LiveView Product Page
      • Write Tests for a LiveView
      • Wrapping Up
    • Single-Page Apps with React
      • Manage Channel State in React
      • Write Channels as Components
      • Hands-On with React
      • React Native Channels
      • Wrapping Up
      • The End of Our Journey

Author

Steve Bussey is a software architect at SalesLoft focused on delivering the best experience possible for sales people and also his fellow engineers. He has written and led development on real-time Elixir applications that power critical features of business software. He is passionate about sharing Elixir due to the positive impact it has had on how he designs and writes applications.

eBook Formats:

  • PDF for desktop/tablets

  • epub for Apple Books, e-readers

  • mobi for Kindle readers

Get all eBook formats here for $27.95 (USD)

Add to Cart we accept visa, mastercard, amex, discover, paypal


Paperback Formats:

Please support indie bookstores!
Find indie bookstores in the U.S. Find indie bookstores around the world.

Related Titles:

Skill Level Meter

About This Title

Pages: 326
Published: March 2020
ISBN: 9781680507195
Edition: 1
In Print