10 ms·
Dropwizard 0.8.0: Java framework for ops-friendly, high-performance web services
- crudbug 12y agoCongratulations, one of the best frameworks in the JVM land.
- pron 12y agoAbsolutely. But it's more a curation of some excellent libraries than an independent framework. At the top of the list are Jersey, the reference implementation of the JAX-RS standard, and Jetty (DW's servlet container). Metrics (by the same author as Dropwizard) deserves another honorable mentions.
- dang 12y agoUrl changed from http://dropwizard.io/about/release-notes.html#v0-8-0 http://dropwizard.io/about/release-notes.html#v0-8-0 because this project doesn't appear to have been discussed on HN before.
- Yhippa 12y agohttps://hn.algolia.com/?query=dropwizard&sort=byPopularity&prefix&page=0&dateRange=all&type=story https://hn.algolia.com/?query=dropwizard&sort=byPopularity&p...
- dang 12y agoOh, I didn't mean it had never been posted before. I meant that none of the previous posts received significant attention or discussion. Sorry for not being clear.
- stock_toaster 12y agoHaving heard of dropwizard many times before (isn't it pretty popular?), and arriving post edit, I was left wondering why this was posted, until I read the comments and found this subthread. It would be nice if there was a section for admin comments right below the link, where things like this could be mentioned instead of relying on comment-thread popularity to bubble it up.
- latchkey 12y agoIf you're interested in a Guicier 'framework' inspired by Dropwizard, take a look at GWizard... https://github.com/gwizard/gwizard https://github.com/gwizard/gwizard
- e12e 12y agoHm, looks like I can find examples of using kotlin with guice, and kotlin with dropwizard, but no examples of kotlin with gwizard... After recently looking at java8 and alternatives, I've tentatively come to the conclusion that I'm rather happy to use kotlin for stuff that needs to be (almost) java (eg: Android, or just mapping closely to java, eg: dropwizard?) -- and clojure for everything where java feels too constrained (but where perhaps performance isn't much of an issue). For myself, I don't see much use for scala -- it feels too complex, and in many ways less powerful than clojure. Note that I don't have any legacy java/jvm code, and so I probably just use ocaml or even standard ml where others might reach for scala. Perhaps kotlin doesn't make much sense wrt dropwizard -- it might make more sense to just stick with java for dw, and use something different if one wants something higher level? Anyway, some related links I've come across googling a bit: clojure+dropwizard (example, with leiningen): https://github.com/stevensurgnier/dropwizard-clojure https://github.com/stevensurgnier/dropwizard-clojure Experimental (old) repo for dropwizard+kotlin: https://github.com/arteam/kotlin-dropwizard https://github.com/arteam/kotlin-dropwizard Combining kotlin and guice: http://java.dzone.com/articles/kotlin-guice-example http://java.dzone.com/articles/kotlin-guice-example
- doomspork 12y agoI've been using Kotlin and Dropwizard together and I quite enjoy it. To demonstrate Kotlin recently for a friend I used the Dropwizard Getting Started: https://github.com/doomspork/kotlin-dropwizard https://github.com/doomspork/kotlin-dropwizard My plan is to add more to it and eventually cover all the features of Dropwizard.
- pron 12y agoI find Kotlin+Clojure (or Java+Clojure) to be a winning combination, too.
- 12y ago
- abalone 12y agoLove Dropwizard! Here's the notes on what's new in the March 5 release. Can anyone summarize the best bits? http://dropwizard.github.io/dropwizard/0.8.0/docs/about/release-notes.html#v0-8-0-mar-5-2015 http://dropwizard.github.io/dropwizard/0.8.0/docs/about/rele...
- Xorlev 12y agoThe move to Jersey 2.
- stuff4ben 12y agoI wouldn't necessarily call that a good thing. Jersey2 has been a PITA to get working with one of our internal apps that used Spring. Looks like I'm not alone in this either: https://github.com/gwizard/gwizard#why-did-you-pick-resteasy-over-jersey https://github.com/gwizard/gwizard#why-did-you-pick-resteasy....
- labianchin 12y agoAlso, saw this comparison of Dropwizard with Spring boot: http://blog.takipi.com/java-bootstrap-dropwizard-vs-spring-boot/ http://blog.takipi.com/java-bootstrap-dropwizard-vs-spring-b... Interesting to understand the libs and flexibility each one have.
- th3iedkid 12y agowe had used metrics library of theirs for some of our projects while evaluating, quite a while back. It was worthwhile for minute scale testing and was interesting to note that it had a few things worth abstracting from an instrumentation framework standpoint. It integrates with all common monitoring tools/frameworks and best part was its JMX integration which seemed to be more lightweight compared to a few other commercial ones we tried. We then stopped instrumenting for other reasons.
- real_joschi 12y ago> We then stopped instrumenting for other reasons. Any reasons you want or are allowed to share?
- threeseed 12y agoIf you're missing Go-like channels, actors etc then check out Quasar with can be integrated with Dropwizard using a library called Comsat. It's pretty cool to take an existing Dropwizard app, change a couple of lines and every request becomes a lightweight fiber: http://docs.paralleluniverse.co/comsat/ http://docs.paralleluniverse.co/comsat/ http://docs.paralleluniverse.co/quasar/ http://docs.paralleluniverse.co/quasar/
- heavenlyhash 12y agoAnd it's hard to overstate how huge this is. If you need to write a server that transports gigabytes of data in a stream, and you want to reuse IO pipelines the same way for small data and data-too-large-to-malloc, Quasar's fibers make that possible. Without them, you're stuck in either two-implementations land or callback hell.
- crudbug 12y agoIs Quasar ready for production use?
- pron 12y agoYes (I'm the main author)
- dafnap 12y agoFor those who aren't familiar - have a look at this tutorial http://blog.paralleluniverse.co/2015/03/09/up-and-running-with-comsat-screencast/ http://blog.paralleluniverse.co/2015/03/09/up-and-running-wi...
- paukiatwee 12y agoI built an open source personal budget app using DropWizard 0.7.0 awhile back with AngularJS. If you guys have interest to see real world project using DropWizard, check this out https://github.com/paukiatwee/budgetapp https://github.com/paukiatwee/budgetapp Cant wait to upgrade to use v0.8.0 :)
- otterley 12y agoWhy choose Metrics over Servo? Metrics lacks dimensions, which is a pretty significant oversight, IMO.
- clogston 12y agoIt looks like the author for Metrics is also the author (one of the authors) of Dropwizard.
- threeseed 12y agoBoth Metrics and Dropwizard were created by the same person, Coda Hale.
- rckenned 12y agoMetrics was created before Servo. Some folks at Netflix wanted to use Metrics but ran into fundamental differences of opinion with us (Yammer) that we weren't willing to yield on. So Netflix built Servo and Dropwizard kept going with Metrics.
- otterley 12y agoWhat weren't you willing to yield on? If it was that metrics should have dimensions, Netflix has the stronger argument.
- Zombieball 12y agoI remember Dropwizard being a favourite amongst many folks at a previous job. Decided to read the listed contributors to find some of their names: Hats off to you Adam Jordens & Cameron Fieber :)
- ww520 12y agoWhat is the option for rapid application development using Dropwizard? Is it possible to refresh a web page and the code changes are automatically compiled and deployed?
- dikaiosune 12y agoDropwizard has support for front-end development, but I think it really shines when developing RESTful API endpoints. You can use it to serve static assets, and those can be automatically "deployed" by refreshing the page, because Dropwizard just wires up Jetty to grab files off of the hard drive. If you want to use Freemaker/Mustache for views, I don't think it currently supports any "live" development. It really works much better when creating a REST API for access by apps or separate front-ends (e.g. a JS SPA).
- idunno246 12y agomost IDEs have support for this - you can change a method while debugging even and itll reset the stack with your changes. Theres also pro tools like jrebel that are supposed to solve it better than the built in stuff.
- bni 12y agoAs long as you dont change any method signatures, sure. I think its the JVM that provides this as part of its remote debugging functionality. If you change any signatures (should be most of the time) you need Jrebel.
- koevet 12y agoNo, you still need something like JRebel for hot-reload of JVM classes. This framework is really designed for implementing REST APIs, it is not an MVC framework - even though it has support for serving pages using Mustache or freemarker.
- mirkoadari 12y agoOr you can take rapid application development in framework X out of the equation and use tools like JRebel.
- EtienneK 12y agoI love Dropwizard and I love the direction they've steered Java Web Development in, but I prefer Spring Boot: http://projects.spring.io/spring-boot/ http://projects.spring.io/spring-boot/ I find it much quicker to get started with, much better supported and better tooling.
- brown9-2 12y agoOne thing that felt weird to me about Spring Boot when I looked at it a year or so ago was the idea of enabling features based upon which libraries are on the classpath. Has that turned out to be useful in practice? Seems like a simple method for unpleasant surprises.
- switchbak 12y agoI've definitely been nabbed by unpleasant surprises while using it - when you have lots of transitive dependencies you can get some surprisingly interesting behaviour :) That said, you can also be fairly granular about you configuration (instead of the auto-config), so it's not that bad.
- octix 12y agoYou don't have to use them, but it's really great for getting started. You can fine tune these by excluding pieces you don't need to auto configured. http://docs.spring.io/spring-boot/docs/current/reference/html/using-boot-auto-configuration.html http://docs.spring.io/spring-boot/docs/current/reference/htm...
- zooso 12y agoLove Dropwizard. Development, testing, deploying, and monitoring the way it was supposed to be.
- raz32dust 12y agoIs there anyone who has tried both rest.li as well as dropwizard? How is dropwizard different? (I know only rest.li and have found it to be quite good in what it does)
- chaostheory 12y agoThis vaguely reminds me of Play v1. It feels simple (err simpler) and not overly complicated like a typical Spring based app. Of course, this may change over time. I really loved the Play v1.x framework minus the hard to debug part.
- real_joschi 12y agoThe goal is to keep it simple and not support everything and the kitchen sink (like Spring Boot and the Spring ecosystem in general does).
- brown9-2 12y agoWhy was it hard to debug?
- chaostheory 12y agoIt's been a while, but if I remember correctly Play v1.x's 'magic' depended on Play v1 messing with Java bytecode. Well this in turn makes it harder to debug. This is no longer an issue with Play v2, but the magic (and the fun) are gone.
- jlward4th 12y agoThe reloading part of Play doesn't use bytecode manipulation, it simply creates a new classloader with the newly compiled stuff and then uses the new classloader on subsequent requests. There are other pieces of Play 1 & 2 that do bytecode manipulation. In Play 2 this is pretty minimal when using Java / EBean.
- koevet 12y agoI'm the OP of this post, which was changed to show Dropwizard home page. My initial post was about the release notes for Dropwizard 0.8 (https://dropwizard.github.io/dropwizard/0.8.0/docs/about/release-notes.html#v0-8-0-mar-5-2015 https://dropwizard.github.io/dropwizard/0.8.0/docs/about/rel...) They are quite significant. IMO, the most relevant one is the move to Jersey 2 (the Jersey framework is THE JAX-RS implementation for building REST services) which supports Server side async requests (https://jersey.java.net/nonav/documentation/2.0/async.html#d0e6914 https://jersey.java.net/nonav/documentation/2.0/async.html#d...) and took quite a lot of work to be implemented in Dropwizard. Finally, here is a link to third-party modules for DW: http://modules.dropwizard.io/ http://modules.dropwizard.io/
- threeseed 12y agoThey really should have written those async examples with Java 8. Definitely simplifies it: http://www.codejava.net/java-core/the-java-language/java-8-lambda-runnable-example http://www.codejava.net/java-core/the-java-language/java-8-l...
- real_joschi 12y agoI totally agree but Jersey 2.x and Dropwizard still support Java 7, so the examples should also work with Java 7.
- rmnoon 12y agoWhat's the primary win of doing this? Isn't DW still tied to Jetty which has a more traditional threading model?
- pchitre 12y agoPardon my ignorance, but could you talk a little more about what you meant here? What non-traditional/advanced threading models are you referring to? Any reading material links would be much appreciated! Thanks!
- shaun234 12y agoNice framework!!
- smoyer 12y agoDropwizard keeps getting heavier ... JavaEE keeps getting lighter. Dropwizard has always been friendly to developers, JavaEE took a long time to "become useable" (I was ready to give up on J2EE completely with release 1.4). It would be interesting to compare the demo Dropwizard application with an equivalent one written in JavaEE 7. Is anyone interested? I'd be willing to run through both sides (I always learn something!).
- koevet 12y agoI'm not sure why you assert that Dropwizard is getting heavier. The difference between this release (0.8) and the previous one, is just about bumping up a bunch of libraries' versions and the big move to Jersey 2. DW is essentially a collection of libraries with sane defaults and some plumbing, so I don't see how you can compare it to JEE. JEE may be lighter these days, but it still requires a container to run - unless you use the latest incarnation of the IBM JEE server, Liberty.
- dawidloubser 12y agoDropwizard also requires a container to run. Only difference is, they are bundling a particular container (Jetty), as opposed to the model of deploying into a container that you set up.
- tedyoung 12y agoI think you're using the word "container" when perhaps "app server container" is more meaningful. An app server container (like Tomcat, WebLogic, WebSphere, etc.) typically provides services (database connectivity, persistence, management, etc.) to the applications deployed into the app server container, where the benefit is especially useful when multiple applications are deployed in the same container (though in my experience, this is often where problems occur and people end up deploying separate app servers per application). Dropwizard is meant to run without an app server (aka containerless), and uses the Jetty embedded web server (which is not an app server container) to provide the HTTP communication.
- 12y ago
- dawidloubser 12y agoOne of the strenghts of the Java platform is the separation of vendor-neutral standards (e.g. JAX-RS, and all the REST concepts, and annotations, it provides) and particular implementations (e.g. Jersey). Java EE is a collection of such standards, providing enormous capability while not tying you to a particular app server - I'm busy with a rather painless JBoss -> Glassfish migration as we speak. Secondly, Java has ample platforms that allow for the developer-driven assembly of various cool libraries into a "platform" - for example, OSGi. It concerns me that this library absolutely ignores these two most valuable concepts in the Java world. If you want high-performance web services with much more powerful backing technologies (EJB, JPA, JMS...) without locking into a particular haphazard collection of libraries, just write and deploy a JAX-RS module into your free, lightweight app server of choice (Wildfly, Glassfish, etc). The Java ecosystem is much more mature than the Node.js-based "arbitrary assembly of X cool libraries" that this little project is emulating, and I would encourage people to put that same effort into understanding Java EE, which over the past 5 years has become a lean, lightweight platform indeed - but one with real horsepower for serious systems when you need it. Not denouncing the greatness of the libraries that have been combined here, I'd steer clear of this project - you're missing out on what is really possible.
- cssmoo 12y agoYou're right but wrong. That's all OK in theory but not in reality having migrated various Java EE gubbins on a project. It's a rat's nest of supposed standards and interop that doesn't amount to much at the end of the day because there's still coupling to infrastructure and configuration at every level. On top of that there's edge cases that the APIs and standards don't consider as they're all pretty leaky. Dropfish is a cohesive "opinion in a box" that just works without having to do a Java EE iteration zero which is hours of eye-stabbing pain. Someone did all the hard work of swapping components out until they found something that wasn't horrible and stuck them all together. The Java EE ecosystem is mature, you're right but it's not pleasant, is inflexible despite its modularity and doesn't live up to it's promoted abilities. Saying that I've used both in production, but would rather can both of them and use something like flask and python with SQLAlchemy just for the fact I don't have to deal with massive heavyweight environments and it's possible for a human to understand it all in a lifetime. Also, 500 level deeps stacks in Java+OSGI projects make me cry. Trac has a better composition and component model!
- stuff4ben 12y agoWhile I like the opinionated nature of Dropwizard, there's still a lot of manual stuff you have to do to get things working. Wish it had some automation built-in similar to Grails and JHipster (http://jhipster.github.io/ http://jhipster.github.io/)
- tapirl 12y agoall java frameworks suck. Hidden too much, concepts too much, config too much, dependencies too much, memory consumed too much, development circle too long, startup too slow. that is why golang is born. (I know this comment will be downvoted, but it is the reality, NEVER USE JAVA TO DEVELOP YOUR WEBSITE!)
- flaie 12y agospring-boot is awesome, the configuration is simple, the development is absolutely quick and easy and startup takes just 3 to 4 seconds on my mac. Seriously you just don't know what you're talking about. And for that matter I really appreciate Go and its simplicity.
- tapirl 12y agoon your mac, 3-4 seconds? Then on a micro EC2 instance, it would be 10+ seconds. You visitors has gone before your page is loaded. btw, there are very few big companies use spring. It is a over promoted products. btw2, do you know how to cache the jsp template render result? Which is so easy in other languages.
- flaie 12y agoDon't you know the difference between the startup of an application container (which takes 3-4 seconds) and a page refresh which depends on what your application is doing? There are a lot of companies using Spring, at least in Europe I can't count them. I don't know on what planet you're living :)
- tapirl 12y agoWhen your app is PaaS based, startup time (and memory usage) is very important, for your instances will restart often. Don't know if there are any big IT companies in Europe. No only spring but also java is a over-promoted product. Before being acquired by Orcale, Sun devoted much of its money to promote Java.
- Randgalt 12y agoFYI - I've written some bundles/extensions to DW 0.8.0 that support SOA. http://soabase.io http://soabase.io - Service Discovery; Load Balancing REST Client; Distributed, Scoped Dynamic Attributes; Jersey-based Admin APIs; Administration Console; Configuration Utilities; Guice Integration
- argc 12y agoThis looks really cool, thanks for sharing!
- jimbokun 12y agoSeems like Dropwizard makes it possible to follow the twelve factor app approach in a Java application. http://12factor.net/ http://12factor.net/ Especially the "Processes" factor. "Execute the app as one or more stateless processes" http://12factor.net/processes http://12factor.net/processes You need something like Jetty, running in the same process as the app (as opposed to an application container like Tomcat) to make this approach work.
- foolinaround 12y agoIs there a sample "pet shop" app?