Heroku and Java Not Ready For Enterprise Prime-Time (or JPA Either)

Heroku is promising the same things you’ve come to believe you need in an Enterprise-ready solution.  Reliability, scalability.  But Beware.  They actually state things like “you don’t need…” and name one or two Java EE stack items.  Doesn’t this cause the red flags to go up? 

 

The truth is that your applications that your developers created for the Java EE stack were built for the Java EE stack because a Java EE server provides things like scalability, authentication and transaction management.  You probably have a lot invested in those applications.  Not only that, but a Java EE container is a GOOD IDEA.    It centralizes many of the things that programmers had to previously code in every single application.  Now Heroku says you don’t need it.  Well there’s a pretty good chance you will be writing a lot of workarounds, and including a lot of extra JAR files in your code from now on because Heroku doesn’t provide any of the application server stuff.  

Consider something basic.  Every recent Java EE application uses something to map your Java class (which will be persisted as objects) into a data store.  Chances are it’s still a relational database.  And if it was developed in the last 3 years, it’s probably JPA which is the (current) technology.  To make this work with Heroku, you’ll need to include all the JAR files for JPA and you’ll need to re-write all your storage routines.  All of them.  Why?  Because Java EE uses JTA which is a technology where transactions are managed for you.  Since Heroku doesn’t have this, you now need to hire 100 programmers to write transaction routines for every time you write to any database.  Why is this?  Because the Java EE application server has code which takes care of doing the transactions for you.  It is well thought out!

And if you are just a Java Developer whose trying to get your web app to work on Heroku?  It seemed too good to be true for me, where I could have database access for free (for my small app).  It was too good to be true.  There are 2 or 3 ways it can be done.  Pay for a better database from Heroku.  Host your own database 24/7 (which makes Heroku redundant if you can do this), or use Spring with Hibernate or use use the Play framework.  But I don’t WANT to use Spring and HIbernate, I want to use JPA.  And I don’t WANT to use Play, since I know I can build an app just as quickly with Java EE.

So.  Heroku is not ready for Enterprise Java.

Advertisements

About SunKing2

Former web developer, guitar player, started Piano 2012 -yes still doing it! Recovery, sobriety, mental health advocate.
This entry was posted in Uncategorized. Bookmark the permalink.

2 Responses to Heroku and Java Not Ready For Enterprise Prime-Time (or JPA Either)

  1. FlorianM says:

    Hi, at least 3 years to late, but you are able to deploy your own ApplicationServer on Heroku. I think you overate the non present but mighty possibilities of JTA handled transactions.. For most cases begin() and commit()/rollback() are handled at the time you enter the container/leave the container. There is no need of many developers to do this all the time. Especially if you encapsulated it clearly in your access layer.

  2. amghenry says:

    Is Heroku not ready to Java or are you no ready to use Spring and Hibernate ?
    I would say that Spring/Hibernate lovers could make it on Heroku as per your explanation and you are free to do otherwise.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s