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
540
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
590
Code Review (Navy Hackathon)
rantav
0
77
Infrastructure Testing Using Kubernetes And Golang
rantav
0
83
Infrastructure testing using Kubernetes
rantav
0
540
Interview Workshop - Technical Questions
rantav
0
330
Code Review Best Practices
rantav
0
85
Code Review @ AppsFlyer
rantav
0
86
GraphQL at Yodas
rantav
2
170
Git for champs
rantav
0
140
Other Decks in Programming
See All in Programming
11年かかって やっとVibe Codingに 時代が追いつきましたね
yimajo
1
260
パスタの技術
yusukebe
1
360
WebAssemblyインタプリタを書く ~Component Modelを添えて~
ruccho
1
780
あなたとJIT, 今すぐアセンブ ル
sisshiki1969
1
620
Strands Agents で実現する名刺解析アーキテクチャ
omiya0555
1
120
バイブスあるコーディングで ~PHP~ 便利ツールをつくるプラクティス
uzulla
1
330
バイブコーディングの正体——AIエージェントはソフトウェア開発を変えるか?
stakaya
5
880
ZeroETLで始めるDynamoDBとS3の連携
afooooil
0
160
ワープロって実は計算機で
pepepper
2
1.3k
Android 15以上でPDFのテキスト検索を爆速開発!
tonionagauzzi
0
200
No Install CMS戦略 〜 5年先を見据えたフロントエンド開発を考える / no_install_cms
rdlabo
0
480
新しいモバイルアプリ勉強会(仮)について
uetyo
1
250
Featured
See All Featured
Understanding Cognitive Biases in Performance Measurement
bluesmoon
29
1.8k
Balancing Empowerment & Direction
lara
1
550
Large-scale JavaScript Application Architecture
addyosmani
512
110k
[RailsConf 2023] Rails as a piece of cake
palkan
56
5.8k
Automating Front-end Workflow
addyosmani
1370
200k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.5k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
29
9.6k
Code Reviewing Like a Champion
maltzj
524
40k
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
Designing for Performance
lara
610
69k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
53
2.9k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
7
800
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