1. Computing

The Heroku Hacker's Guide by Randall Degges

Why Heroku? Why This Guide?

About.com Rating 4 Star Rating

By

The Heroku Hacker's Guide by Randall Degges

Why would anyone choose a cloud hosting service like Heroku over traditional virtual server hosting? And if you do choose Heroku, why buy this book? For many developers, cloud computing is still too "new," they're not familiar with it, not convinced by it, or stuck in their ways. However, cloud hosting (and particularly Heroku) provides excellent low-cost hosting, extreme flexibility and unparalleled scalability, all for flexible pricing. Once developers learn this, they at least want to get their feet wet in this new and exciting arena, but how? You can't very well set one up yourself, it's a bit more complicated than installing Linux and running a few servers. You're stuck learning to use a whole new platform (such as Heroku) right off the bat. And that can be confusing, but this is why The Heroku Hacker's Guide comes in.

The Heroku Hacker's Guide doesn't aim to be a complete reference (and since cloud computing moves rather quickly, such a reference would be out of date quickly anyway), but it does aim to orient you in the Heroku world. It gives you the information you need to get started, and in a no nonsense way. It won't hold your hand through the unrelated minutia, it assumes you already know how to start a command line window and how to use git. But that's OK, if you're a developer or even a beginner or hobbyist, these are things you probably already know. With laser focus, The Heroku Hacker's Guide gives you the information you need to start with Heroku.

What You Get

The Heroku Hacker's Guide is available in two forms: a $5+ DRM-free PDF or a $20 book. The minimum price for the PDF is $5, but you may (and are encouraged to) pay more. The book weighs in at a around 50 pages, which does sound short but keep reading. This is both a boon and bane.

The Heroku Hacker's Guide contains 14 chapters of note.

  • Why Heroku? - And overview of Heroku is given, as well as a well reasoned and broken down argument why you'd want to use Heroku over traditional hosting and other cloud hosting.
  • Getting Started with Heroku - Your first steps are taken here. This expands on the Quickstart Guide provided by Heroku itself.
  • Dynosaurs - The concept of a "dyno," or virtual machines that Heroku dynamically spins up when needed, is explored. You'll learn how to direct your dynos using Procfiles, how to scale your projects up and down by controlling the number of dynos running and list running dynos.
  • The Environment - Running your code on Heroku is not quite like running on other platforms. One thing you'll need to adapt to is configuring your code via environment variables, and this will get you pointed in the right direction in that regard.
  • Take The Pain Away (With Addons) - Heroku has a total of 89 addons available. These allow you to do anything from additional database servers to SMS gateways. Here you'll find information on enabling and configuring addons.
  • PostgreSQL Patterns - PostgreSQL is the native database server for Heroku. However, more developers are familiar with database servers like MySQL, or smaller databases like SQLite. But to fully take advantage of Heroku you're going to have to learn a few things about PostgreSQL. This is arguably the most valuable chapter of the entire guide.
  • Caching with Memcached - How to set up memcached to speed your web application's response times.
  • Scheduling Tasks with Cron - How to schedule tasks to run on your dynos at specific times.
  • Logging - How to get access to your Heroku, server and database logs. Since you have no direct control over the servers, and since the dynos handle requests in an unpredictable manner, Heroku combines your logs and gives you easy access to them.
  • Monitoring with New Relic - How to install the New Relic plugin and use it to monitor your app's performance, response times, errors, etc.
  • Talking to the World - This chapter covers pointing your own domains at your Heroku apps, as well as configuring SSL for HTTPS.
  • Managing Releases - Every time you push new code to Heroku, your app gets a new version number. But since everything is under version control, you can roll back to an earlier version. This chapter gives you the basics of how to do this.
  • Working with Others - Working by yourself is no fun, and you don't have to with Heroku. You can allow others to push to your Heroku apps, and this chapter tells you how to set it up.
  • Doing Great Things - This chapter goes over the mindset of a Heroku app and how to make your app fit in with their philosophy of things.

Conclusion

The Heroku Hacker's Guide is a great book. While it won't be useful for anyone already working with an familiar with Heroku, anyone just getting started could most certainly use a guide like this. It takes you on a whirlwind tour of what Heroku has to offer, gives you the basics of how to get started, and generally just gets you oriented. You won't find irrelevant details, fluff or filler. Your hand will not be held on any subjects other than Heroku itself. And this is a good thing, the things that would fill the extra pages, were they there, are things you probably already know anyway.

But with the benefit of brevity comes the curse of brevity. There are 14 chapters of note, plus a preface and the usual bits tacked on at the end, but only about 50 pages. Some of the chapters are barely a page long. While it's nice to just get the info you need to get started, some of the chapters are perhaps a bit too short, and could be fleshed out further. But overall this book is a great option for anyone wanting to develop on Heroku.

©2014 About.com. All rights reserved.