Heroku - 3 The different programming languages

This lesson covers the different languages Heroku supports today, plus the integrations (add-ons) you can plug into a Heroku app. Heroku started in 2006 with Ruby as the only compatible language. It has since become a huge polyglot platform: it also officially supports Python, Node.js, Java, PHP, Go, Scala and Clojure. The growth is significant: the platform handles more than 25 billion requests per day, manages over 8 million apps, and offers more than 150 add-ons.

The most-used integrations

Among the 150+ integrations available, four are particularly popular:

  • Heroku Redis — an in-memory database, perfect when you need to store data that must be accessed frequently or very quickly.
  • Heroku Postgres — a standard SQL database to persist your application data and run queries against it.
  • Heroku Kafka — used for its fault tolerance and high-throughput communication between systems, providing a solid backbone for applications that must process billions of events and transactions.
  • Salesforce — the CRM leader, used to store everything related to your customers, payments and sales leads. Salesforce is also the owner of Heroku, so the integration between the two platforms is first-class.

Example application

To make all of this concrete, imagine a simple user management system that supports create / read / update / delete on users. The first step is to build a server in one of the supported languages; this server receives the requests and contains all the user-related logic. We then need somewhere to store users: a database — Heroku Postgres is a natural choice. To make the same users visible in Salesforce so everyone concerned can see them, Heroku Postgres can be synced with Salesforce, combining what lives in Postgres with the Salesforce side automatically.

To improve performance, instead of querying Postgres every time someone wants to read a user, we can introduce a cache layer using Heroku Redis. The application reads from Redis first; only if the data is not there does it fall back to Postgres. Note that Redis is designed only for read / display use cases here — there is no risk of accidental data manipulation when used as a cache. Heroku ships many more add-ons than the ones listed; the Heroku Elements marketplace is a catalog of those add-ons and is one of Heroku's most powerful tools. See you in the next lesson.