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
490
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
450
Code Review (Navy Hackathon)
rantav
0
47
Infrastructure Testing Using Kubernetes And Golang
rantav
0
57
Infrastructure testing using Kubernetes
rantav
0
460
Interview Workshop - Technical Questions
rantav
0
300
Code Review Best Practices
rantav
0
60
Code Review @ AppsFlyer
rantav
0
57
GraphQL at Yodas
rantav
2
170
Git for champs
rantav
0
140
Other Decks in Programming
See All in Programming
Webエディタライブラリ 「CodeMirror」から学ぶ Webアプリ開発のテクニック
ryosukeigarashi
0
250
Ruby メモリ管理 プログラミング
megmogmog1965
0
130
今こそ始める、CDKコンストラクトライブラリ開発 ― 入門から実践まで
tmokmss
1
930
SDCon2024: Enabling DevOps and Team Topologies thru architecture: architecting for fast flow
cer
PRO
0
780
社内 LT 会を発足し、アウトプット文化を醸成させるために考えたこと・やったこと / Starting internal LT meetings and fostering an output culture
mackey0225
3
120
Cloudflare Workers x AWS Lambdaの組み合わせユースケース / Cloudflare Workers x AWS Lambda Combination Use Case
seike460
PRO
2
310
CSC307 Lecture 07
javiergs
PRO
0
220
Introduction to GitOps
hwchiu
0
110
Google's Recipe for Scaling (Web) Security – LocoMocoSec 2024
lweichselbaum
0
170
CSC307 Lecture 09
javiergs
PRO
1
500
実用的かつリーズナブルな 「Azure × Gemini × LINE」~キャラクターBot 実装ライブデモ~
tomodo_ysys
1
170
わかりやすい正解を捨てて、コトに向き合う - スクラムフェス金沢2024 スポンサーセッション
yusukekokubo
0
170
Featured
See All Featured
Being A Developer After 40
akosma
72
580k
From Idea to $5000 a Month in 5 Months
shpigford
377
46k
Raft: Consensus for Rubyists
vanstee
134
6.5k
Thoughts on Productivity
jonyablonski
64
4.1k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
16
1.6k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
23
1.9k
Building a Modern Day E-commerce SEO Strategy
aleyda
25
6.7k
Done Done
chrislema
179
15k
Designing for humans not robots
tammielis
247
25k
How to name files
jennybc
67
96k
Typedesign – Prime Four
hannesfritz
37
2.2k
Art, The Web, and Tiny UX
lynnandtonic
291
20k
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