Wrapping Up

Phoenix Channels provide the backbone for our application’s real-time messaging. Our application is only sending messages from server to client right now, but we still benefit from the simplicity and reliability of the Channel library. We sent HTML directly from server to client as well as JSON payloads that were processed by a JavaScript front end. The flexibility of using either HTML replacement or JavaScript event handling gives you several different ways to approach the same problem.

Phoenix also provides the PubSub feature that powers our real-time replication. We were able to enhance the existing GenServer implementation with replication across a cluster. This was necessary to ensure that our application could run across multiple servers without having data consistency issues.

We’re going to step back from building an application in our next chapter. We’ll explore how to break an application that we’ve built. The quality assurance process is very important for becoming confident that our application won’t break in production.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset