The Heroku Changelog

The Heroku Changelog is a feed of all public-facing changes to the Heroku runtime platform. While we announce all major new features via the Heroku blog, we're making small improvements all the time. When any of those improvements have any user-visible impact, you'll find them in the changelog.

Some recent examples of posts to the changelog include new versions of the Heroku CLI, a new error code, and changes to logging.

To get the latest on changes like these, visit the Heroku Changelog, or subscribe via feed or Twitter.

Matz Named 2011 Free Software Award Winner

We are pleased to announce that Yukihiro "Matz" Matsumoto, the creator of Ruby and Heroku's Chief Ruby Architect, has received the 2011 annual Advancement of Free Software Award. Presented by Richard Stallman and on behalf of the Free Software Foundation, the award is given each year to those who have greatly contributed to the freedom of software.

This is great news for Matz, who has dedicated over 20 years to the development of free software including the creation of the Ruby programming language. While writing Ruby he chose to focus on programmer happiness and productivity, and the result has been extraordinary. The popularity of the language, helped in part by the Rails framework, has encouraged a new generation of free software advocates who together have released more than 36,000 freely downloadable Ruby libraries known as Gems.

This award is also a huge win for Ruby. It's a recognition of Ruby's importance, will bring more people into the community, and encourages more developers to share their work. If you'd like to contribute to Ruby, visit the ruby core page where you can learn how to submit a patch or file a bug report.

We're very proud of the Ruby community as a whole, and for Matz and all of his accomplishments. So please join us today, along with the Free Software Foundation, in thanking him for all of his hard work.

Java Template Apps on Heroku

Learning a new language or framework can be both fun and rewarding. But tutorials only get you so far: one of the easiest ways to get started is by copying an existing sample app.

Today we're introducing template-based app creation for Java on Heroku. To try it out, go to www.heroku.com/java and click Create App on one of the four templates at the bottom of the page.

In seconds, you'll have your own copy of the app deployed and running on Heroku. You can then clone the app and start editing it in Eclipse or other development environment.

We've put together four Java app templates that represent the most popular and most exciting ways to build Java apps today. But Heroku is not limited to these frameworks. Heroku runs 100% open-standards Java, so you can run any Java application and use any framework. You can even use no framework at all, such as running stand-alone Java processes that are not web applications.

Deploy your first Java template app on Heroku today!

Introducing key/value data storage in Heroku Postgres

From the Heroku Postgres Blog:

"One of the great strengths of PostgreSQL is extensibility. Just as the JVM has become more than a way to just run Java—spawning languages such as Clojure and Scala—PostgreSQL has become more than just a home to relational data and the SQL language. Our first officially supported Postgres extension, hstore, enables you to build better apps faster without sacrificing the power, reliability, and flexibility of the underlying PostgreSQL storage engine. By using hstore, you will be able to leverage the flexibility and agility of schema-less data stores in existing environments..."

→ Read More

Check out the Heroku Postgres Blog to read more.

Introducing key/value data storage in Heroku Postgres

One of the great strengths of PostgreSQL is extensibility. Just as the JVM has become more than a way to just run Java—spawning languages such as Clojure and Scala—PostgreSQL has become more than just a home to relational data and the SQL language. Our first officially supported Postgres extension, hstore, enables you to build better apps faster without sacrificing the power, reliability, and flexibility of the underlying PostgreSQL storage engine.

By using hstore, you will be able to leverage the flexibility and agility of schema-less data stores in existing environments. Although hstore is a mature, stable solution, it has recently been gathering widespread excitement:

Support for hstore is available today in many popular languages and frameworks, including plugins for Django, Rails/ActiveRecord, Sequel, and Node.js. While you can be ahead of the curve now, hstore support will become a native part of ActiveRecord 4. You can add hstore to any Postgres 9.1 database today with a single command:

=> CREATE EXTENSION hstore;

Sample hstore App

If you want a jumpstart on using hstore, Heroku's Richard Schneeman has created a simple rails app demonstrating its usage. The code is available on Github.

An Agile Example

Let's imagine that you are building an online bookstore. You might create a products table with only a name, id, and hstore column in order to have maximum flexability as to what is stored in the table:

=> CREATE TABLE products (
     id serial PRIMARY KEY,
     name varchar,
     attributes hstore
   );

Then insert any type of data you need into the table:

=> INSERT INTO products (name, attributes) VALUES (
    'Geek Love: A Novel',
    'author    => "Katherine Dunn",
     pages     => 368,
     category  => fiction'
    );

Data in an hstore column can be queried based on the values of attributes,

=> SELECT name, attributes->'device' as device 
   FROM products 
   WHERE attributes->'edition'= 'ebook'

or queried based on the keys:

=> SELECT name, attributes->'pages' 
   FROM products
   WHERE attributes ? 'pages'

Someone you admire tells you that "nobody reads books anymore". No problem, pivot! You now sell electronics. That might require a change to your code or brand, but not your schema:

=>  INSERT INTO products (name, attributes)
    VALUES (
      'Leica M9',
      'manufacturer  => Leica,
       type          => camera,
       megapixels    => 18,
       sensor        => "full-frame 35mm"'
    ),
    ( 'MacBook Air 11',
      'manufacturer  => Apple,
       type          => computer,
       ram           => 4GB,
       storage       => 256GB,
       processor     => "1.8 ghz Intel i7 duel core",
       weight        => 2.38lbs'
    );

Of course, you can use the full power of PostgreSQL on this data. Values in hstore can be indexed:

=> CREATE INDEX product_manufacturer 
   ON products ((products.attributes->'manufacturer'));

And used in joins:

=> SELECT manufacturers.country, products.name
   FROM products, manufacturers
   WHERE products.attributes -> 'manufacturer' = manufacturers.name;

Conclusion

The pace of software development is accelerating. Agile processes, application frameworks, and cloud deployment platforms are force-multipliers driving this change. The PostgreSQL project has seen these trends and is embracing them.

Whether your software project has rapidly changing requirements, or inherently doesn't fit with traditional pre-defined schemas (applications dealing with user-generated data for example), hstore may be the solution you are looking for.

If you have suggestions for what can be built on top of the Postgres "platform", please let us know via @herokupostgres or in a comment below.

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