SlideShare una empresa de Scribd logo
1 de 57
Descargar para leer sin conexión
Production Ready Web
Services with Dropwizard



      Portland Java User Group
            May 15, 2012
            Sean Sullivan
http://twitter.com/hipsterhacker/status/193559234259075074
• Gilt Groupe
• Dropwizard project
• Dropwizard at Gilt
Gilt Groupe
online retailer
May 2011
April 2012
What does Gilt sell?
Apparel
Kids toys and apparel
Home furnishings
Food
Local deals
Travel
Gilt technology
Portland   NYC   Dublin
Service oriented architecture
email service


product service


shopping cart service


checkout service

payment service
internal “service framework”




                 image credit: dealwithitportland.com
Dropwizard
“Dropwizard consists mostly of glue code
to automatically connect and configure
these components”

• Jetty               • logback
• Jersey              • Yammer Metrics
• Jackson             • Google Guava
• JDBI                • Hibernate Validator
Dropwizard modules

•   dropwizard-core     •   dropwizard-scala

•   dropwizard-client   •   dropwizard-views

•   dropwizard-db       •   dropwizard-testing

•   dropwizard-auth
<dependencies>
  <dependency>
     <groupId>com.yammer.dropwizard</groupId>
     <artifactId>dropwizard-core</artifactId>
     <version>0.4.0</version>
  </dependency>
  <dependency>
     <groupId>com.yammer.dropwizard</groupId>
     <artifactId>dropwizard-scala</artifactId>
     <version>0.4.0</version>
  </dependency>
</dependencies>

                  Maven pom.xml
+




    Java services extend
com.yammer.dropwizard.Service
+




      Scala services extend
com.yammer.dropwizard.ScalaService
Service configuration
YAML + config class
import com.yammer.dropwizard.config.Configuration;


public class MyServiceConfiguration
    extends Configuration {
    // your config stuff
}
Other config

• com.yammer.dropwizard.config.HttpConfiguration
• com.yammer.dropwizard.config.LoggingConfiguration
• com.yammer.dropwizard.db.DatabaseConfiguration
Hello world
Compile and run

$ git clone git://github.com/sullis/dropwizard-helloworld.git
$ cd dropwizard-helloworld
$ mvn clean package
$ ./bin/dev.sh
http://localhost:8080/helloworld?name=Portland
Dropwizard at Gilt
gift certificate service




fraud service
Gift certificate demo
dropwizard-gilt
• Jackson ObjectMapper configuration
• Log4j appender config
• ZooKeeper registration
• MessagingManager class
Hibernate Validator + Scala case classes




 https://groups.google.com/d/topic/dropwizard-user/sGEi3i8W1tY/discussion
https://twitter.com/#!/cowtowncoder/status/198167133887266816
SOA challenges

• deployment
• QA
• monitoring
• debugging
Questions?
THE END
Bonus slides
“Monitoring and QA are the same thing.You'd never think so until
you try doing a big SOA. But when your service says "oh yes, I'm
fine", it may well be the case that the only thing still functioning in
the server is the little component that knows how to say "I'm
fine, roger roger, over and out" in a cheery droid voice. In order to
tell whether the service is actually responding, you have to make
individual calls.The problem continues recursively until your
monitoring is doing comprehensive semantics checking of your
entire range of services and data, at which point it's
indistinguishable from automated QA”


                            Steve Yegge, October 2011
                            http://bit.ly/pityk6
“If you have hundreds of services, and your code MUST
communicate with other groups' code via these services, then
you won't be able to find any of them without a service-
discovery mechanism. And you can't have that without a
service registration mechanism, which itself is another service.
So Amazon has a universal service registry where you can find
out reflectively (programmatically) about every service, what
its APIs are, and also whether it is currently up, and where”


                        Steve Yegge, October 2011
                        http://bit.ly/pityk6

Más contenido relacionado

La actualidad más candente

