dropwizard and groovy

Kyle Boon

Kyle Boon

Lead Developer @ Bloomhealth
kyle.f.boon@gmail.com
@kyleboon
http://www.about.me/kyleboon

What is Dropwizard

Dropwizard is a heavily opinionated framework for building web services on the JVM.  It is mostly glue around mature java libraries like Jetty, Jersey, Jackson and Guava.

Dropwizard has out-of-the-box support for sophisticated configuration, application metrics, logging, operational tools, and much more, allowing you and your team to ship a production-quality HTTP+JSON web service in the shortest time possible.

Who Created it?

@coda

As I've said before, the only reason Dropwizard exists at all is to provide
opinions on what a service should be.

It uses fat JARs because I think they work better.

It embeds Jetty because I think that works better.

It uses Jackson because I think that works better.

It uses Jersey because I think that works better.

It has a single YAML configuration file because I think that works better.

It wraps Logback because I think that works better.

Who uses it

  • Yammer
  • Simple
  • Bloomhealth

The stack at BloomHealth

  • Groovy for programming
  • Grails for web applications
  • Dropwizard for JSON web services
  • Gradle for builds
  • Swagger for Service Discovery
  • Gatling for Performace/Load Testing
  • Redis for Caching
  • RabbitMQ for messaging

How does it work?

Deployed as a fat jar and starts its own container.
public static void main(String[] args) throws Exception { new ContactsService().run(args) }

Lets Look at Code

References

Code we've Looked at

  • Example Contact Application
  • Swagger
  • Enhanced Groovy Doc
  • swagger-jaxrs-doclet

dropwizard and groovy

By Kyle Boon

dropwizard and groovy

  • 20