Hacker News new | ask | show | jobs
by cmicali 4421 days ago
Nice article - Many of the suggestions (single-jar deployment, metrics, slf4j logging, etc) are all wrapped up for you in Dropwizard http://dropwizard.io, which we use and love.
3 comments

Sharing a lot of the Dropwizard philosophy, there is Spring Boot (http://projects.spring.io/spring-boot/), which we use and love as well.
I'm not clear, just did a ton of Googling and I think maybe spring.io is related to the Spring Framework at VMware. That would mean it's dependency injection.
Rather than downvote you, I thought I'd clear up the confusion. Yes Spring.io is the Spring Framework's website. Spring the framework is a dependency injection framework, but that's not all it does. There are other modules, like Spring Roo, Spring MVC, Spring JPA, etc that provide more than just dependency injection.
OK, I recalled it being a different looking site about three years ago then I saw Pivotal at the bottom of the page so I'm still not sure if VMware sold the Spring business or what. The whois reports for vmware.com and spring.io look nothing alike either. Thanks for clarifying spring.io is really Spring Framework.
VMware is owned by EMC. VMware bought Spring Source. EMC bought Pivotal Labs. VMware and EMC subsequently decided to spin-out a few of their acquisitions, including Spring and Pivotal Labs: into a company they dubbed Pivotal Software.
We'll discuss Dropwizard in part 3, but the single-jar deployment is not really solved by Dropwizard. To launch the server you still need to configure the JVM at the command line.
An off topic question; Would it be possible to have an RSS feed on your blog? I see you have Twitter but personally I don't really use that.
is that really a big issue? passing the arguments to java to configure the jvm.
It can be. Here's a typical example from my day to day:

java -cp "lib/*" -Xmx5g -Xms5g -server -XX:+UseTLAB -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:MaxTenuringThreshold=0 -XX:CMSInitiatingOccupancyFraction=60 -XX:+CMSParallelRemarkEnabled -XX:+CMSPermGenSweepingEnabled -XX:+CMSClassUnloadingEnabled

That gets cumbersome really quick.

Honestly my preferred jvm deployment is supervisord. I'd like a java only solution if one should exist that's good but these newer containers don't work for self made servers that don't run http.

Some of the instrumentation could be good, but at the end of the day I'm not sure how much it would help.

Capsule works for any JVM application. It doesn't even have to be Java. It can use Java libraries, native libraries, a well-known server, your own server, with http, with a custom Infiniband thingy -- what have you.
I'll look in to it when there's a maven plugin maybe. As of right now my work flow works fine with the assembly plugin.

It looks pretty solid though. I'm still not totally sold on gradle as of yet mainly because of the tooling.

The native libs thing is a plus though. I'll see where I can work it in. Good work with capsule though.

Do you just use it for producing a REST API or do you use it to render HTML, handle session management etc.?
We use dropwizard only for rest APIs currently. Our HTML and JS are served up with an in-house framework that has plugins for less, minimization, svg inlining, etc. We have open tasks to both publish it and make it hostable in dropwizard directly.
We use it for both REST APIs on top our services and rendering templated HTML. We had to bastardize the asset bundle extension considerably for that though. Once we got things working we didn't want to go back.
I happen to use Dropwizard as well and purely for REST APIs that serve as internal micro services.