@beckje01's talk at GR8Conf EU. An overview of Ratpack:
- Ratpack Key points
- Tips about how to structure Ratpack apps ( example: all routing should not live in ratpack.groovy)
- A brief discussion about Testing and specially Functional Testing; thanks to Ratpack fast startup time.
- How to distribute the apps ( he recommends FAT jars)
Open the Notes and Code while you watch @Lspacewalker's talk at GR8Conf EU 2016.
Write a TODO app backed by a REST API powered by Ratpack. While you build the application, you discover an example of Handlers composition with CORS HTTP-headers, how to use jOOQ to query the datasource, how to wrap blocking code in Promises, how to use Ratpack mechanisms for composing chains to keep your handler code easy to understand and mantain, and how to deploy your app to Heroku.
@mrkahi shows an example of how Ratpack uses the
@Delegate to improve DSL Code Completion In IntelliJ IDEA.
The @DelegatesTo annotation defines that the delegate of the closure code is the GroovyChain class. IntelliJ IDEA now knows that GroovyChain is used and gives us via the code completion the methods and properties of GroovyChain.
Security is a major piece of functionality of almost any app. @beckje01's talk at Greach 2015 helps you understand the security choices at your disposal for a Ratpack app.
- Force SSL and an example of using SSL with Ratpack and AWS.
- Ratpack Sessions and example of how to use the Session Module.
- How to use Pac4j with Ratpack.
Pac4j is a set of components to secure your Java applications ( authentication + authorization).
During the talk, he showcases several examples ( BasicAuth, Twitter Auth, ...)
Check the Slides.
@ldaley, Ratpack's project lead, explains Ratpack’s execution model.
Machines fundamentally perform tasks asynchronously. Synchronous programming is just an abstraction; a very prevalent and useful one. It allows programmers to reason about an operation as being continuous and deterministic. You give this up with the asynchronous/non-blocking paradigm, and therein the problem begins. What you gain in terms of “performance” you pay for in convenience. At its worst, multithreaded asynchronous programming is completely non deterministic and disjointed. Ratpack tries to bridge the performance/convenience gap via its execution model.
A continuation post to the previously linked blog post where @ldaley explains how you would use Ratpack's execution model in a real application. An important take-away:
As little work as possible should be inside a blocking() call (i.e. on a thread from
the blocking pool). All computation should be done on the event loop.
@Lspacewalker's talk at GR8Conf EU 2017.
Ratpack is async and non-blocking
It provides its own concurrency model (execution model) for managing and handling web requests
@Lspacewalker always provides great material to support his talks: Notes + Code.
Discover Ratpack Async Primitives (e.g. Promises ) and how to test your async code with
In an advanced section, he talks about: Operations, Handling errors, Throttling Promises, Forking execution ...