Rethinking HTTP Apps on JVM with Ratpack
HTTP application programming model on JVM traditionally has been based on the thread per request model. However increasing scale and complexity of applications are forcing the developers to think in new directions. Ratpack is one of such efforts. Ratpack is a collection of libraries glued with Java 8 and makes use of Netty, Guava and Reactive Streams. Ratpack also provides a Groovy DSL, helping developers to use declarative style.
In this demo, I will explore the asynchronous programming model leveraged by Ratpack. Composition, immutability, laziness are the core techniques used in building an application, which in fact are the ideas from functional programming. Though Ratpack has a variety of features, my focus for this presentation is asynchronous, reactive and functional aspects of Ratpack.
Outline/Structure of the Demonstration
- Just enough background of Ratpack (Why this model?) - 5 min
- Develop a real world REST service using Ratpack covering the following aspects - 35 min
- Using Ratpack Groovy DSL
- Ratpack asynchronous execution model
- Composition, laziness and immutability at work
- Working with Reactive streams
- QA - 5 min
- A food for thought - Why Java developers need to consider another programming model for HTTP applications
- How functional programming ideas lead to better applications
- How one can use light-weight framework Ratpack for developing a web application/ micro service
Developers, Architects, Technologists