Real-Time Rails: Implementing WebSockets in Rails 5 with Action Cable

It's been one year since Action Cable debuted at RailsConf 2015, and Sophie DeBenedetto is here to answer the question in the minds of many developers: what is it really like to implement "the highlight of Rails 5"? Sophie is a web developer and an instructor at the Flatiron School. Her first love is Ruby on Rails, although she has developed projects with and written about Rails, Ember and Phoenix.


Recent years have seen the rise of "the real-time web." Web apps we use every day rely on real-time features—the sort of features that let you see new posts magically appearing at the top of your feeds without having to lift a finger.

While we may take those features...

Read more →

Postgres 9.5 General Availability

Starting today, Postgres 9.5 is now the new default version for all new Heroku Postgres databases. We’ve had hundreds of customers using early beta versions of 9.5 and the feedback has been positive. For many customers, the new UPSERT functionality was the last feature that prevented many of them from moving from other relational databases to Postgres. The engineering staff at Heroku and the Postgres community at large has spent years bringing UPSERT to fruition and the customer feedback is a testament to that hard work. If you want to try out the new version, getting it is as simple as provisioning a new database:

$ heroku addons:create heroku-postgresql -a sushi 

More UPSERT

UPSERT,...

Read more →

Container-Ready Rails 5

Rails 5 will be the easiest release ever to get running on Heroku. You can get it going in just five lines:

$ rails new myapp -d postgresql $ cd myapp $ git init . ; git add . ; git commit -m first $ heroku create $ git push heroku master 

These five lines (and a view or two) are all you need to get a Rails 5 app working on Heroku — there are no special gems you need to install, or flags you must toggle. Let's take a peek under the hood, and explore the interfaces baked right into Rails 5 that make it easy to deploy your app on any modern container-based platform.

Production Web Server as the Default

Before Rails 5, the default web server that you get when you run $ rails server is...

Read more →

Announcing Heroku Kafka Early Access

Today we are happy to announce early access to Heroku Kafka. We think Kafka is interesting and exciting because it provides a powerful and scalable set of primitives for reasoning about, building, and scaling systems that can handle high volumes and velocities of data. Heroku Kafka makes Kafka more accessible, reliable, and easy to integrate into your applications.

What is Kafka?

Apache Kafka is a distributed commit log for fast, fault-tolerant communication between producers and consumers using message based topics. Kafka provides the messaging backbone for building a new generation of distributed applications capable of handling billions of events and millions of transactions.

At...

Read more →

Session Affinity now Generally Available

Today we are announcing that Session Affinity routing is now generally available as a fully supported part of the Heroku Platform. When Session Affinity is enabled for an app, requests from a given browser will always be routed to the same Dyno. Under the hood, the Heroku Router will add a cookie to all incoming requests from new clients; this cookie allows subsequent requests from that client to return to the same Dyno. With specific clients bound to specific Dynos, apps that depend on ‘sticky sessions’ can still take advantage of Heroku’s flexible scaling.

We introduced Session Affinity in Heroku Labs last April. Since then, many customers have built apps with the new routing strategy...

Read more →

Browse the blog archives, subscribe to the full-text feed, or visit the engineering blog.