Ratpack 1.0: Easier asynchronous programming for the JVM
It took a while, but it’s finally launched – the JVM toolkit Ratpack, which aims to facilitate asynchronous programming on the JVM, has reached a milestone with version 1.0 and is stable and ready for production use. Little has changed since the first RC.
Ratpack 1.0 is here and with it, the culmination of what has been a two and a half year journey for the voluntary team. Noted as a symbolic and practical milestone, the team behind Ratpack can finally hoist the flag of API stability.
The new features and changes available in the release are the same that shipped with the first release candidate in late August of this year. Changes from version 0.9.19 can be summed up as including the following:
- The development time reloading strategy has changed from using runtime class patching to Gradle’s Continuous Build feature. This is intended to simplify the IDE integration for Ratpack apps significantly.
- The request body can now only be read once during a request. Its byte buffer can now also be eagerly released to free the memory if desired, which is our first taste of the team’s preparation for version 1.1.
ratpack-jackson-guicelibrary has been removed. This functionality is now part of
ratpack-core, meaning renderers and parsers working with Jackson are now automatically ready.
- The parser API has been simplified, so for parse operations with no options, the parse object is no longer a NullParseOpts marker but rather returns no options. A parser can now potentially parse multiple content types, instead of being limited to only one.
Development is noted as far from finished by the team, but a certain stage of maturity has been reached with the recognition that there’s more work to come:
1.0.x releases will occur as frequently as needed in response to bug fixes and internal improvements. After the release of 1.0.0, improving the documentation will be a key focus.
What is Ratpack?
The Ratpack microframework is lightweight, high-performance and asynchronous, with the core written in Java (requiring Java 8). The build system uses Gradle 2.6. Ratpack builds on the basis of the non-blocking, asynchronous and event-driven client-server framework Netty and offers a range of low-level constructs to work with asynchronous APIs.
Particular attention in the development of Ratpack was paid to its utilisation of Microservices. Furthermore, Ratpack offers support for the code library Hystrix, made by Netflix, which serves the optimisation needs of distributed applications based on Amazon Web Services.
Integration with Dropwizard Metrics is used for reporting while the Pac4j extension is at the helm for authentication. The configuration model supports YAML, JSON, Java properties and assorted environment variables. HTML templating is contributed by Groovy and also uses some advanced features of the Groovy compiler.