7 ms·
Heroku for Java
- sriramk 15y agoYou do have to wonder what the moves of the last few weeks mean for DotCloud. With Heroku launching support for many non-RoR languages and CloudFoundry being adopted by other PaaS players, you have to wonder whether small players like DotCloud are going to get squeezed out.
- erikb 15y agoWelcome to real life!
- gfodor 15y agoAs far as I understood it, it's apples and oranges. DotCloud provides specific services, for example, running a Solr cluster, which is a higher level of abstraction really than providing support for a specific programming language.
- r00fus 15y agoI don't. Besides Heroku is supported by salesforce.com, so there's at least some longevity and synergy between the two. Also, not all PaaS players will commoditize over the same feature-set. Example in point, Heroku's Java support doesn't allow you to put a .war file up like you can do in Amazon's Elastic Beanstalk.
- thebootstrapper 15y agoNot really, Amazon web services launched Elastic Cache based on Memcache thats Dotcloud's meal. Since Amazon is mostly customer driven more the need for specific platform AWS will launch likely.
- tlrobinson 15y agoI love Heroku, but I think eventually these kinds of platforms will be commoditized by CloudFoundry and other open source implementations.
- jackowayed 15y agoI don't. I've tried a few others. Both Dotcloud and Duostack (before the acquisition). But I always ran into one or two little sticking points or things it couldn't do or things it could do but not easily. I keep coming back to Heroku, for both Ruby and now Clojure. (And now that their Node.js hosting isn't awful, I'd probably use it for that too if I did something in Node). It makes it so easy for me to get an app out, even with little wrinkles like needing some configuration variables that I don't want to check in to my codebase.
- chopsueyar 15y agoAh, yes, the SUV of programming languages.
- deleted 15y ago[deleted]
- jinushaun 15y agoTheir Hello World example looks awful... And the majority of the article is spent apologising for Java.
- bitops 15y agoIt's not pretty, but it is the lowest level of abstraction. If they used a prettier example, they'd have to pick a framework and then people would complain "hey, why'd you pick X and not Y?"
- vynch 15y agoi so want to code this app in Java...NOT!!
- deleted 15y ago[deleted]
- panchute 15y agoI wish they supported - here is a war file, run it...
- jhowell 15y agoDon't you get that by FTP'ing your WAR to Tomcat, whether running on a dedicated server, VPS or in the Cloud, or am I missing something and overly complicating my life?
- mseebach 15y agoYou're missing the bit where you run Tomcat on a VPS. Deploying RoR isn't much more complicated, but still infinitely more complicated than dropping it on Heroku and having it just work. Plus scaling: breaking a sweat on Heroku? Push a button. On your VPS? All kinds of trouble, just when you probably have other things on your mind.
- aphexairlines 15y agoIf you want "here is a war file" then aren't you looking for beanstalk and appengine?
- mypov 15y agoCloudfoundry as well.
- bigbento 15y agoAmazon's Elastic Beanstalk is a good compromise in this regard. I've been using it to develop some JRuby/Sinatra backend services, and though it's not quite as simple as Heroku, it's pretty close. Since the applications are just EC2 instances underneath the hood, you can tweak the server image quite a bit too, which is nice when you need to run some odd binary programs along side your web application. I haven't played around with Beanstalk's autoscaling feature yet, but that might come in handy for processing background jobs that fluctuate a lot.
- swGooF 15y agoTry Cloudbees for that. Plus they do continuous integration with Jenkins as well.
- Lewisham 15y agoWonderful news. Heroku keeps going from strength to strength. I know a lot of people who'll be interested in this... I'm very pleased that Scala is deployable. Awesome.
- typicalrunt 15y agoIf they supported git pushing a war file, then I wonder what the performance improvements would be with Warble-ing a RoR app and running it on a JVM? Edit Oh wait, they already did. But not using a WAR file it seems. For example, JRuby is one of the most frequently-requested languages on Heroku. Matthew Rodley has already put a Rails app onto JRuby on Heroku by adding JRuby to pom.xml. Scala, another common request, could be done the same way. We do look forward to being able to offer the same kind of first-class support for JRuby and Scala that we offer for Clojure; but in the meantime, bootstrapping via Java is a reasonable strategy. Now if we could just get some performance comparisons between the Ruby and Java platforms on Heroku... pretty please?
- khaless 15y agoI'll hook something together this weekend in terms of a benchmark. The nice thing with JRuby is you get the concurrency features of the runtime.
- jshen 15y agoa lot of ruby code isn't threadsafe. I'm pretty sure rails isn't.
- atambo 15y agoRails is threadsafe if you turn it on by uncommenting config.threadsafe! in your environment initializer.
- jshen 15y agoThat's not what I mean. That will make it run with concurrent threads per request. However, I'm fairly certain it isn't threadsafe. Somewhere around 3.0.6 I made a simple jruby rails app and a sinatra app. They were both a thin REST layer over data in mongodb (No AR). I did load testing and the sinatra app ran fine, the rails app would fail on about 7% of requests with seemingly random stack traces. When I reran the tests with config.threadsafe! turned OFF it never failed. Also, on Bob Lee's OSCON talk he mentioned some unthreadsafe code in AR that he found. http://www.oscon.com/oscon2011/public/schedule/detail/21092 http://www.oscon.com/oscon2011/public/schedule/detail/21092
- arkitaip 15y agoHere's hoping that the next language will be Python.
- KevinEldon 15y agoIf JRuby deploys then I'd suspect that Jython would too.
- technomancy 15y agoJython's pretty far behind other Python implementations from what I understand.
- MostAwesomeDude 15y agoThey are working on it.
- chedigitz 15y agoPython seems to be working on Heroku already, not sure if its officially supported. https://gist.github.com/1004844 https://gist.github.com/1004844 until then there's a good list for django http://www.quora.com/What-is-the-Heroku-equivalent-for-Django-applications http://www.quora.com/What-is-the-Heroku-equivalent-for-Djang...
- cdr 15y agoLast time I tried one of those gists, it plain didn't work. Not sure if the gist I tried was outdated by then or if things are working now.
- rupak 15y agoHi, I am a cofounder of Genforma http://genforma.com http://genforma.com and we offer django paas. our deployment and management infrastructure is now open source (see https://github.com/genforma/engage https://github.com/genforma/engage), please take a look!
- grandalf 15y agoHey Heroku, please get yourself PCI-DSS Level 1 certified! BTW does anyone know if any of the ruby cloud providers offer that?
- deleted 15y ago[deleted]
- protagonist_h 15y agoGoogle App Engine for Java is another PaaS option for running Java in the cloud. I wonder how these two compare?
- aphexairlines 15y agoalso Amazon Elastic Beanstalk.
- edvinasbartkus 15y agoalso CloudFoundry (still Beta though)
- tomas_lin 15y agoElastic Beanstalk is also available in US_East region. If your company is not based there, you end up getting fairly unmanageable lag. CloudFoundry Beta has some really bad limitation right now, ie. no pricing, cannot assign point an external domain name, etc.
- tomas_lin 15y agoGoogle App Engine has a fairly restrictive Java implementation. It means that most libraries that you are familiar with would likely not work there. So you can't really just take a war file that works somewhere else and stick it on App Engine. They do provide a few nice built-in service like image manipulation. The problem with services like Cloudbees and Amazon's Elastic Beanstalk is that you end up updating an entire war file that you build locally. This can take a long time. Cloudfoundry only serves up deltas, but you still end up having to build the entire war file on your local machine ( at least for Grails ). Heroku's approach seems much nicer, you get some initial setup pain, but then you can just use a standard git workflow.
- SachaLabourey 15y agoTomas, this is not true, at least with CloudBees you have a delta deployer that makes it a breeze to update your applications as it just sends the delta from the last upload!
- devth 15y agobeauty and the beast
- Finbarr 15y agoThis is fantastic news. Heroku is squarely positioning itself as the de facto cloud app platform.
- deleted 15y ago[deleted]
- aphexairlines 15y agoI don't understand this part: > In the classic software delivery process (development → packaging → distribution → install → deployment), code passes through many hands before it finally reaches the end user. Developers build, QA verifies, ops deploys, and finally end users can access. In this environment, the feedback loop for information about how code behaves in production is slow and inefficient — it may take weeks or months for this to make it back to developers, and often in a highly-filtered format. > Heroku is built for the new era of software-as-a-service. An app is built by a small, cross-functional, relatively independent team which builds and deploys everything itself, with few or no hand-offs to other teams. What's the difference here? Developers still build and QA still has to verify. If your code is split up into several repositories, you still want to track versions (packaging & distribution, even if a package is just a branch + revision number).
- Volpe 15y agoThey are talking about 'cross functional' teams. So Devs/QAs/Ops can be in the same team, even the same people. Because they (Heroku) are handling all the edge-knowledge of server setup/maintenance etc. You only need to track revision number, in a single repo (maybe with branches, sure). I'm not sure what you mean by "code split into several repositories" ? The difference is deployments become cheap thus "delivering software" becomes cheaper.
- aphexairlines 15y agoBy several repositories, I mean libraries. Maybe built by your team, maybe by another team. And I still don't see how Heroku hosting your software affects whether you have dedicated QA staff and whether they're in your team or not.
- bitops 15y agoIt has to do with how quickly you can iterate on your production software and what the distance is (in terms of time) between a developer committing a change and that change making it out in front of an end-user. In traditional enterprise software (e.g. insurance) the deployment cycles are long because the organization are large, heavily layered, and extremely resistant to change. There are many reasons for this, some sensible and some not. (And then some that are legislated - they fall into both categories). For a startup that is trying to build a service, or a mid-sized corporation, particularly in the ecommerce space, the faster you can change a deployed solution, the better off you are. Say you're running a large ecommerce website and a bug is discovered on the user account page. It's a "P1 issue" that needs immediate attention, i.e. as long as the bug exists, revenue is impacted. In a situation like this, you want to be able to identify a fix, commit it, and ship it to production ASAP. This becomes an issue in traditional organizations where the "developers" are different from "the network people" who themselves are subdivided into database/network/sysadmin/etc. These groups are change-averse and tend to gate releases into maintenance windows. Which makes sense, but can hinder rapid deployment. If you don't have a traditional Ops team, there's no stakeholder who feels you're impinging on their fiefdom when you wantonly hit the deploy button. (Though I don't mean to imply that you shouldn't have discipline around releases). The question you're asking is very relevant for teams making the transition to processes like Agile and infrastructures like Cloud. Because these things are disruptive, they lead to change and break-down of traditional org structures. A dedicated QA department always seems to be one of the first things targeted. (Though I don't necessarily think that's a good idea).
- hello_moto 15y agoI want my Java EE6 there darn it. :) PS: FYI, so far none of the cloud solution support Java EE6
- bitops 15y agoAre there times when you prefer Java EE over Spring and the like? Java EE does some things well, but it seems like lots of comparable libraries/etc are offered in the open source side of things. Not knocking, really just curious about your opinion.
- hello_moto 15y agoMaybe it's preference/bias but I found the latest Java EE6 offers a lot simpler programming model than its predecessor or Spring. I also prefer to stick with 1 container as opposed to mix-n-match Spring modules + Hibernate + Apache CXF/Axis2 or whatnot. Most libraries out there boasted that they implement the JSR standard but they don't stop there as they also added their own extensions + configurations. There are a few missing parts in Java EE: MVC and dealing with NoSQL which both will be addressed in Java EE7 from what I know. Spring has SpringMVC and SpringData so they're ahead right now. What I don't like from Spring is the complexity of the setup (dependency, albeit Maven helps) and knowing various Spring modules and how they works with your preferred app-server. With Spring, at some point, you need to know a few key integration points between Spring and your app-server. For example: deploying an EAR solution that contains multiple WARs and JARs would require to understand Spring lifecycle, setup/configuration if you'd like to behave according to your requirement. A plus point using Java EE6 is to trim down your EAR/WAR. Spring pulls many JARs.
- bitops 15y agoThat's a fair point, I guess I've been spoiled. I guess I just don't mind knowing those integration points and working with them, but I can definitely see how it would put a bad taste in your mouth after a while. The NoSQL integration I think will be big. I know some folks using SpringData to talk to MongoDB and they've had positive experiences so far. Maybe in the future things will get simpler - so far I've found that I'm pretty happy with either embedded Jetty or Tomcat. And then Spring/Jersey + Hibernate/JPA. Have you found that EAR/WAR size has hampered you? I tend not to worry about how many JARs I'm pulling.
- bitops 15y agoI've been hoping for this since I first used Heroku for Rails/Sinatra apps. I feel that with this change, Heroku is really getting serious about their offering (not that they weren't already). But as someone who's worked on enterprisey stuff, the thought of push-button Spring deployment makes me giddy with glee. Heroku folks - if you're reading this - you just achieved maximum awesome! :)
- bitops 15y agoAlso, I'd be curious if PHP support is coming at any time. That seems like it would open the floodgates.
- ryan-allen 15y agoSomeone's already got PHP working on Heroku [1], the author is swell bloke too I hear. [1] https://github.com/lstoll/heroku-php https://github.com/lstoll/heroku-php
- nesbot 15y agoSeems as though that person has tried a lot of different heroku setups... also got playframework running https://github.com/lstoll/heroku-playframework https://github.com/lstoll/heroku-playframework
- jamesgeck0 15y agoI don't have much experience with Java, but is that a minimal pom.xml? It seems rather involved.
- Lewisham 15y agoYeah, it's not a big one, certainly. In practice, you'll almost never do it from scratch, but use an archetype [1] that you tweak. Tools like Ivy, Gradle and Buildr will play nicely with Maven repositories to get dependencies, and I would hazard were all largely born out of a frustration with the pom syntax. That said, like it or, more likely, not, Maven is the defacto Java standard, so it tends to cling on. [1]: http://maven.apache.org/guides/introduction/introduction-to-archetypes.html http://maven.apache.org/guides/introduction/introduction-to-...