Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Rethinking HTTP Apps using Ratpack

358 views

Published on

It is the time rethink the way we build HTTP applications. Instead of the thread per request model, let us explore how to leverage non-blocking and asynchronous model using Ratpack.

Published in: Technology
  • Be the first to comment

Rethinking HTTP Apps using Ratpack

  1. 1. Rethinking HTTP apps using Ratpack Naresha K @naresha_k naresha.k@gmail.com
  2. 2. Thread per Request
  3. 3. Non-blocking
  4. 4. Asynchronous
  5. 5. Non-blocking Asynchronous
  6. 6. Non-blocking Asynchronous Non-blocking Asynchronous
  7. 7. Guice Reactive Streams
  8. 8. Ratpack Goals
  9. 9. Fast, scalable, & efficient
  10. 10. Allow applications to evolve in complexity without compromise
  11. 11. leverage the benefits of non-blocking programming and reduce the costs
  12. 12. flexible and unopinionated in integrating other tools and libraries
  13. 13. Testability
  14. 14. Not a full-stack solution
  15. 15. Architecture
  16. 16. Non Blocking
  17. 17. Non Blocking Event Loop I/O Thread Pool Execution Queue I/O op I/O complete
  18. 18. Creating a Ratpack (Java) App
  19. 19. Creating a Ratpack App using Groovy Script
  20. 20. Creating a Ratpack App (Groovy)
  21. 21. Working with handlers
  22. 22. Performing Blocking operation
  23. 23. Ratpack execution model
  24. 24. Lazy Evaluation
  25. 25. [ratpack-compute-125-2] ERROR ratpack - Body type: ratpack.exec.internal.DefaultPromise curl -X POST -H "Content-Type: Application/json" -d '{"title": "Asynch Web"}' localhost:5050/proposal
  26. 26. curl -X POST -H "Content-Type: Application/json" -d '{"title": "Asynch Web"}' localhost:5050/proposal Asynch Web%
  27. 27. Composing
  28. 28. Resources • Project Home - https://ratpack.io/ • User guide - https://ratpack.io/manual/current/ • Discussion forum - https://forum.ratpack.io/ • Example code - https://github.com/ratpack/example- books • Code samples from an old talk - https://github.com/ naresha/functionalconf2015 • Live coding demo - https://www.youtube.com/watch? v=y9e_O2GFkdA • http://sdkman.io/ SDK Manager (to manage multiple versions of SDKs)
  29. 29. @naresha_k naresha.k@gmail.com https://www.slideshare.net/nareshak
  30. 30. Thank you

×