Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This looks really cool, I can't wait to hack around with this!

Question for the community: I don't have enough experience to know how this stacks up against other servers out there. Also, how do the people HN enjoy using java as a webserver (lang-wise, scaling-wise, etc)?

Any feedback would be much appreciated!!



I enjoy using it, except when we are forced to target Websphere.

JBoss, Jetty and Tomcat are pretty good in terms of taking care of load in heavy sites.

Most JVMs (Oracle, IBM, Azul, Aonix, ...) are able to achieve very good performance levels.

There is the tooling one gets, not only in terms of IDE support, but also for monitoring the state of the server processes and how load is being affected.

Finally if Java the language, doesn't appeal you, there are plenty of languages that target the JVM as well.


I would use Java for GWT, if nothing else. Being able to write a huge and complex application for the web, using Java both for the client and server code is something I would not want to live without (links in my profile for examples).

But besides that, Java is extremely mature, has great tooling, huge community and of course an enormous ecosystem with all the third party tools and libraries that come with it. The language is a bit primitive (but improving with each release), and the 'enterprise consultant' mindset of complexity for its own sake can be a turn-off, but overall, yeah, I like using Java.


Also, how do the people HN enjoy using java as a webserver (lang-wise, scaling-wise, etc)?

I mostly like Java, and find a lot of the criticisms to be somewhat misguided, or reducing to quibbling over minutiae. But the Java ecosystem has a lot going for it, and despite how some people think "enterprise-y" is a pejorative, a lot of those "enterprise" features are actually very handy when you're, well, building a serious enterprise solution. Sure, if you're building the n thousandth MVP of a new cat-picture-sharing site, you don't need Java. But if you're building Amazon.com (the ecommerce side, not AWS) you might just find that JTA, JMS, JMX, JAX-RS, and some of the other "enterprise-y" stuff in Java is pretty fucking useful.

From a scalability standpoint, using modern appservers, Java scales horizontally just fine. And since Java runs on just about everything from watches to IBM zSeries mainframes, it also scales vertically pretty well.

All of that said, I prefer to do my actual coding in Groovy, as opposed to "pure" Java, but Groovy is almost a strict superset of Java, just with nicer syntax and some new features. But whether you're using Groovy or Java, everything I said above still applies, since you're still part of that overall JVM ecosystem.


Groovy's much slower than Java. The statically typed mode shipped in Groovy 2 a year ago was written by one lone programmer they brougt in, is still buggy, and isn't even used in the Grails codebase afaik.


You're right, it is slower. But for my purposes, it's fast enough. YMMV, of course.


I've never enjoyed using Java.

If you have time look at Scala (Scalatra/Play Framework) or Clojure (Ring). You can reduce the size of your codebase dramatically.


Ive enjoyed writing code in scala, not until I compile it. It takes a long to compile. I agree with you, java is not enjoyable but we cannot deny the fact it still gets the job done.


That used to be true earlier, but the compile times in Scala are pretty good these days. Also I hear that a faster compiler is expected with the 2.11 release. Incremental compilation in Eclipse is already real-time.

But in general, IMO, compile times shouldn't be a major factor in choosing a language; expressiveness and run-times are more important.


That's only partially true. Compile times are absolutely a factor in development time for the same reason that how long your test suite takes to run is a factor. A faster feedback loop can shorten dev cycles. If nothing else, it's more fun to have faster compiles.

This is one reason Go is so appealing to many people. The compile times make it "feel" like ruby or python or php in terms of "hit refresh and the change is there" style of development. That is a huge difference from, hit save and wait a minute for my java project to compile, and push out to tomcat a minute later. Even with JRebel the best I've seen is a 2-5 second page change refresh cycle in Scala and a minimum 5 second test suite reload time using SBT.

Scala is a beautiful language, but compared to Go, it's a very slow dev cycle.


> compile times shouldn't be a major factor in choosing a language

Not sure about that, I'm using C# to write office plugins and it takes forever to start up each time. Often I forget what I'm supposed to be looking at by the time it's started.


Java scales well as long as memory is not the issue. Java's problem is memory usage and above all a deeply ingrained culture of complexity.


On modern server hardware memory is seldom an issue, but I would agree about the culture of complexity BeanSingletonProxyAbstractWorkerListener


Memory is the dominant cost factor when you rent a server, but my main issue with Java's memory usage is that a single (Oracle) VM instance becomes incresingly unusable above 4GB of RAM due to garbage collector pauses. If you can distribute your work over many VMs that's fine, but if the application needs a lot of data in memory then Java just isn't a viable solution. At least not the Oracle VM and Azul is too expensive.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: