Published on

1 Like
  • Be the first to comment

No Downloads
Total Views
On Slideshare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide


  1. 1. dropwizardframework for developing ops-friendly, high-performance, RESTful web services
  2. 2. обо мне● Андрей Панфилов● Java Developer● Проект: Velti
  3. 3. история вопроса● распространенное мнение: java ==кровавый энтерпрайз● некоторым хочется легкости (не вущерб преимуществ java)● dropwizard -- легковесныйфреймворк для веб (Its an answer to thecomplexity of Java Web and Application Containers,which tend to be overkill for 90% of your use-cases.)
  4. 4. об авторе● Coda Hale (codahale.com)● «I’m a software engineer in Berkeley,CA.»● Principal Software Developer(Microsoft), Infrastructure Architect(Yammer)
  5. 5. определение● Dropwizard is a Java framework fordeveloping ops-friendly, high-performance, RESTful web services.● Основная идея: pulls together stable,mature libraries from the Javaecosystem into a simple, light-weightpackage.● Название: что такое dropwizard?
  6. 6. комикс
  7. 7. компоненты 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 withother web services)● JDBI or Hibernate● Liquibase● Freemarker or Mustache (simple template system)● Joda Time (handling dates and times)
  8. 8. Jetty● Incredibly tuned embedded HTTP server.● Running your service as a simple process.● No PermGen issues● No application server configuration andmaintenance● No arcane deployment tools● No ClassLoader troubles● No hidden application logs● No trying to tune a single garbage collectorto work with multiple application workloads
  9. 9. Jersey● JAX-RS (JSR 311: Java API for RESTfulWeb Services)● full-featured RESTful web framework● nothing beats in terms of features andperformance● allows to write clean, testable classes whichgracefully map HTTP requests to simpleJava objects● supports streaming output, matrix URIparameters, conditional GET requests● and much, much more
  10. 10. Jackson● lightning fast● has a sophisticated object mapper● allows to export domain models directly
  11. 11. Metrics● powerful toolkit of ways to measure thebehavior of critical components in yourproduction environment● with modules for common libraries like Jetty,Logback, Log4j, Apache HttpClient,Ehcache, JDBI, Jersey and reportingbackends like Ganglia and Graphite,Metrics provides you with full-stack visibility.
  12. 12. helloworld
  13. 13. helloworld
  14. 14. helloworld
  15. 15. helloworld
  16. 16. helloworld
  17. 17. helloworld
  18. 18. helloworld
  19. 19. сборка● Apache Maven● Fat JAR
  20. 20. запуск приложенияjava -jar target/hello-world-0.0.1-SNAPSHOT.jar server hello-world.yml
  21. 21. лицензия● Apache License v2.0
  22. 22. интересности● Отсутствие IoC● Optional:Optional<Integer> possible = Optional.of(5);possible.isPresent(); // returns truepossible.get(); // returns 5● Immutability
  23. 23. SWOT● Strengths○ Provisioning○ Deployment○ Monitoring and Logging○ Alerting○ Tend to Service Oriented Architecture○ Loose Coupling● Weaknesses● Opportunities● Threats○ Support
  24. 24. ссылки● dropwizard.codahale.com● github.com/codahale/dropwizard
  25. 25. конецВопросы?
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.