SlideShare a Scribd company logo
1 of 37
Download to read offline
Dropwizard and Friends
On a Twelve-factor Quest
Meetup April 2015Sydney MicroServices
About MeAbout Me
Comp Science Bachelor UNSW
Applied Finance PostGrad at Macquarie Uni
ESB driver at Accenture, BGI/BlackRock, Macquarie Group
Now Microservicing Trunk Platform
yunspace yunzhilin yunspace.com
My opinions does not reflect the view of the company
Shout out if you have questions, or answers
WhyWhy
DemoDemo
DecisionsDecisions
CD + DockerCD + Docker
Why Dropwizard?
Standalone AppStandalone App
public static void main(String[] args) throws Exception {
new LazyCatApplication().run(args);
}
java -jar build/awesome_api.jar server awesome_api.yml
No War Files, No App Servers
Builds and runs a Fat Jar
Start Application in a simple Main() method
Because:
Application Servers are Dead
and you should
Stop Wasting Money on Application Servers
Who Uses Dropwizard?Who Uses Dropwizard?
Sky -
Datasift - dropwizard extra, scala, zeromq
HubSpot - dropwizard-guice
Gilt -
airbnb -
Riot Games -
Bloom Health -
Fault Tolerant Microservices
Production Ready Web Services with Dropwizard
Introducing Airpal
How we built a Cloud Platform at Riot
Games using NetflixOSS
Micro-services with Dropwizard
Surely Java without App Server is unstable?
Production ReadyProduction Ready
Ops Friend
Health Checks
Metrix
More so than most Enterprise Apps
Plays Well with OthersPlays Well with Others
More Modules at http://modules.dropwizard.io/
Easy to do the Right ThingEasy to do the Right Thing
Dropwizard makes it easy to do the right thing,
allowing you to concentrate on the essential
complexity of a problem rather than the plumbing
ThoughtWorks Technology Radar
We agree
HighHigh
PerformancePerformance
techempower.com/benchmarks/
LowLow
LatencyLatency
techempower.com/benchmarks/
Compared to RailsCompared to Rails
- Yammer, April 2014Dropping Rails for Dropwizard?
Compared Spring BootCompared Spring Boot
- Takipi BlogJava BootStrap: Dropwizard vs SprintBoot
Compared to RatPackCompared to RatPack
public class FooBarFactory implements HandlerFacto
@Override
public Handler create(LaunchConfig launchConfig)
return Guice.builder(launchConfig)
.bindings(bindingsSpec -> bindingsSpec.add(n
.build(chain -> chain
.handler("foo", context -> context.render(
.handler("bar", context -> context.render(
}
}
public class FooBarApplication extends Application<FooBarConfig> {
public static void main(String[] args) throws Exception {
new FooBarApplication().run(args);
}
@Override
public void run(final FooBarApplication configuration, final Environment environment) throws Exc
environment.register(FooResource.class);
environment.register(BarResrouce.class);
}
}
@Path("/foo")
@Consumes(APPLICATION_JSON) @Produces(APPLICATION_JSON)
public class FooResource {
@GET
public String getFoo() {
return "from the foo handler";
}
}
Dropwizard is more opinionated and explicit
Right Tool for the Right JobRight Tool for the Right Job
Not a silver bullet
We also use Rails to leverage neat Gems
And AngularJs on HarpJs for Static Sites
Build another "Hello World" App?Build another "Hello World" App?
DemoDemo
Let's build a
app using !
Dropwizard Turbo
LazyBones
12 Factors12 Factors
Design DecisionsDesign Decisions
Iron FistedIron Fisted
GradleGradle
Declare and isolate
Portable "gradlew" is great for CI & locks gradle version
More than just Dependency Management:
builds shadow
Dependencies (II)
ConfigurationConfiguration
dataSource:
driverClass: ${env.HIBERNATE_DRIVER!'org.h2.Driver'}
user: ${env.HIBERNATE_USER!'sa'}
password: ${env.HIBERNATE_PASSWORD!'sa'}
url: ${env.HIBERNATE_URL!'jdbc:h2:./build/h2db'}
java 
-Ddw.dataSource.driverClass=$DATABASE_DRIVER -Ddw.dataSource.url=$DATABASE_URL 
-Ddw.dataSource.user=$DATABASE_USER -Ddw.dataSource.password=$DATABASE_PASSWORD 
-jar build/application.jar server config.yml
2. Use to add ${env} in config.yml:Dropwizard-Template-Config
java -jar build/application.jar server config.yml
1. Replace config.yml variables in run command (messy):
Attach with no code change
Configuration using Environment Variables (III)
Backing Services (IV)
ModulesModules
Dropwizard version 0.8.0: major update.
We are active contributors, get in contact if you have
any issues
Jersey2
github.com/dropwizard/dropwizard-java8
github.com/hubspot/dropwizard-guice
Used by lazybones-dropwizard-turbo
Swagger.IOSwagger.IO
Integration using our own code
New RelicNew Relic
Gist:
Register above listener, add newrelic.jar
NewRelicTimedApplicationListener
DockerfileDockerfile
FROM errordeveloper/oracle-jre
ENV HOME /root/
WORKDIR /app/
# newrelic
RUN curl -L --silent --retry 3 
https://download.newrelic.com/newrelic/java-agent/newrelic-agent/current/newrelic-java.zip -o n
RUN unzip newrelic-java.zip && 
rm newrelic/*.xml newrelic/*.xsd newrelic/*.yml newrelic/newrelic-api*.jar
ADD newrelic/newrelic.yml /app/newrelic/newrelic.yml
# plamasphere
ADD platmasphere-services.yml /app/
ENV PLATMA_VERSION latest
ADD build/platmasphere-services.jar /app/platmasphere-services.jar
# run
EXPOSE 9090
ENTRYPOINT [ "java" ]
CMD ["-javaagent:newrelic/newrelic.jar", "-jar", "platmasphere-services.jar", "server", "platmasphe
TipsTips
Joda DateTime is NOT equivalent to JSR-310
LocalDateTime. Use ZonedDateTime or OffsetDateTime
compile "org.jadira.usertype:usertype.extended:3.2.0.GA"
Use Governator @LazySingleton if you have issue with
Guice eager @Singleton
compile("com.netflix.governator:governator:${governatorVersion}") {
exclude group: 'com.google.guava', module: 'guava'
exclude group: 'commons-lang'
}
Multiple Database Schema Support: have a look here
for Hibernate JSR-310 supportJadira UserType Extended
Continuous DeliveryContinuous Delivery
++
DockerDocker
Snap-CISnap-CI
Continuous Delivery enables:Continuous Delivery enables:
Strictly Separate
Reduced
Build, Release, Run (V)
Dev/prod parity (X)
ContractContractPactPact
{
"description": "request for getting property 80 CLARENCE ST",
"provider_state": "property 80 CLARENCE ST exists",
"request": {
"method": "get",
"path": "/properties/1",
"headers": {
"Tenant": "trunk",
"Authorization": "Bearer valid_token"
}
},
"response": {
"status": 200,
"headers": {
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Headers": "origin, content-type, accept, authorization, tenant",
"Access-Control-Allow-Credentials": "true",
"Access-Control-Allow-Methods": "GET, POST, PUT, DELETE, OPTIONS, HEAD",
"Access-Control-Max-Age": "43200"
},
"body": {
"id": 1,
"addressLine": "80 CLARENCE ST",
"postcode": "2000",
"state": "NSW",
"suburb": "SYDNEY",
"streamId": 1
}
}
}
BinTray and Quay.ioBinTray and Quay.io
One Codebase, many deploys (I)
Small Base Image = quicker build time
Use (busybox based)
Only 159 mb
errordeveloper/oracle-jre
Build Docker ImagesBuild Docker Images
Database MigrationDatabase Migration
Prior to deploying to a Environment, we run DB
Migration as Once off Admin Processes (XII)
./gradlew dbMigrate -Pdb_schema=
./gradlew dbTag -Pdb_schema=
Deploy Docker ContainerDeploy Docker Container
Isolation of and
Containers are and
to LogSpout
Stateless Processes (VI) Port
binding (VII)
Disposable(IX) Concurrent(VIII)
Stream Logs (XI)
Docker Containers takes care of:
Running Containers in TutumRunning Containers in Tutum
https://docs.tutum.co/v2/api/
QuestionsQuestions
Like us on GitHub!
https://github.com/Trunkplatform/lazybones-dropwizard-turbo
Dropwizard Links
dropwizard.io
https://github.com/dropwizard
https://groups.google.com/forum/#!forum/dropwizard-user

More Related Content

What's hot

[1D1]신개념 N스크린 웹 앱 프레임워크 PARS
[1D1]신개념 N스크린 웹 앱 프레임워크 PARS[1D1]신개념 N스크린 웹 앱 프레임워크 PARS
[1D1]신개념 N스크린 웹 앱 프레임워크 PARSNAVER D2
 
Micronaut For Single Page Apps
Micronaut For Single Page AppsMicronaut For Single Page Apps
Micronaut For Single Page AppsZachary Klein
 
Full stack development with node and NoSQL - All Things Open - October 2017
Full stack development with node and NoSQL - All Things Open - October 2017Full stack development with node and NoSQL - All Things Open - October 2017
Full stack development with node and NoSQL - All Things Open - October 2017Matthew Groves
 
Spring Boot Revisited with KoFu and JaFu
Spring Boot Revisited with KoFu and JaFuSpring Boot Revisited with KoFu and JaFu
Spring Boot Revisited with KoFu and JaFuVMware Tanzu
 
REST APIs with Spring
REST APIs with SpringREST APIs with Spring
REST APIs with SpringJoshua Long
 
Java Microservices with Spring Boot and Spring Cloud - Denver JUG 2019
Java Microservices with Spring Boot and Spring Cloud - Denver JUG 2019Java Microservices with Spring Boot and Spring Cloud - Denver JUG 2019
Java Microservices with Spring Boot and Spring Cloud - Denver JUG 2019Matt Raible
 
Java REST API Framework Comparison - UberConf 2021
Java REST API Framework Comparison - UberConf 2021Java REST API Framework Comparison - UberConf 2021
Java REST API Framework Comparison - UberConf 2021Matt Raible
 
Microservices with Spring Boot
Microservices with Spring BootMicroservices with Spring Boot
Microservices with Spring BootJoshua Long
 
Game of Streams: How to Tame and Get the Most from Your Messaging Platforms
Game of Streams: How to Tame and Get the Most from Your Messaging PlatformsGame of Streams: How to Tame and Get the Most from Your Messaging Platforms
Game of Streams: How to Tame and Get the Most from Your Messaging PlatformsVMware Tanzu
 
Micronaut: Changing the Micro Future
Micronaut: Changing the Micro FutureMicronaut: Changing the Micro Future
Micronaut: Changing the Micro FutureZachary Klein
 
The Making of the Oracle R2DBC Driver and How to Take Your Code from Synchron...
The Making of the Oracle R2DBC Driver and How to Take Your Code from Synchron...The Making of the Oracle R2DBC Driver and How to Take Your Code from Synchron...
The Making of the Oracle R2DBC Driver and How to Take Your Code from Synchron...VMware Tanzu
 
Play vs Grails Smackdown - Devoxx France 2013
Play vs Grails Smackdown - Devoxx France 2013Play vs Grails Smackdown - Devoxx France 2013
Play vs Grails Smackdown - Devoxx France 2013Matt Raible
 
GR8Conf 2011: Grails, how to plug in
GR8Conf 2011: Grails, how to plug inGR8Conf 2011: Grails, how to plug in
GR8Conf 2011: Grails, how to plug inGR8Conf
 
What’s New in Spring Data MongoDB
What’s New in Spring Data MongoDBWhat’s New in Spring Data MongoDB
What’s New in Spring Data MongoDBVMware Tanzu
 
Spring Boot & WebSocket
Spring Boot & WebSocketSpring Boot & WebSocket
Spring Boot & WebSocketMing-Ying Wu
 
SpringBoot and Spring Cloud Service for MSA
SpringBoot and Spring Cloud Service for MSASpringBoot and Spring Cloud Service for MSA
SpringBoot and Spring Cloud Service for MSAOracle Korea
 
W-JAX 2011: OSGi with Apache Karaf
W-JAX 2011: OSGi with Apache KarafW-JAX 2011: OSGi with Apache Karaf
W-JAX 2011: OSGi with Apache KarafJerry Preissler
 
Modularizing your Grails Application with Private Plugins - SpringOne 2GX 2012
Modularizing your Grails Application with Private Plugins - SpringOne 2GX 2012Modularizing your Grails Application with Private Plugins - SpringOne 2GX 2012
Modularizing your Grails Application with Private Plugins - SpringOne 2GX 2012kennethaliu
 

What's hot (20)

[1D1]신개념 N스크린 웹 앱 프레임워크 PARS
[1D1]신개념 N스크린 웹 앱 프레임워크 PARS[1D1]신개념 N스크린 웹 앱 프레임워크 PARS
[1D1]신개념 N스크린 웹 앱 프레임워크 PARS
 
Integration testing dropwizard
Integration testing dropwizardIntegration testing dropwizard
Integration testing dropwizard
 
Micronaut For Single Page Apps
Micronaut For Single Page AppsMicronaut For Single Page Apps
Micronaut For Single Page Apps
 
Full stack development with node and NoSQL - All Things Open - October 2017
Full stack development with node and NoSQL - All Things Open - October 2017Full stack development with node and NoSQL - All Things Open - October 2017
Full stack development with node and NoSQL - All Things Open - October 2017
 
Spring Boot Revisited with KoFu and JaFu
Spring Boot Revisited with KoFu and JaFuSpring Boot Revisited with KoFu and JaFu
Spring Boot Revisited with KoFu and JaFu
 
REST APIs with Spring
REST APIs with SpringREST APIs with Spring
REST APIs with Spring
 
Java Microservices with Spring Boot and Spring Cloud - Denver JUG 2019
Java Microservices with Spring Boot and Spring Cloud - Denver JUG 2019Java Microservices with Spring Boot and Spring Cloud - Denver JUG 2019
Java Microservices with Spring Boot and Spring Cloud - Denver JUG 2019
 
Java REST API Framework Comparison - UberConf 2021
Java REST API Framework Comparison - UberConf 2021Java REST API Framework Comparison - UberConf 2021
Java REST API Framework Comparison - UberConf 2021
 
Apache Lucene for Java EE Developers
Apache Lucene for Java EE DevelopersApache Lucene for Java EE Developers
Apache Lucene for Java EE Developers
 
Microservices with Spring Boot
Microservices with Spring BootMicroservices with Spring Boot
Microservices with Spring Boot
 
Game of Streams: How to Tame and Get the Most from Your Messaging Platforms
Game of Streams: How to Tame and Get the Most from Your Messaging PlatformsGame of Streams: How to Tame and Get the Most from Your Messaging Platforms
Game of Streams: How to Tame and Get the Most from Your Messaging Platforms
 
Micronaut: Changing the Micro Future
Micronaut: Changing the Micro FutureMicronaut: Changing the Micro Future
Micronaut: Changing the Micro Future
 
The Making of the Oracle R2DBC Driver and How to Take Your Code from Synchron...
The Making of the Oracle R2DBC Driver and How to Take Your Code from Synchron...The Making of the Oracle R2DBC Driver and How to Take Your Code from Synchron...
The Making of the Oracle R2DBC Driver and How to Take Your Code from Synchron...
 
Play vs Grails Smackdown - Devoxx France 2013
Play vs Grails Smackdown - Devoxx France 2013Play vs Grails Smackdown - Devoxx France 2013
Play vs Grails Smackdown - Devoxx France 2013
 
GR8Conf 2011: Grails, how to plug in
GR8Conf 2011: Grails, how to plug inGR8Conf 2011: Grails, how to plug in
GR8Conf 2011: Grails, how to plug in
 
What’s New in Spring Data MongoDB
What’s New in Spring Data MongoDBWhat’s New in Spring Data MongoDB
What’s New in Spring Data MongoDB
 
Spring Boot & WebSocket
Spring Boot & WebSocketSpring Boot & WebSocket
Spring Boot & WebSocket
 
SpringBoot and Spring Cloud Service for MSA
SpringBoot and Spring Cloud Service for MSASpringBoot and Spring Cloud Service for MSA
SpringBoot and Spring Cloud Service for MSA
 
W-JAX 2011: OSGi with Apache Karaf
W-JAX 2011: OSGi with Apache KarafW-JAX 2011: OSGi with Apache Karaf
W-JAX 2011: OSGi with Apache Karaf
 
Modularizing your Grails Application with Private Plugins - SpringOne 2GX 2012
Modularizing your Grails Application with Private Plugins - SpringOne 2GX 2012Modularizing your Grails Application with Private Plugins - SpringOne 2GX 2012
Modularizing your Grails Application with Private Plugins - SpringOne 2GX 2012
 

Viewers also liked

Nano Segmentation - A Docker Security Journey
Nano Segmentation - A Docker Security JourneyNano Segmentation - A Docker Security Journey
Nano Segmentation - A Docker Security JourneyYun Zhi Lin
 
A Tale of Contemporary Software
A Tale of Contemporary SoftwareA Tale of Contemporary Software
A Tale of Contemporary SoftwareYun Zhi Lin
 
Insurtech Sydney Launch Event 7 September 2016
Insurtech Sydney Launch Event 7 September 2016Insurtech Sydney Launch Event 7 September 2016
Insurtech Sydney Launch Event 7 September 2016Brenton Charnley
 
Dropwizard with MongoDB and Google Cloud
Dropwizard with MongoDB and Google CloudDropwizard with MongoDB and Google Cloud
Dropwizard with MongoDB and Google CloudYun Zhi Lin
 
Andy Kennedy - Scottish VMUG April 2016
Andy Kennedy - Scottish VMUG April 2016Andy Kennedy - Scottish VMUG April 2016
Andy Kennedy - Scottish VMUG April 2016Andy Kennedy
 
The Hitch-Hikers Guide to Data Centre Virtualization and Workload Consolidation:
The Hitch-Hikers Guide to Data Centre Virtualization and Workload Consolidation:The Hitch-Hikers Guide to Data Centre Virtualization and Workload Consolidation:
The Hitch-Hikers Guide to Data Centre Virtualization and Workload Consolidation:Cisco Canada
 
Security Practitioners guide to Micro Segmentation with VMware NSX and Log In...
Security Practitioners guide to Micro Segmentation with VMware NSX and Log In...Security Practitioners guide to Micro Segmentation with VMware NSX and Log In...
Security Practitioners guide to Micro Segmentation with VMware NSX and Log In...Anthony Burke
 
How To Track Performance and Fault in a Multi-layer, Software-Defined Network...
How To Track Performance and Fault in a Multi-layer, Software-Defined Network...How To Track Performance and Fault in a Multi-layer, Software-Defined Network...
How To Track Performance and Fault in a Multi-layer, Software-Defined Network...CA Technologies
 
How to-migrate-and-manage-security-policies-in-a-segmented-data-center---webi...
How to-migrate-and-manage-security-policies-in-a-segmented-data-center---webi...How to-migrate-and-manage-security-policies-in-a-segmented-data-center---webi...
How to-migrate-and-manage-security-policies-in-a-segmented-data-center---webi...Adi Gazit Blecher
 
Demystifying Orchestration and Assurance Across SDN NFV CE2.0
Demystifying Orchestration and Assurance Across SDN NFV CE2.0Demystifying Orchestration and Assurance Across SDN NFV CE2.0
Demystifying Orchestration and Assurance Across SDN NFV CE2.0WebNMS
 
Leverage Micro-Segmentation to Build a Zero Trust Network (Forrester)
Leverage Micro-Segmentation to Build a Zero Trust Network (Forrester)Leverage Micro-Segmentation to Build a Zero Trust Network (Forrester)
Leverage Micro-Segmentation to Build a Zero Trust Network (Forrester)VMware
 
Pre-Con Ed: Integrate Your Monitoring Tools Into an Automated Service Impact ...
Pre-Con Ed: Integrate Your Monitoring Tools Into an Automated Service Impact ...Pre-Con Ed: Integrate Your Monitoring Tools Into an Automated Service Impact ...
Pre-Con Ed: Integrate Your Monitoring Tools Into an Automated Service Impact ...CA Technologies
 
Microservices and Friends
Microservices and FriendsMicroservices and Friends
Microservices and FriendsYun Zhi Lin
 
Expectation for SDN as Carrier's Network
Expectation for SDN as Carrier's NetworkExpectation for SDN as Carrier's Network
Expectation for SDN as Carrier's NetworkOpen Networking Summits
 
Managing Tomorrow’s Networks: The Impacts of SDN and Network Virtualization o...
Managing Tomorrow’s Networks: The Impacts of SDN and Network Virtualization o...Managing Tomorrow’s Networks: The Impacts of SDN and Network Virtualization o...
Managing Tomorrow’s Networks: The Impacts of SDN and Network Virtualization o...CA Technologies
 
NFV management and orchestration framework architecture
NFV management and orchestration framework architectureNFV management and orchestration framework architecture
NFV management and orchestration framework architecturesidneel
 
Ratpack Web Framework
Ratpack Web FrameworkRatpack Web Framework
Ratpack Web FrameworkDaniel Woods
 
SDN Security: Two Sides of the Same Coin
SDN Security: Two Sides of the Same CoinSDN Security: Two Sides of the Same Coin
SDN Security: Two Sides of the Same CoinZivaro Inc
 
4 Success stories in 3 years - A Docker Production Journey
4 Success stories in 3 years - A Docker Production Journey4 Success stories in 3 years - A Docker Production Journey
4 Success stories in 3 years - A Docker Production JourneyYun Zhi Lin
 
Docker introduction
Docker introductionDocker introduction
Docker introductiondotCloud
 

Viewers also liked (20)

Nano Segmentation - A Docker Security Journey
Nano Segmentation - A Docker Security JourneyNano Segmentation - A Docker Security Journey
Nano Segmentation - A Docker Security Journey
 
A Tale of Contemporary Software
A Tale of Contemporary SoftwareA Tale of Contemporary Software
A Tale of Contemporary Software
 
Insurtech Sydney Launch Event 7 September 2016
Insurtech Sydney Launch Event 7 September 2016Insurtech Sydney Launch Event 7 September 2016
Insurtech Sydney Launch Event 7 September 2016
 
Dropwizard with MongoDB and Google Cloud
Dropwizard with MongoDB and Google CloudDropwizard with MongoDB and Google Cloud
Dropwizard with MongoDB and Google Cloud
 
Andy Kennedy - Scottish VMUG April 2016
Andy Kennedy - Scottish VMUG April 2016Andy Kennedy - Scottish VMUG April 2016
Andy Kennedy - Scottish VMUG April 2016
 
The Hitch-Hikers Guide to Data Centre Virtualization and Workload Consolidation:
The Hitch-Hikers Guide to Data Centre Virtualization and Workload Consolidation:The Hitch-Hikers Guide to Data Centre Virtualization and Workload Consolidation:
The Hitch-Hikers Guide to Data Centre Virtualization and Workload Consolidation:
 
Security Practitioners guide to Micro Segmentation with VMware NSX and Log In...
Security Practitioners guide to Micro Segmentation with VMware NSX and Log In...Security Practitioners guide to Micro Segmentation with VMware NSX and Log In...
Security Practitioners guide to Micro Segmentation with VMware NSX and Log In...
 
How To Track Performance and Fault in a Multi-layer, Software-Defined Network...
How To Track Performance and Fault in a Multi-layer, Software-Defined Network...How To Track Performance and Fault in a Multi-layer, Software-Defined Network...
How To Track Performance and Fault in a Multi-layer, Software-Defined Network...
 
How to-migrate-and-manage-security-policies-in-a-segmented-data-center---webi...
How to-migrate-and-manage-security-policies-in-a-segmented-data-center---webi...How to-migrate-and-manage-security-policies-in-a-segmented-data-center---webi...
How to-migrate-and-manage-security-policies-in-a-segmented-data-center---webi...
 
Demystifying Orchestration and Assurance Across SDN NFV CE2.0
Demystifying Orchestration and Assurance Across SDN NFV CE2.0Demystifying Orchestration and Assurance Across SDN NFV CE2.0
Demystifying Orchestration and Assurance Across SDN NFV CE2.0
 
Leverage Micro-Segmentation to Build a Zero Trust Network (Forrester)
Leverage Micro-Segmentation to Build a Zero Trust Network (Forrester)Leverage Micro-Segmentation to Build a Zero Trust Network (Forrester)
Leverage Micro-Segmentation to Build a Zero Trust Network (Forrester)
 
Pre-Con Ed: Integrate Your Monitoring Tools Into an Automated Service Impact ...
Pre-Con Ed: Integrate Your Monitoring Tools Into an Automated Service Impact ...Pre-Con Ed: Integrate Your Monitoring Tools Into an Automated Service Impact ...
Pre-Con Ed: Integrate Your Monitoring Tools Into an Automated Service Impact ...
 
Microservices and Friends
Microservices and FriendsMicroservices and Friends
Microservices and Friends
 
Expectation for SDN as Carrier's Network
Expectation for SDN as Carrier's NetworkExpectation for SDN as Carrier's Network
Expectation for SDN as Carrier's Network
 
Managing Tomorrow’s Networks: The Impacts of SDN and Network Virtualization o...
Managing Tomorrow’s Networks: The Impacts of SDN and Network Virtualization o...Managing Tomorrow’s Networks: The Impacts of SDN and Network Virtualization o...
Managing Tomorrow’s Networks: The Impacts of SDN and Network Virtualization o...
 
NFV management and orchestration framework architecture
NFV management and orchestration framework architectureNFV management and orchestration framework architecture
NFV management and orchestration framework architecture
 
Ratpack Web Framework
Ratpack Web FrameworkRatpack Web Framework
Ratpack Web Framework
 
SDN Security: Two Sides of the Same Coin
SDN Security: Two Sides of the Same CoinSDN Security: Two Sides of the Same Coin
SDN Security: Two Sides of the Same Coin
 
4 Success stories in 3 years - A Docker Production Journey
4 Success stories in 3 years - A Docker Production Journey4 Success stories in 3 years - A Docker Production Journey
4 Success stories in 3 years - A Docker Production Journey
 
Docker introduction
Docker introductionDocker introduction
Docker introduction
 

Similar to Dropwizard and Friends

JCConf 2016 - Dataflow Workshop Labs
JCConf 2016 - Dataflow Workshop LabsJCConf 2016 - Dataflow Workshop Labs
JCConf 2016 - Dataflow Workshop LabsSimon Su
 
Construire une application JavaFX 8 avec gradle
Construire une application JavaFX 8 avec gradleConstruire une application JavaFX 8 avec gradle
Construire une application JavaFX 8 avec gradleThierry Wasylczenko
 
Django deployment with PaaS
Django deployment with PaaSDjango deployment with PaaS
Django deployment with PaaSAppsembler
 
Taking Jenkins Pipeline to the Extreme
Taking Jenkins Pipeline to the ExtremeTaking Jenkins Pipeline to the Extreme
Taking Jenkins Pipeline to the Extremeyinonavraham
 
Neo4j Stored Procedure Training Part 2
Neo4j Stored Procedure Training Part 2Neo4j Stored Procedure Training Part 2
Neo4j Stored Procedure Training Part 2Max De Marzi
 
RichFaces - Testing on Mobile Devices
RichFaces - Testing on Mobile DevicesRichFaces - Testing on Mobile Devices
RichFaces - Testing on Mobile DevicesPavol Pitoňák
 
Rapid Application Development with WSO2 Platform
Rapid Application Development with WSO2 PlatformRapid Application Development with WSO2 Platform
Rapid Application Development with WSO2 PlatformWSO2
 
Native Java with GraalVM
Native Java with GraalVMNative Java with GraalVM
Native Java with GraalVMSylvain Wallez
 
In the Brain of Hans Dockter: Gradle
In the Brain of Hans Dockter: GradleIn the Brain of Hans Dockter: Gradle
In the Brain of Hans Dockter: GradleSkills Matter
 
Django Architecture Introduction
Django Architecture IntroductionDjango Architecture Introduction
Django Architecture IntroductionHaiqi Chen
 
Modular Test-driven SPAs with Spring and AngularJS
Modular Test-driven SPAs with Spring and AngularJSModular Test-driven SPAs with Spring and AngularJS
Modular Test-driven SPAs with Spring and AngularJSGunnar Hillert
 
Spring into rails
Spring into railsSpring into rails
Spring into railsHiro Asari
 
Testing your application on Google App Engine
Testing your application on Google App EngineTesting your application on Google App Engine
Testing your application on Google App EngineInphina Technologies
 
Testing Your Application On Google App Engine
Testing Your Application On Google App EngineTesting Your Application On Google App Engine
Testing Your Application On Google App EngineIndicThreads
 
Google I/O 2021 Recap
Google I/O 2021 RecapGoogle I/O 2021 Recap
Google I/O 2021 Recapfurusin
 
Phone gap 12 things you should know
Phone gap 12 things you should knowPhone gap 12 things you should know
Phone gap 12 things you should knowISOCHK
 
Making the most of your gradle build - Gr8Conf 2017
Making the most of your gradle build - Gr8Conf 2017Making the most of your gradle build - Gr8Conf 2017
Making the most of your gradle build - Gr8Conf 2017Andres Almiray
 
Endofday: A Container Workflow Engine for Scalable, Reproducible Computation
Endofday: A Container Workflow Engine for Scalable, Reproducible ComputationEndofday: A Container Workflow Engine for Scalable, Reproducible Computation
Endofday: A Container Workflow Engine for Scalable, Reproducible ComputationEnis Afgan
 

Similar to Dropwizard and Friends (20)

JCConf 2016 - Dataflow Workshop Labs
JCConf 2016 - Dataflow Workshop LabsJCConf 2016 - Dataflow Workshop Labs
JCConf 2016 - Dataflow Workshop Labs
 
Spring Boot
Spring BootSpring Boot
Spring Boot
 
Construire une application JavaFX 8 avec gradle
Construire une application JavaFX 8 avec gradleConstruire une application JavaFX 8 avec gradle
Construire une application JavaFX 8 avec gradle
 
Django deployment with PaaS
Django deployment with PaaSDjango deployment with PaaS
Django deployment with PaaS
 
Taking Jenkins Pipeline to the Extreme
Taking Jenkins Pipeline to the ExtremeTaking Jenkins Pipeline to the Extreme
Taking Jenkins Pipeline to the Extreme
 
Neo4j Stored Procedure Training Part 2
Neo4j Stored Procedure Training Part 2Neo4j Stored Procedure Training Part 2
Neo4j Stored Procedure Training Part 2
 
RichFaces - Testing on Mobile Devices
RichFaces - Testing on Mobile DevicesRichFaces - Testing on Mobile Devices
RichFaces - Testing on Mobile Devices
 
Rapid Application Development with WSO2 Platform
Rapid Application Development with WSO2 PlatformRapid Application Development with WSO2 Platform
Rapid Application Development with WSO2 Platform
 
Native Java with GraalVM
Native Java with GraalVMNative Java with GraalVM
Native Java with GraalVM
 
In the Brain of Hans Dockter: Gradle
In the Brain of Hans Dockter: GradleIn the Brain of Hans Dockter: Gradle
In the Brain of Hans Dockter: Gradle
 
Django Architecture Introduction
Django Architecture IntroductionDjango Architecture Introduction
Django Architecture Introduction
 
Modular Test-driven SPAs with Spring and AngularJS
Modular Test-driven SPAs with Spring and AngularJSModular Test-driven SPAs with Spring and AngularJS
Modular Test-driven SPAs with Spring and AngularJS
 
Spring into rails
Spring into railsSpring into rails
Spring into rails
 
Testing your application on Google App Engine
Testing your application on Google App EngineTesting your application on Google App Engine
Testing your application on Google App Engine
 
Testing Your Application On Google App Engine
Testing Your Application On Google App EngineTesting Your Application On Google App Engine
Testing Your Application On Google App Engine
 
Google I/O 2021 Recap
Google I/O 2021 RecapGoogle I/O 2021 Recap
Google I/O 2021 Recap
 
Phone gap 12 things you should know
Phone gap 12 things you should knowPhone gap 12 things you should know
Phone gap 12 things you should know
 
Making the most of your gradle build - Gr8Conf 2017
Making the most of your gradle build - Gr8Conf 2017Making the most of your gradle build - Gr8Conf 2017
Making the most of your gradle build - Gr8Conf 2017
 
Endofday: A Container Workflow Engine for Scalable, Reproducible Computation
Endofday: A Container Workflow Engine for Scalable, Reproducible ComputationEndofday: A Container Workflow Engine for Scalable, Reproducible Computation
Endofday: A Container Workflow Engine for Scalable, Reproducible Computation
 
Griffon Presentation
Griffon PresentationGriffon Presentation
Griffon Presentation
 

More from Yun Zhi Lin

AWS Lambda Containers - bridging the gap between serverless and containers on...
AWS Lambda Containers - bridging the gap between serverless and containers on...AWS Lambda Containers - bridging the gap between serverless and containers on...
AWS Lambda Containers - bridging the gap between serverless and containers on...Yun Zhi Lin
 
Applied AI, Open Banking and Continuous Innovation the Easy Way - AI Days Mel...
Applied AI, Open Banking and Continuous Innovation the Easy Way - AI Days Mel...Applied AI, Open Banking and Continuous Innovation the Easy Way - AI Days Mel...
Applied AI, Open Banking and Continuous Innovation the Easy Way - AI Days Mel...Yun Zhi Lin
 
Art of Serverless Business Value - Serverless Days Sydney 2019
Art of Serverless Business Value - Serverless Days Sydney 2019Art of Serverless Business Value - Serverless Days Sydney 2019
Art of Serverless Business Value - Serverless Days Sydney 2019Yun Zhi Lin
 
Anticorrupting the Enterprise - Serverlessconf NYC 2017
Anticorrupting the Enterprise - Serverlessconf NYC 2017Anticorrupting the Enterprise - Serverlessconf NYC 2017
Anticorrupting the Enterprise - Serverlessconf NYC 2017Yun Zhi Lin
 
Financial Forecasting using Recurrent Neural Network, Social Media and Cloud
Financial Forecasting using Recurrent Neural Network, Social Media and CloudFinancial Forecasting using Recurrent Neural Network, Social Media and Cloud
Financial Forecasting using Recurrent Neural Network, Social Media and CloudYun Zhi Lin
 
Amazingly Simple Serverless Go
Amazingly Simple Serverless GoAmazingly Simple Serverless Go
Amazingly Simple Serverless GoYun Zhi Lin
 
Easy Serverless Golang
Easy Serverless GolangEasy Serverless Golang
Easy Serverless GolangYun Zhi Lin
 

More from Yun Zhi Lin (7)

AWS Lambda Containers - bridging the gap between serverless and containers on...
AWS Lambda Containers - bridging the gap between serverless and containers on...AWS Lambda Containers - bridging the gap between serverless and containers on...
AWS Lambda Containers - bridging the gap between serverless and containers on...
 
Applied AI, Open Banking and Continuous Innovation the Easy Way - AI Days Mel...
Applied AI, Open Banking and Continuous Innovation the Easy Way - AI Days Mel...Applied AI, Open Banking and Continuous Innovation the Easy Way - AI Days Mel...
Applied AI, Open Banking and Continuous Innovation the Easy Way - AI Days Mel...
 
Art of Serverless Business Value - Serverless Days Sydney 2019
Art of Serverless Business Value - Serverless Days Sydney 2019Art of Serverless Business Value - Serverless Days Sydney 2019
Art of Serverless Business Value - Serverless Days Sydney 2019
 
Anticorrupting the Enterprise - Serverlessconf NYC 2017
Anticorrupting the Enterprise - Serverlessconf NYC 2017Anticorrupting the Enterprise - Serverlessconf NYC 2017
Anticorrupting the Enterprise - Serverlessconf NYC 2017
 
Financial Forecasting using Recurrent Neural Network, Social Media and Cloud
Financial Forecasting using Recurrent Neural Network, Social Media and CloudFinancial Forecasting using Recurrent Neural Network, Social Media and Cloud
Financial Forecasting using Recurrent Neural Network, Social Media and Cloud
 
Amazingly Simple Serverless Go
Amazingly Simple Serverless GoAmazingly Simple Serverless Go
Amazingly Simple Serverless Go
 
Easy Serverless Golang
Easy Serverless GolangEasy Serverless Golang
Easy Serverless Golang
 

Recently uploaded

why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendArshad QA
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 

Recently uploaded (20)

why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and Backend
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 

Dropwizard and Friends

  • 1. Dropwizard and Friends On a Twelve-factor Quest Meetup April 2015Sydney MicroServices
  • 2. About MeAbout Me Comp Science Bachelor UNSW Applied Finance PostGrad at Macquarie Uni ESB driver at Accenture, BGI/BlackRock, Macquarie Group Now Microservicing Trunk Platform yunspace yunzhilin yunspace.com My opinions does not reflect the view of the company Shout out if you have questions, or answers
  • 5.
  • 6. Standalone AppStandalone App public static void main(String[] args) throws Exception { new LazyCatApplication().run(args); } java -jar build/awesome_api.jar server awesome_api.yml No War Files, No App Servers Builds and runs a Fat Jar Start Application in a simple Main() method Because: Application Servers are Dead and you should Stop Wasting Money on Application Servers
  • 7. Who Uses Dropwizard?Who Uses Dropwizard? Sky - Datasift - dropwizard extra, scala, zeromq HubSpot - dropwizard-guice Gilt - airbnb - Riot Games - Bloom Health - Fault Tolerant Microservices Production Ready Web Services with Dropwizard Introducing Airpal How we built a Cloud Platform at Riot Games using NetflixOSS Micro-services with Dropwizard Surely Java without App Server is unstable?
  • 8. Production ReadyProduction Ready Ops Friend Health Checks Metrix More so than most Enterprise Apps
  • 9. Plays Well with OthersPlays Well with Others More Modules at http://modules.dropwizard.io/
  • 10. Easy to do the Right ThingEasy to do the Right Thing Dropwizard makes it easy to do the right thing, allowing you to concentrate on the essential complexity of a problem rather than the plumbing ThoughtWorks Technology Radar We agree
  • 13. Compared to RailsCompared to Rails - Yammer, April 2014Dropping Rails for Dropwizard?
  • 14. Compared Spring BootCompared Spring Boot - Takipi BlogJava BootStrap: Dropwizard vs SprintBoot
  • 15. Compared to RatPackCompared to RatPack public class FooBarFactory implements HandlerFacto @Override public Handler create(LaunchConfig launchConfig) return Guice.builder(launchConfig) .bindings(bindingsSpec -> bindingsSpec.add(n .build(chain -> chain .handler("foo", context -> context.render( .handler("bar", context -> context.render( } } public class FooBarApplication extends Application<FooBarConfig> { public static void main(String[] args) throws Exception { new FooBarApplication().run(args); } @Override public void run(final FooBarApplication configuration, final Environment environment) throws Exc environment.register(FooResource.class); environment.register(BarResrouce.class); } } @Path("/foo") @Consumes(APPLICATION_JSON) @Produces(APPLICATION_JSON) public class FooResource { @GET public String getFoo() { return "from the foo handler"; } } Dropwizard is more opinionated and explicit
  • 16. Right Tool for the Right JobRight Tool for the Right Job Not a silver bullet We also use Rails to leverage neat Gems And AngularJs on HarpJs for Static Sites
  • 17. Build another "Hello World" App?Build another "Hello World" App? DemoDemo
  • 18. Let's build a app using ! Dropwizard Turbo LazyBones
  • 20.
  • 22. GradleGradle Declare and isolate Portable "gradlew" is great for CI & locks gradle version More than just Dependency Management: builds shadow Dependencies (II)
  • 23. ConfigurationConfiguration dataSource: driverClass: ${env.HIBERNATE_DRIVER!'org.h2.Driver'} user: ${env.HIBERNATE_USER!'sa'} password: ${env.HIBERNATE_PASSWORD!'sa'} url: ${env.HIBERNATE_URL!'jdbc:h2:./build/h2db'} java -Ddw.dataSource.driverClass=$DATABASE_DRIVER -Ddw.dataSource.url=$DATABASE_URL -Ddw.dataSource.user=$DATABASE_USER -Ddw.dataSource.password=$DATABASE_PASSWORD -jar build/application.jar server config.yml 2. Use to add ${env} in config.yml:Dropwizard-Template-Config java -jar build/application.jar server config.yml 1. Replace config.yml variables in run command (messy): Attach with no code change Configuration using Environment Variables (III) Backing Services (IV)
  • 24. ModulesModules Dropwizard version 0.8.0: major update. We are active contributors, get in contact if you have any issues Jersey2 github.com/dropwizard/dropwizard-java8 github.com/hubspot/dropwizard-guice Used by lazybones-dropwizard-turbo
  • 26. New RelicNew Relic Gist: Register above listener, add newrelic.jar NewRelicTimedApplicationListener
  • 27. DockerfileDockerfile FROM errordeveloper/oracle-jre ENV HOME /root/ WORKDIR /app/ # newrelic RUN curl -L --silent --retry 3 https://download.newrelic.com/newrelic/java-agent/newrelic-agent/current/newrelic-java.zip -o n RUN unzip newrelic-java.zip && rm newrelic/*.xml newrelic/*.xsd newrelic/*.yml newrelic/newrelic-api*.jar ADD newrelic/newrelic.yml /app/newrelic/newrelic.yml # plamasphere ADD platmasphere-services.yml /app/ ENV PLATMA_VERSION latest ADD build/platmasphere-services.jar /app/platmasphere-services.jar # run EXPOSE 9090 ENTRYPOINT [ "java" ] CMD ["-javaagent:newrelic/newrelic.jar", "-jar", "platmasphere-services.jar", "server", "platmasphe
  • 28. TipsTips Joda DateTime is NOT equivalent to JSR-310 LocalDateTime. Use ZonedDateTime or OffsetDateTime compile "org.jadira.usertype:usertype.extended:3.2.0.GA" Use Governator @LazySingleton if you have issue with Guice eager @Singleton compile("com.netflix.governator:governator:${governatorVersion}") { exclude group: 'com.google.guava', module: 'guava' exclude group: 'commons-lang' } Multiple Database Schema Support: have a look here for Hibernate JSR-310 supportJadira UserType Extended
  • 30. Snap-CISnap-CI Continuous Delivery enables:Continuous Delivery enables: Strictly Separate Reduced Build, Release, Run (V) Dev/prod parity (X)
  • 31. ContractContractPactPact { "description": "request for getting property 80 CLARENCE ST", "provider_state": "property 80 CLARENCE ST exists", "request": { "method": "get", "path": "/properties/1", "headers": { "Tenant": "trunk", "Authorization": "Bearer valid_token" } }, "response": { "status": 200, "headers": { "Access-Control-Allow-Origin": "*", "Access-Control-Allow-Headers": "origin, content-type, accept, authorization, tenant", "Access-Control-Allow-Credentials": "true", "Access-Control-Allow-Methods": "GET, POST, PUT, DELETE, OPTIONS, HEAD", "Access-Control-Max-Age": "43200" }, "body": { "id": 1, "addressLine": "80 CLARENCE ST", "postcode": "2000", "state": "NSW", "suburb": "SYDNEY", "streamId": 1 } } }
  • 32. BinTray and Quay.ioBinTray and Quay.io One Codebase, many deploys (I)
  • 33. Small Base Image = quicker build time Use (busybox based) Only 159 mb errordeveloper/oracle-jre Build Docker ImagesBuild Docker Images
  • 34. Database MigrationDatabase Migration Prior to deploying to a Environment, we run DB Migration as Once off Admin Processes (XII) ./gradlew dbMigrate -Pdb_schema= ./gradlew dbTag -Pdb_schema=
  • 35. Deploy Docker ContainerDeploy Docker Container Isolation of and Containers are and to LogSpout Stateless Processes (VI) Port binding (VII) Disposable(IX) Concurrent(VIII) Stream Logs (XI) Docker Containers takes care of:
  • 36. Running Containers in TutumRunning Containers in Tutum https://docs.tutum.co/v2/api/
  • 37. QuestionsQuestions Like us on GitHub! https://github.com/Trunkplatform/lazybones-dropwizard-turbo Dropwizard Links dropwizard.io https://github.com/dropwizard https://groups.google.com/forum/#!forum/dropwizard-user