La actualidad más candente (20)

Optimizing React Native views for pre-animation
Optimizing React Native views for pre-animationOptimizing React Native views for pre-animation
Optimizing React Native views for pre-animation
 
Firebase Basics - Dialog Demo for Group Tech Staff
Firebase Basics - Dialog Demo for Group Tech StaffFirebase Basics - Dialog Demo for Group Tech Staff
Firebase Basics - Dialog Demo for Group Tech Staff
 
Introduction to Firebase [Google I/O Extended Bangkok 2016]
Introduction to Firebase [Google I/O Extended Bangkok 2016]Introduction to Firebase [Google I/O Extended Bangkok 2016]
Introduction to Firebase [Google I/O Extended Bangkok 2016]
 
Putting the Native in React Native - React Native Boston
Putting the Native in React Native - React Native BostonPutting the Native in React Native - React Native Boston
Putting the Native in React Native - React Native Boston
 
Intro firebase
Intro firebaseIntro firebase
Intro firebase
 
Android App Development using HTML5 Technology
Android App Development using HTML5 TechnologyAndroid App Development using HTML5 Technology
Android App Development using HTML5 Technology
 
Introduction to Vaadin, GWT.create 2015
Introduction to Vaadin, GWT.create 2015Introduction to Vaadin, GWT.create 2015
Introduction to Vaadin, GWT.create 2015
 
Vaadin 7.2
Vaadin 7.2Vaadin 7.2
Vaadin 7.2
 
Take Action with Forge Triggers
Take Action with Forge TriggersTake Action with Forge Triggers
Take Action with Forge Triggers
 
Azure mobile apps
Azure mobile appsAzure mobile apps
Azure mobile apps
 
RESTful services and OAUTH protocol in IoT
RESTful services and OAUTH protocol in IoTRESTful services and OAUTH protocol in IoT
RESTful services and OAUTH protocol in IoT
 
Creating books app with react native
Creating books app with react nativeCreating books app with react native
Creating books app with react native
 
Integrating consumers IoT devices into Business Workflow
Integrating consumers IoT devices into Business WorkflowIntegrating consumers IoT devices into Business Workflow
Integrating consumers IoT devices into Business Workflow
 
How native is React Native? | React Native vs Native App Development
How native is React Native? | React Native vs Native App DevelopmentHow native is React Native? | React Native vs Native App Development
How native is React Native? | React Native vs Native App Development
 
Pyruvate, a reasonably fast, non-blocking, multithreaded WSGI server
Pyruvate, a reasonably fast, non-blocking, multithreaded WSGI serverPyruvate, a reasonably fast, non-blocking, multithreaded WSGI server
Pyruvate, a reasonably fast, non-blocking, multithreaded WSGI server
 
Introduction to Firebase on Android
Introduction to Firebase on AndroidIntroduction to Firebase on Android
Introduction to Firebase on Android
 
React Native
React NativeReact Native
React Native
 
Vaadin & Web Components
Vaadin & Web ComponentsVaadin & Web Components
Vaadin & Web Components
 
Creating mobile apps - an introduction to Ionic (Engage 2016)
Creating mobile apps - an introduction to Ionic (Engage 2016)Creating mobile apps - an introduction to Ionic (Engage 2016)
Creating mobile apps - an introduction to Ionic (Engage 2016)
 
The Firebase tier for your mobile app - DevFest CH
The Firebase tier for your mobile app - DevFest CHThe Firebase tier for your mobile app - DevFest CH
The Firebase tier for your mobile app - DevFest CH
 

Destacado

Dropwizard at Yammer
Dropwizard at YammerDropwizard at Yammer
Dropwizard at Yammer
Jamie Furness
 
Version Management in Maven
Version Management in MavenVersion Management in Maven
Version Management in Maven
Geert Pante
 

Destacado (20)

Dropwizard
DropwizardDropwizard
Dropwizard
 
