Skip to content

Bring On The Async!

Pre-release
Pre-release

Choose a tag to compare

@hlship hlship released this 31 Mar 22:05

This release introduces a significant new feature: Asynchronous request processing using core.async. At its core is the definition of an asynchronous handler (or middleware), which accepts a Ring request map and returns its response inside a channel; asynchronous handlers are typically implemented using go blocks.

Resources within the same server will often need to cooperate; Rook supports this via the asynchronous loopback, which is a way for one resource to send a request to another resource using core.async conventions (and without involving HTTP or HTTPs).

There's also support for leveraging Jetty continuations so that all request handling is fully non-blocking, end-to-end.

Other features:

  • Validation of incoming request parameters using Prismatic Schema
  • io.aviso.rook.client namespace to streamline cooperation between resources via the asynchronous loopback
  • Metadata from the containing namespace is merged into metadata for individual resource handler functions

Closed Issues