Heroku Rolls out Support for JavaScript within PostGres

There’s always battles waging in the technology community – Linux vs Windows, OpenStack vs AWS, DevOps vs NoOps vs SomeOtherKindOfOps. Another oft visited argument is the relation versus non-relational databases. Essentially the protagonists for the NoSQL movement suggest that relational databases are too slow, and don’t map well to complex data patterns. Antagonists counter that only a select bunch of massive users have the database size that makes performance a problem, especially since modern relational databases are faster than ever before and that mapping issues can be somewhat resolved using different approaches.

Of course more moderate folks, without a dogmatic view one way or the other would say that for some applications a relational database approach is preferable, while for others NoSQL rules the roost. For several releases now relation database PostgreSQL has begun expanding beyond a rigid relational/non-relational definition with a key/value store, the JSON datatype, and GeoSpatial support. The idea being that this approach makes a single database more flexible to different data approaches than previously. Essentially this is a case of seeing a database as a platform onto which extending technologies can be brought.

Another innovation on PostGres has been PLV8, a shared library that provides a PostgreSQL procedual language powered by V8 JavaScript Engine. With this program developers can write in JavaScript a function that is callable from SQL – putting the functionality near the data and removing the necessity to pull data out of a database in order to run a JS function over it.

It makes sense and is something that a number of vendors support – and today Heroku can be added to that list. Heroku is announcing support of Javascript within Databases using PLV8 – a combination of the Google developed V8 JavaScript engine and the work by Hitoshi Harada to create a procedural language within Postgres.

The key benefit here is one of aggregation This move isn’t earth shattering but it brings a more complete feature set onto the one platform. It’s a case of backfilling functionality that reduces the likelihood that heroku developers will look elsewhere for solutions. There’s lots of alternatives out there, but for existing Heroku users, the platform just got a little stickier.