Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Dropwizard
Search
Ran Tavory
October 15, 2014
Programming
3
500
Dropwizard
A gentle introduction to Dropwizard - a java microservices framework
Ran Tavory
October 15, 2014
Tweet
Share
More Decks by Ran Tavory
See All by Ran Tavory
go-grpc-channelz: a Go based UI for gRPC's channelz
rantav
0
460
Code Review (Navy Hackathon)
rantav
0
49
Infrastructure Testing Using Kubernetes And Golang
rantav
0
57
Infrastructure testing using Kubernetes
rantav
0
470
Interview Workshop - Technical Questions
rantav
0
300
Code Review Best Practices
rantav
0
61
Code Review @ AppsFlyer
rantav
0
60
GraphQL at Yodas
rantav
2
170
Git for champs
rantav
0
140
Other Decks in Programming
See All in Programming
KSPの導入・移行を前向きに検討しよう!
shxun6934
PRO
0
290
Hermes: Better Performance with Bytecode Translation (React Universe 2024)
tmikov2023
0
100
Securify_エンジニア採用資料
3shake
0
110
今インフラ技術をイチから学び直すなら
yuhta28
1
140
開発を加速する共有Swift Package実践
elmetal
PRO
0
420
Some more adventure of Happy Eyeballs
coe401_
2
190
What is Parser
yui_knk
9
4.2k
Modernisation Progressive d’Applications PHP
hhamon
0
110
Our Websites Need a Lifestyle Change, Not a Diet
ryantownsend
0
150
Patched fetch did not work
quramy
4
410
API Platform for Laravel
dunglas
1
610
RAGの回答精度評価用のQAデータセットを生成AIに作らせた話
kurahara
0
260
Featured
See All Featured
Testing 201, or: Great Expectations
jmmastey
36
7k
Optimizing for Happiness
mojombo
375
69k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
5
490
GraphQLとの向き合い方2022年版
quramy
43
13k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
248
20k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
26
2k
ParisWeb 2013: Learning to Love: Crash Course in Emotional UX Design
dotmariusz
109
6.9k
Building Adaptive Systems
keathley
36
2.1k
Intergalactic Javascript Robots from Outer Space
tanoku
268
26k
10 Git Anti Patterns You Should be Aware of
lemiorhan
653
58k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
278
13k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.2k
Transcript
A GENTLE INTRODUCTION TO DROPWIZARD Ran Tavory @rantav Gormim Totango
ABOUT ME • Developer developer developer • Gormim • We
help developers find awesome jobs. • You should register! www.gormim.com • Totango • Previously: outbrain, google, youtube, microsoft
MY EXPERIENCE WITH DROPWIZARD • So far implemented 3 microsevices
with DW • At Totango
WHAT IS DROPWIZARD? • A collection of libraries • And
some glue code • Goal: • Make it easy to write (micro)services, in Java
MICROSERVICES, YEAH • Goal: easy to create new services •
Goal: simple to use • Goal: easy to deploy • Goal: easy to monitor, manage • devops friendly
DROPWIZARD IS OPINIONATED* • Jetty for HTTP • Jersey for
REST (JAX-RS) • Jackson for JSON • Metrics for metrics • SLF4J, Logback for logging
… IS OPINIONATED* • Guava b/c it’s useful • Hibernate
Validator (JSR-303) for data validation • Apache HTTP Client for low level HTTP • Jersey HTTP client for high level HTTP • jDBI for relational databases • Liquibase for DB schema maintenance
… IS OPINIONATED* • Freemarker and Mustach for templating •
Joda Time
*SOME MODULARITY IN PLACE • Maven artifacts: • dropwizard-core! •
dropwizard-client (http client) • dropwizard-jdbi! • dropwizard-migrations (liquibase) • dropwizard-hibernate! • dropwizard-auth (HTTP basic and oauth2) • dropwizard-views- mustache and dropwizard-views- freemarker! • dropwizard-scala! • dropwizard-testing
GETTING STARTED • Maven • Application class • Configuration class
• Representation class (optional) • Resource class (optional) • Healthcheck
MAVEN
APPLICATION CLASS
CONFIGURATION CLASS Reads from yml file
CONFIGURATION FILE Example yml file
REPRESENTATION CLASS
RESOURCE CLASS
REGISTER THE RESOURCE
HEALTHCHECK
HEALTHCHECK
RUNNING
RUNNING
ADD COOL BANNERS
OPS FRIENDLY • Now you can access the following URLs:
• /ping • /healthcheck • /metrics • /threads
EXTRA • Nice test support. • Validation • Servlets, Filters
• Custom Representations • HTML Views
EXTRA • Streaming output • Caching • Error Handling •
SSL • Logging
EXTRA • Metrics and Metrics Reporters • Commands (CLI) •
Tasks (admin HTTP interface) • Managed Objects
SUMMARY • Pros: • Easy, simple • Performant • ops
friendly • Opinionated • No web container • Community! • Cons: • Opinionated • Eran will say more ;-)
REFS • https://dropwizard.github.io/dropwizard/ • http://martinfowler.com/articles/microservices.html