Dropwizard
DropwizardDropwizard
Dropwizard
 
Dropwizard at Yammer
Dropwizard at YammerDropwizard at Yammer
Dropwizard at Yammer
 
Dropwizard Introduction
Dropwizard IntroductionDropwizard Introduction
Dropwizard Introduction
 
Microservice Architecture JavaCro 2015
Microservice Architecture JavaCro 2015Microservice Architecture JavaCro 2015
Microservice Architecture JavaCro 2015
 
Fault tolerant microservices - LJC Skills Matter 4thNov2014
Fault tolerant microservices - LJC Skills Matter 4thNov2014Fault tolerant microservices - LJC Skills Matter 4thNov2014
Fault tolerant microservices - LJC Skills Matter 4thNov2014
 
Soa with consul
Soa with consulSoa with consul
Soa with consul
 
JEE on DC/OS
JEE on DC/OSJEE on DC/OS
JEE on DC/OS
 
Microservices/dropwizard
Microservices/dropwizardMicroservices/dropwizard
Microservices/dropwizard
 
Simple REST with Dropwizard
Simple REST with DropwizardSimple REST with Dropwizard
Simple REST with Dropwizard
 
Dropwizard Spring - the perfect Java REST server stack
Dropwizard Spring - the perfect Java REST server stackDropwizard Spring - the perfect Java REST server stack
Dropwizard Spring - the perfect Java REST server stack
 
Java Microservices with DropWizard
Java Microservices with DropWizardJava Microservices with DropWizard
Java Microservices with DropWizard
 
Dropwizard and Groovy
Dropwizard and GroovyDropwizard and Groovy
Dropwizard and Groovy
 
Version Management in Maven
Version Management in MavenVersion Management in Maven
Version Management in Maven
 
WildFly Swarm: Criando Microservices com Java EE 7
WildFly Swarm: Criando Microservices com Java EE 7WildFly Swarm: Criando Microservices com Java EE 7
WildFly Swarm: Criando Microservices com Java EE 7
 
Simple REST-APIs with Dropwizard and Swagger
Simple REST-APIs with Dropwizard and SwaggerSimple REST-APIs with Dropwizard and Swagger
Simple REST-APIs with Dropwizard and Swagger
 
Dropwizard Internals
Dropwizard InternalsDropwizard Internals
Dropwizard Internals
 
Deep Dive on Microservices
Deep Dive on MicroservicesDeep Dive on Microservices
Deep Dive on Microservices
 
J1 2015 "Building a Microservice Ecosystem: Some Assembly Still Required"
J1 2015 "Building a Microservice Ecosystem: Some Assembly Still Required"J1 2015 "Building a Microservice Ecosystem: Some Assembly Still Required"
J1 2015 "Building a Microservice Ecosystem: Some Assembly Still Required"
 
Deep Dive on Microservices and Amazon ECS
Deep Dive on Microservices and Amazon ECSDeep Dive on Microservices and Amazon ECS
Deep Dive on Microservices and Amazon ECS
 

Similar a Production Ready Web Services with Dropwizard

Open Social In The Enterprise
Open Social In The EnterpriseOpen Social In The Enterprise
Open Social In The Enterprise
Tim Moore
 
A Microsoft Silverlight User Group Starter Kit Made Available for Everyone to...
A Microsoft Silverlight User Group Starter Kit Made Available for Everyone to...A Microsoft Silverlight User Group Starter Kit Made Available for Everyone to...
A Microsoft Silverlight User Group Starter Kit Made Available for Everyone to...
DataLeader.io
 
John Resig Beijing 2010 (English Version)
John Resig Beijing 2010 (English Version)John Resig Beijing 2010 (English Version)
John Resig Beijing 2010 (English Version)
Jia Mi
 

Similar a Production Ready Web Services with Dropwizard (20)

JavaOne 2015: 12 Factor App
JavaOne 2015: 12 Factor AppJavaOne 2015: 12 Factor App
JavaOne 2015: 12 Factor App
 
