Skip to content

Support for non-blocking code in filters and decorators #2820

@FeldrinH

Description

@FeldrinH

As far as I can tell it is currently not possible to make a non-blocking request in a filter or decorator (https://jooby.io/#responses-nonblocking-limitations). Are there any plans to lift this limitation?

Decorators are very useful to extract for example authorization and authentication logic, but authentication logic often requires making a request to a database or another service to check session info and permissions. If those requests are non-blocking, such as for example Kotlin coroutines, then there is no way to take advantage of that in a filter or decorator.

This means that there is currently an incentive to just not use one of the core features of Jooby if you are using non-blocking libraries for request handling, which is a shame.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions