Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Practical quickstart to non-blocking IO with Ratpack

Practical quickstart to non-blocking IO with Ratpack

In this session, I would like to introduce you to asynchronous and non-blocking HTTP requests processing with Ratpack. It won't be an introductory tutorial or shallow walk through all possible features and nuances Ratpack framework provides. Instead, I'm going to build from scratch a REST application, compare blocking vs. non-blocking processing and show you where possible issues are hiding. A few slides. A lot of live coding.

Presentation given at GR8Conf EU 2019, Copenhagen, Denmark

Szymon Stępniak

May 27, 2019
Tweet

More Decks by Szymon Stępniak

Other Decks in Technology

Transcript

  1. Practical quickstart to Practical quickstart to non-blocking non-blocking I/O with

    I/O with Ratpack Ratpack Live coding session @wololock 
  2. 3 things you will 3 things you will learn learn

    today today how to bootstrap simple Ratpack application 
  3. 3 things you will 3 things you will learn learn

    today today how to bootstrap simple Ratpack application what kind of traps hide behind the non-blocking approach  
  4. 3 things you will 3 things you will learn learn

    today today how to bootstrap simple Ratpack application what kind of traps hide behind the non-blocking approach when to consider non-blocking approach over the blocking one   
  5. Hello, my name is Szymon Stepniak I blog @ Continuous

    Delivery Architect @ Torun Java User Group founder @wololock e.printstacktrace.blog  whoami whoami
  6. Summary Summary ratpack-compute even loops should never block All blocking

    operation should be forwarded to ratpack-blocking  
  7. Summary Summary ratpack-compute even loops should never block All blocking

    operation should be forwarded to ratpack-blocking Use Promise<T> to express your async/non-blocking expectations   
  8. Summary Summary ratpack-compute even loops should never block All blocking

    operation should be forwarded to ratpack-blocking Use Promise<T> to express your async/non-blocking expectations Use libraries like Resilience4j to make your app fault tolerant    
  9. Interested in non-blocking Interested in non-blocking Micronaut Micronaut? ? Check

    out my blog post about non-blocking Micronaut or Google micronaut async https://e.printstacktrace.blog/tags/async/
  10. That’s all, folks! Do you have any questions? Handout ,

    slides, and all materials are available: https:/ /github.com/wololock/ratpack-gr8conf-demo Thank you! Thank you!