Bdd with Cucumber and Mocha
Bdd with Cucumber and MochaBdd with Cucumber and Mocha
Bdd with Cucumber and Mocha
 
Open Social In The Enterprise
Open Social In The EnterpriseOpen Social In The Enterprise
Open Social In The Enterprise
 
How to Contribute to Apache Usergrid
How to Contribute to Apache UsergridHow to Contribute to Apache Usergrid
How to Contribute to Apache Usergrid
 
A Microsoft Silverlight User Group Starter Kit Made Available for Everyone to...
A Microsoft Silverlight User Group Starter Kit Made Available for Everyone to...A Microsoft Silverlight User Group Starter Kit Made Available for Everyone to...
A Microsoft Silverlight User Group Starter Kit Made Available for Everyone to...
 
From legacy to DDD (slides for the screencast)
From legacy to DDD (slides for the screencast)From legacy to DDD (slides for the screencast)
From legacy to DDD (slides for the screencast)
 
Serverless in production, an experience report (Going Serverless)
Serverless in production, an experience report (Going Serverless)Serverless in production, an experience report (Going Serverless)
Serverless in production, an experience report (Going Serverless)
 
(Updated) SharePoint & jQuery Guide
(Updated) SharePoint & jQuery Guide(Updated) SharePoint & jQuery Guide
(Updated) SharePoint & jQuery Guide
 
John Resig Beijing 2010 (English Version)
John Resig Beijing 2010 (English Version)John Resig Beijing 2010 (English Version)
John Resig Beijing 2010 (English Version)
 
Serverless in production, an experience report (JeffConf)
Serverless in production, an experience report (JeffConf)Serverless in production, an experience report (JeffConf)
Serverless in production, an experience report (JeffConf)
 
Workshop: Building Vaadin add-ons
Workshop: Building Vaadin add-onsWorkshop: Building Vaadin add-ons
Workshop: Building Vaadin add-ons
 
XPages Mobile, #dd13
XPages Mobile, #dd13XPages Mobile, #dd13
XPages Mobile, #dd13
 
Selendroid in Action
Selendroid in ActionSelendroid in Action
Selendroid in Action
 
JavaScripters Event Oct 22, 2016 · 2:00 PM: Common Mistakes made by Angular D...
JavaScripters Event Oct 22, 2016 · 2:00 PM: Common Mistakes made by Angular D...JavaScripters Event Oct 22, 2016 · 2:00 PM: Common Mistakes made by Angular D...
JavaScripters Event Oct 22, 2016 · 2:00 PM: Common Mistakes made by Angular D...
 
Google app engine by example
Google app engine by exampleGoogle app engine by example
Google app engine by example
 
Building Mobile Friendly APIs in Rails
Building Mobile Friendly APIs in RailsBuilding Mobile Friendly APIs in Rails
Building Mobile Friendly APIs in Rails
 
Overview of DroidCon UK 2015
Overview of DroidCon UK 2015 Overview of DroidCon UK 2015
Overview of DroidCon UK 2015
 
Using Customer Development to get Traction in a Crowded Space
Using Customer Development to get Traction in a Crowded SpaceUsing Customer Development to get Traction in a Crowded Space
Using Customer Development to get Traction in a Crowded Space
 
Gretty: Managing Web Containers with Gradle
Gretty: Managing Web Containers with GradleGretty: Managing Web Containers with Gradle
Gretty: Managing Web Containers with Gradle
 
The SharePoint & jQuery Guide - Updated 1/14/14
The SharePoint & jQuery Guide - Updated 1/14/14The SharePoint & jQuery Guide - Updated 1/14/14
The SharePoint & jQuery Guide - Updated 1/14/14
 

Más de sullis

Programming WebSockets - OSCON 2010
Programming WebSockets - OSCON 2010Programming WebSockets - OSCON 2010
Programming WebSockets - OSCON 2010
sullis
 
