+ All Categories
Home > Technology > Dropwizard

Dropwizard

Date post: 20-Jun-2015
Category:
Upload: andrew-panfilov
View: 397 times
Download: 3 times
Share this document with a friend
Popular Tags:
25
dropwizard framework for developing ops-friendly, high- performance, RESTful web services
Transcript
Page 1: Dropwizard

dropwizardframework for developing ops-friendly, high-

performance, RESTful web services

Page 2: Dropwizard

обо мне

● Андрей Панфилов● Java Developer

Page 3: Dropwizard

история вопроса

● распространенное мнение: java == кровавый энтерпрайз

● некоторым хочется легкости (не в ущерб преимуществ java)

● dropwizard -- легковесный фреймворк для веб (It's an answer to the complexity of Java Web and Application Containers, which tend to be overkill for 90% of your use-cases.)

Page 4: Dropwizard

об авторе

● Coda Hale (codahale.com)● «I’m a software engineer in Berkeley,

CA.»● Principal Software Developer

(Microsoft), Infrastructure Architect (Yammer)

Page 5: Dropwizard

определение

● Dropwizard is a Java framework for developing ops-friendly, high-performance, RESTful web services.

● Основная идея: pulls together stable, mature libraries from the Java ecosystem into a simple, light-weight package.

● Название: что такое dropwizard?

Page 6: Dropwizard

комикс

Page 7: Dropwizard

компоненты dropwizard'а

● Jetty for HTTP● Jersey for REST● Jackson for JSON● Metrics for metrics● Guava (highly optimized immutable data structures,

speed up development)● Logback and slf4j for performant logging● Hibernate Validator (JSR-303)● Apache HttpClient and Jersey client (interaction with

other web services)● JDBI or Hibernate● Liquibase● Freemarker or Mustache (simple template system)● Joda Time (handling dates and times)

Page 8: Dropwizard

Jetty

● Incredibly tuned embedded HTTP server.● Running your service as a simple process.● No PermGen issues● No application server configuration and

maintenance● No arcane deployment tools● No ClassLoader troubles● No hidden application logs● No trying to tune a single garbage collector

to work with multiple application workloads

Page 9: Dropwizard

Jersey

● JAX-RS (JSR 311: Java API for RESTful Web Services)

● full-featured RESTful web framework● nothing beats in terms of features and

performance● allows to write clean, testable classes which

gracefully map HTTP requests to simple Java objects

● supports streaming output, matrix URI parameters, conditional GET requests

● and much, much more

Page 10: Dropwizard

Jackson

● lightning fast● has a sophisticated object mapper● allows to export domain models directly

Page 11: Dropwizard

Metrics

● powerful toolkit of ways to measure the behavior of critical components in your production environment

● with modules for common libraries like Jetty, Logback, Log4j, Apache HttpClient, Ehcache, JDBI, Jersey and reporting backends like Ganglia and Graphite, Metrics provides you with full-stack visibility.

Page 12: Dropwizard

hello world

Page 13: Dropwizard

hello world

Page 14: Dropwizard

hello world

Page 15: Dropwizard

hello world

Page 16: Dropwizard

hello world

Page 17: Dropwizard

hello world

Page 18: Dropwizard

hello world

Page 19: Dropwizard

сборка

● Apache Maven● Fat JAR

Page 20: Dropwizard

запуск приложения

java -jar target/hello-world-0.0.1-SNAPSHOT.jar server hello-world.yml

Page 21: Dropwizard

лицензия

● Apache License v2.0

Page 22: Dropwizard

интересности

● Отсутствие IoC● Optional:Optional<Integer> possible = Optional.of(5);possible.isPresent(); // returns truepossible.get(); // returns 5● Immutability

Page 23: Dropwizard

SWOT

● Strengths○ Provisioning○ Deployment○ Monitoring and Logging○ Alerting○ Tend to Service Oriented Architecture○ Loose Coupling

● Weaknesses● Opportunities● Threats

○ Support

Page 24: Dropwizard

ссылки

● dropwizard.codahale.com● github.com/codahale/dropwizard

Page 25: Dropwizard

конец

Вопросы?


Recommended