Released on 2016-08-08.
Ratpack 1.4 is a very exciting release. There's lots of good stuff.
The following dependencies have been upgraded:
- Jackson 2.6.2 → 2.7.5 (ratpack-core)
- Netty 4.1.0.CR6 → 4.1.4.Final (ratpack-core)
- Guava 18.0 → 19.0 (ratpack-core)
- Caffeine 2.2.6 → 2.3.1 (ratpack-core)
- Slf4j 1.7.12 → 1.7.21 (ratpack-core)
- Guice 4.0 → 4.1.0 (ratpack-guice)
- Pac4j 1.8.5 → 1.8.8 (ratpack-pac4j)
The following are new
ParallelBatch classes make it convenient to process batches of promises in different ways.
PathBinding.getDescription() method provides a description of how the different path binding handlers bound to the request path so far. This provides strings like
":foo/:bar?/baz". This is the same “language” that is used when specifying path binding handlers with methods such as
Chain.path() etc. This effectively provides a representation of the kind of the request, by using token names instead of values.
It is now possible to use plain objects as configuration sources, via the new
ConfigDataBuilder.object() method. It is also now possible to bind objects of a parameterized type to config, via the new
ServerConfigBuilder.require() method variant.
Retrofit 2 integration is available with this release. It provides declarative type-safe HTTP clients, built on top of Ratpack's HTTP capabilities.
The RxRatpack.fork() and RxRatpack.forkEach() methods were added to allow more convenient parallel processing of RxJava observables. This was contributed by Ted Naleid.
Last but not least, Ratpack's HTTP client now supports connection pooling. This dramatically increases throughput when many requests are made to the same server. To enable connection pooling, create a
HttpClient.of() and specify a
poolSize. This feature was contributed by Dan Maas, Derek Olk and Patrick Schilling.
This release also contains many documentation improvements and bugfixes that came by way of contribution. Thanks to everyone who submitted such enhancements.
If you missed it, “Learning Ratpack” has been published since the release of the 1.3.x line. This is the best and most complete resource available for Ratpack today. Just ask Craig Burke.
We hope you enjoy Ratpack 1.4.
Pull Requests (22)
-  - Add support for null returning guice providers (rhart)
-  - Jackson upgrade to 2.7.3 (niwinz)
-  - Route Errors during DefaultPromise.then to the execution error handler (mkavanagh)
-  - Retrofit Integration. (johnrengelman)
-  - Support for (parallel) batch processing (#840). (ldaley)
-  - Support for describing the path binding specification (#914). (ldaley)
-  - Fixes #986 - provides ability to incorporate configuration from existing objects (danveloper)
-  - Closes #957 - add back RatpackPac4j.webContext(Context) (johnrengelman)
-  - Teach GroovyEmbeddedApp about ratpack.groovy syntax. Closes #925. (johnrengelman)
-  - Adding pooled http client (drmaas)
-  - Request more from upstream when fanout receives an empty iterable (rhart)
-  - Default public address scheme when not supplied (rhart)
-  - Add convenience method to `Operation` for performing Blocking calls (danhyun)
-  - Upgrade Netty to 4.1.1.Final (danhyun)
-  - Exposing max initial line length and max header size. (rbolkey)
-  - Re-enable failOnVersionConflict(). (davidmc24)
-  - #1012 RxRatpack#fork for parallel observables (tednaleid)
-  - Fix for #1016 (erdi)
-  - Allow for 3rd party reporter extension (fromanator)
-  - Allow all requests to have a body. (beckje01)
-  - #998 added shortcut for getting header values (kyleboon)
-  - Fix contributor name (tomdcc)
Resolved Issues (24)
-  - Support directly streaming responses from requests made by http client to response (i.e. proxying)
-  - Implement Connection Pooling/KeepAlive in the DefaultHttpClient
-  - Support consuming SSE streams via the HTTP client
-  - Provide a way to convert a collection of promises to a list of their fulfilled results
-  - Provide methods/constructs for concurrent data processing based on promises
-  - Live reloading problem with ratpack 1.1.1
-  - Advertise a logical location in the request handling control flow via path binding description
-  - GroovyEmbeddedApp should implement ratpack.groovy.Groovy.Ratpack
-  - RatpackPac4j.webcontext was removed in ratpack 1.2
-  - Support Guice Providers that return null
-  - Errors raised in DefaultPromise.then are routed to the promise error handler
-  - Add Chain.when(boolean, Action) variant for conditionally adding handlers at chain build time
-  - serving static files
-  - Add sugar for using objects as config sources
-  - Getting NPE with ratpack.publicAddress in 1.3.3
-  - Allow config bindings to be parameterised types
-  - Memory leak from HystrixThreadPoolMetricBroadcaster/ConcurrentLinkedDeque
-  - Provide Context.header(String) as shortcut for context.getRequest().getHeader()
-  - Add convenience methods to `Operation`
-  - Make initial line and header size configurable
-  - Add Promise.cacheIf(Predicate) that only caches values if they meet a certain condition
-  - Context.lastModified() does not issue 304 if last-modified is before if-modified-since
-  - Add `Promise#fork()` and `RxRatpack#fork()` to enable explicit, composable, parallelism
-  - Direct Memory leak in RatPack 1.3.3