Programming WebSockets - April 20 2010
Programming WebSockets - April 20 2010Programming WebSockets - April 20 2010
Programming WebSockets - April 20 2010
sullis
 

Más de sullis (19)

Getting started with MongoDB and Scala - Open Source Bridge 2012
Getting started with MongoDB and Scala - Open Source Bridge 2012Getting started with MongoDB and Scala - Open Source Bridge 2012
Getting started with MongoDB and Scala - Open Source Bridge 2012
 
Comparing JSON Libraries - July 19 2011
Comparing JSON Libraries - July 19 2011Comparing JSON Libraries - July 19 2011
Comparing JSON Libraries - July 19 2011
 
GWT 2.0 - OSCON 2010
GWT 2.0 - OSCON 2010GWT 2.0 - OSCON 2010
GWT 2.0 - OSCON 2010
 
Programming WebSockets - OSCON 2010
Programming WebSockets - OSCON 2010Programming WebSockets - OSCON 2010
Programming WebSockets - OSCON 2010
 
Connecting to Web Services on Android June 2 2010
Connecting to Web Services on Android June 2 2010Connecting to Web Services on Android June 2 2010
Connecting to Web Services on Android June 2 2010
 
Programming WebSockets - April 20 2010
Programming WebSockets - April 20 2010Programming WebSockets - April 20 2010
Programming WebSockets - April 20 2010
 
WebDAV - April 15 2008
WebDAV - April 15 2008WebDAV - April 15 2008
WebDAV - April 15 2008
 
GWT 2.0 - December 15 2009
GWT 2.0 - December 15 2009GWT 2.0 - December 15 2009
GWT 2.0 - December 15 2009
 
Google App Engine - September 17 2009
Google App Engine - September 17 2009Google App Engine - September 17 2009
Google App Engine - September 17 2009
 
Google App Engine - Portland Java User Group - August 18 2009
Google App Engine - Portland Java User Group - August 18 2009Google App Engine - Portland Java User Group - August 18 2009
Google App Engine - Portland Java User Group - August 18 2009
 
Domo Arigato Mr. Roboto - Open Source Bridge 2009
Domo Arigato Mr. Roboto - Open Source Bridge 2009Domo Arigato Mr. Roboto - Open Source Bridge 2009
Domo Arigato Mr. Roboto - Open Source Bridge 2009
 
Java and JSON - UJUG - March 19 2009
Java and JSON - UJUG - March 19 2009Java and JSON - UJUG - March 19 2009
Java and JSON - UJUG - March 19 2009
 
OAuth and REST web services
OAuth and REST web servicesOAuth and REST web services
OAuth and REST web services
 
Introduction to Android - Mobile Fest Singapore 2009
Introduction to Android - Mobile Fest Singapore 2009Introduction to Android - Mobile Fest Singapore 2009
Introduction to Android - Mobile Fest Singapore 2009
 
Web Services and Android - OSSPAC 2009
Web Services and Android - OSSPAC 2009Web Services and Android - OSSPAC 2009
Web Services and Android - OSSPAC 2009
 
Getting Started with Android - OSSPAC 2009
Getting Started with Android - OSSPAC 2009Getting Started with Android - OSSPAC 2009
Getting Started with Android - OSSPAC 2009
 
Connecting to Web Services on Android
Connecting to Web Services on AndroidConnecting to Web Services on Android
Connecting to Web Services on Android
 
Introduction to Android - Mobile Portland
Introduction to Android - Mobile PortlandIntroduction to Android - Mobile Portland
Introduction to Android - Mobile Portland
 
Getting started with Google Android - OSCON 2008
Getting started with Google Android - OSCON 2008Getting started with Google Android - OSCON 2008
Getting started with Google Android - OSCON 2008
 

Último

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Último (20)

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 

Production Ready Web Services with Dropwizard