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
470
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
410
Code Review (Navy Hackathon)
rantav
0
45
Infrastructure Testing Using Kubernetes And Golang
rantav
0
57
Infrastructure testing using Kubernetes
rantav
0
440
Interview Workshop - Technical Questions
rantav
0
280
Code Review Best Practices
rantav
0
59
Code Review @ AppsFlyer
rantav
0
56
GraphQL at Yodas
rantav
2
170
Git for champs
rantav
0
130
Other Decks in Programming
See All in Programming
Micro Frontends for Java Microservices - Devnexus 2024
mraible
PRO
0
510
AmperとFleetを使ったAndroidアプリ
yoppie
0
240
検証も兼ねて個人開発でHonoとかと向き合った話
hanetsuki
1
1.3k
TCAとKMPを用いた新規動画配信アプリ 「ABEMA Live」の設計
tomu28
2
120
AWS CDKコントリビュートTIPS / aws-cdk-contribution-tips
gotok365
3
300
MetricKitで予期せぬ終了を検知する話 / Detect unexpected termination with MetricKit
nekowen
1
190
Fragment Composition of GraphQL
quramy
12
1.3k
try! Swift Tokyo 2024 参加報告 / try! Swift Tokyo 2024 Report
hironytic
0
210
Code Reviews
bkuhlmann
4
890
Amazon SQSコンシューマー疎結合への旅 - 出張! #DevelopersIO IT技術ブログの中の人が語る勉強会 #3
quiver
0
290
Azure OpenAI Serviceのプロンプトエンジニアリング入門
tomokusaba
3
840
効率化に挑戦してみたらモバイル開発が少し快適になった話
ryunakayama
0
130
Featured
See All Featured
WebSockets: Embracing the real-time Web
robhawkes
59
7k
The Cost Of JavaScript in 2023
addyosmani
18
3.9k
Art, The Web, and Tiny UX
lynnandtonic
290
19k
The Cult of Friendly URLs
andyhume
74
5.7k
How to train your dragon (web standard)
notwaldorf
74
5.2k
Large-scale JavaScript Application Architecture
addyosmani
504
110k
10 Git Anti Patterns You Should be Aware of
lemiorhan
649
58k
Why Our Code Smells
bkeepers
PRO
331
56k
5 minutes of I Can Smell Your CMS
philhawksworth
199
19k
Building a Scalable Design System with Sketch
lauravandoore
457
32k
Fantastic passwords and where to find them - at NoRuKo
philnash
38
2.5k
The Illustrated Children's Guide to Kubernetes
chrisshort
32
46k
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