Version 1.4.0
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 Promise
methods:
The new SerialBatch
and ParallelBatch
classes make it convenient to process batches of promises in different ways.
The new 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.prefix()
and 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
via 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.
--
Team Ratpack
Links
Pull Requests (22)
- [966] - Add support for null returning guice providers (rhart)
- [972] - Jackson upgrade to 2.7.3 (niwinz)
- [974] - Route Errors during DefaultPromise.then to the execution error handler (mkavanagh)
- [976] - Retrofit Integration. (johnrengelman)
- [977] - Support for (parallel) batch processing (#840). (ldaley)
- [984] - Support for describing the path binding specification (#914). (ldaley)
- [987] - Fixes #986 - provides ability to incorporate configuration from existing objects (danveloper)
- [988] - Closes #957 - add back RatpackPac4j.webContext(Context) (johnrengelman)
- [992] - Teach GroovyEmbeddedApp about ratpack.groovy syntax. Closes #925. (johnrengelman)
- [994] - Adding pooled http client (drmaas)
- [996] - Request more from upstream when fanout receives an empty iterable (rhart)
- [997] - Default public address scheme when not supplied (rhart)
- [1001] - Add convenience method to `Operation` for performing Blocking calls (danhyun)
- [1003] - Upgrade Netty to 4.1.1.Final (danhyun)
- [1009] - Exposing max initial line length and max header size. (rbolkey)
- [1011] - Re-enable failOnVersionConflict(). (davidmc24)
- [1014] - #1012 RxRatpack#fork for parallel observables (tednaleid)
- [1017] - Fix for #1016 (erdi)
- [1018] - Allow for 3rd party reporter extension (fromanator)
- [1019] - Allow all requests to have a body. (beckje01)
- [1022] - #998 added shortcut for getting header values (kyleboon)
- [1024] - Fix contributor name (tomdcc)
Resolved Issues (24)
- [414] - Support directly streaming responses from requests made by http client to response (i.e. proxying)
- [465] - Implement Connection Pooling/KeepAlive in the DefaultHttpClient
- [518] - Support consuming SSE streams via the HTTP client
- [829] - Provide a way to convert a collection of promises to a list of their fulfilled results
- [840] - Provide methods/constructs for concurrent data processing based on promises
- [871] - Live reloading problem with ratpack 1.1.1
- [914] - Advertise a logical location in the request handling control flow via path binding description
- [925] - GroovyEmbeddedApp should implement ratpack.groovy.Groovy.Ratpack
- [957] - RatpackPac4j.webcontext was removed in ratpack 1.2
- [965] - Support Guice Providers that return null
- [973] - Errors raised in DefaultPromise.then are routed to the promise error handler
- [978] - Add Chain.when(boolean, Action) variant for conditionally adding handlers at chain build time
- [981] - serving static files
- [986] - Add sugar for using objects as config sources
- [989] - Getting NPE with ratpack.publicAddress in 1.3.3
- [991] - Allow config bindings to be parameterised types
- [993] - Memory leak from HystrixThreadPoolMetricBroadcaster/ConcurrentLinkedDeque
- [998] - Provide Context.header(String) as shortcut for context.getRequest().getHeader()
- [1000] - Add convenience methods to `Operation`
- [1004] - Make initial line and header size configurable
- [1005] - Add Promise.cacheIf(Predicate) that only caches values if they meet a certain condition
- [1010] - Context.lastModified() does not issue 304 if last-modified is before if-modified-since
- [1012] - Add `Promise#fork()` and `RxRatpack#fork()` to enable explicit, composable, parallelism
- [1068] - Direct Memory leak in RatPack 1.3.3