O'Reilly logo

Crafting Rails 4 Applications, 2nd Edition by José Valim

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Wrapping Up

In this chapter, we used Rails live-streaming functionalities to push server-sent events to the browser. Our implementation had a central entity listening for filesystem changes, which were pushed to a group of subscribers. We used Ruby’s built-in threads and queues to control the information flow throughout our system.

The topics discussed in this chapter are a basis to introduce code-loading techniques in Rails, and how those techniques affect the deployment of our applications. We glanced over thread safety and the subtleties involved with different web servers and Ruby implementations.

Next let’s see how to encapsulate our controllers’ behavior in an object called ActionController::Responder and customize it to suit our needs! ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required