Search code examples
architectureherokutwitter-bootstrapjava-ee-6web-deployment

Heroku - JavaEE - Twitter Bootstrap


I have developed a JEE6 back-end application with a twitter-bootstrap frontend. GUI talks to back-end via REST. The original plan was to run GUI on apache and then have a Jboss cluster at back-end to offer scalability and HA...all running on Amazon EC2

I am now looking at Heroku as an alternative..it looks much simpler etc to manage, scale and so on. I am wondering what is the best way to convert my current architecture to suit Heroku's model?...for ex. somehow run the twitter-bootstrap GUI as a ruby app and somehow talk to existing Java ee app?

Important note! :-) ..

  1. Our expertise is in JavaEE and our glaring weakness is web front end so be nice when describing front end alternatives.
  2. Because of point 1. (and other time constraints) a complete redesign of GUI and switching from our twitter bootstrap GUI with all features it offers such as datatables is not an option!

Thanks


Solution

  • Heroku does not support jboss, websphere or weblogic type java application servers. There is no global "application container" between all dynos. Each dyno is isolated, so it needs to be able to bind to a port itself.

    The typical way to think about it would be that your deployable process runs an embeddable webserver. Like jetty. https://devcenter.heroku.com/articles/deploy-a-java-web-application-that-launches-with-jetty-runner

    Or that you use Webapp Runner to serve a tomcat based app. https://devcenter.heroku.com/articles/java-webapp-runner

    On deploying two components, a heroku app can only bind to one port per app. Therefore create another heroku app. This gives the benefit of being able to update/deploy each part of the architecture independently and also scale them separately.