Heroku at the Denver Clojure Meetup
Tonight (August 9, 2012) I’ll be at the Den of Clojure talking about Running Clojure Apps on the Cloud with Heroku. Hope to see you there!
Tonight (August 9, 2012) I’ll be at the Den of Clojure talking about Running Clojure Apps on the Cloud with Heroku. Hope to see you there!
Web applications are primarily comprised of data, services, and the User Interface (UI). The UI is comprised of HTML, CSS, images, and probably JavaScript. In the traditional web architecture all of the UI assets are static files except the HTML which is dynamically generated by the server. In the modern web architecture the entire UI is static files that consume RESTful / JSON services. The static files for the UI must be downloaded to the client so the less time it takes for them to be downloaded, the better the overall performance of the application.
Recently I co-presented a webinar about how to integrate Java Spring Apps on Heroku with the Force.com / Salesforce.com REST APIs. Check out the recording:
I’ve also created an in-depth walk through of the code example and step-by-step instructions for setting up and deploying the example Java Spring app on Heroku. Check it out and let me know how it goes.
Heroku now has an Eclipse Plugin that makes it super easy to deploy and manage Java apps on the Cloud! Here is a screencast that will show you how to get started with the Heroku Eclipse Plugin:
To learn more check out the Heroku Eclipse Integration site. Give it a whirl and let me know how it goes!
In my spare time I help out with a little app called [Greg’s Toolkit][1] that was built before I knew about Heroku. The app runs on EC2 and deploying new versions of the app is pretty tedious. Here is the deployment instructions copied directly from the project’s wiki:
./gradlew war
scp ./gft_server/build/libs/gft_server.war api.gregstoolkit.com:
ssh api.gregstoolkit.com
cd /opt/apache-tomcat-7.0.21
sudo -u www-data bin/shutdown.sh
cd webapps/ROOT
sudo rm -r *
sudo -u www-data jar -xvf ~/gft_server.war
sudo -u www-data sed -i 's/dev/prod/' WEB-INF/web.xml
cd ../..
sudo -u www-data bin/startup.sh
That certainly isn’t as cumbersome as some deployment methods but it is time consuming, error-prone, and causes downtime.
This Friday at OSCON 2012 I’ll be doing a presentation about Client/Server Apps with HTML5 and Java. Here is the session description:
The web application landscape is rapidly shifting back to a Client/Server architecture. This time around the Client is JavaScript, HTML, and CSS in the browser. The tools and deployment techniques for these types of applications are abundant and fragmented. This session will teach you how to pull together jQuery, LESS, Twitter Bootstrap, and some CoffeeScript to build the Client. The Server could be anything that talks HTTP but this session will use the Play Framework. You will also learn how to deploy Client/Server web apps on the cloud using a Content Delivery Network (Amazon CloudFront) for the Client and a Cloud Application Provider (Heroku) for the Server.
My friend Ryan Knight and I co-authored an article which has just been published on Artima: Getting Started with Play 2, Scala, and Squeryl. This article will help you get started building a Play 2 application from scratch that uses Scala and Squeryl for ORM. The article also covers how use ScalaTest, JSON, jQuery, CoffeeScript, and deployment on Heroku. Give it a try and let me know how it goes!
Tomorrow night (July 10, 2012) I’ll be presenting about Continuous Delivery on the Cloud at the Nashville Java Users’ Group. This presentation focuses on how to implement continuous delivery in cloud environments. I will use Play 2 and Heroku to illustrate concepts like managing configuration, schema changes, and externalized state. I hope to see you there!
Hey Denver Salesforce.com and Heroku developers! Tonight we are doing a developer meetup at Wynkoop. Come on down for free food, drinks, and networking from 6 - 8. RSVP and hopefully I’ll see you tonight!
Update: There is now a detailed doc in Play’s documentation about configuring Play’s thread pools.
Last week Matt Raible and I presented the Play vs. Grails Smackdown at ÜberConf. The goal of the session was to compare Play 2 + Java with Grails by creating the same app with each framework. We used a number of criteria for the comparison including some benchmarks. You can read more about the results in Matt’s session recap blog. After presenting the results we learned that it’s pretty important to optimize Play 2’s Akka threading system in these types of applications. Play 2 is optimized out-of-the-box for HTTP requests which don’t contain blocking calls (i.e. asynchronous). Most database-driven apps in Java use synchronous calls via JDBC so Play 2 needs a bit of extra configuration to tune Akka for these types of requests.