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
520
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
500
Code Review (Navy Hackathon)
rantav
0
49
Infrastructure Testing Using Kubernetes And Golang
rantav
0
61
Infrastructure testing using Kubernetes
rantav
0
500
Interview Workshop - Technical Questions
rantav
0
310
Code Review Best Practices
rantav
0
63
Code Review @ AppsFlyer
rantav
0
61
GraphQL at Yodas
rantav
2
170
Git for champs
rantav
0
140
Other Decks in Programming
See All in Programming
DevinとCursorから学ぶAIエージェントメモリーの設計とMoatの考え方
itarutomy
0
130
2025.01.17_Sansan × DMM.swift
riofujimon
2
540
Итераторы в Go 1.23: зачем они нужны, как использовать, и насколько они быстрые?
lamodatech
0
1.4k
快速入門可觀測性
blueswen
0
500
DevFest - Serverless 101 with Google Cloud Functions
tunmise
0
140
Azure AI Foundryのご紹介
qt_luigi
1
180
PicoRubyと暮らす、シェアハウスハック
ryosk7
0
210
Lookerは可視化だけじゃない。UIコンポーネントもあるんだ!
ymd65536
1
130
chibiccをCILに移植した結果 (NGK2025S版)
kekyo
PRO
0
130
PSR-15 はあなたのための ものではない? - phpcon2024
myamagishi
0
400
Rubyでつくるパケットキャプチャツール
ydah
0
170
盆栽転じて家具となる / Bonsai and Furnitures
aereal
0
1.8k
Featured
See All Featured
Measuring & Analyzing Core Web Vitals
bluesmoon
5
210
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
860
Automating Front-end Workflow
addyosmani
1366
200k
Raft: Consensus for Rubyists
vanstee
137
6.7k
Fashionably flexible responsive web design (full day workshop)
malarkey
406
66k
How to Ace a Technical Interview
jacobian
276
23k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
173
51k
Code Review Best Practice
trishagee
65
17k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
44
9.4k
Gamification - CAS2011
davidbonilla
80
5.1k
Being A Developer After 40
akosma
89
590k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
6
500
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