Fork me on GitHub

In, the example middleware returns a fn with two different arities; one on the form [request], and one on the form [request respond raise]. What determines which of these is used? Do I need to implement both, or can I pick one?


@wombawomba Ring async uses the 3-arity version. You can call your app with 1 or 3 args, arity is retained through the call chain and it throws ArityError etc. if some component (mw or handler) doesn't support it.


web servers like ring-jetty have option to start the server in async mode.


Alright, thanks! I’m not familiar with async mode, but I’ll take a look. You wouldn’t happen to know if running Ring in async mode is common/recommended?


mostly not needed. reitit-http should be run in async mode as any step/interceptor can return promise, async channel etc. running it in stnc-mode causes all those to block.


if you use jdbc-pooling, it's anyway blocking the thread. The async-db libs are not that great in clj.


metosin/porsas is so pre-alpha 🐖


Cool, thanks for the info 🙂


someone asked about #malli get-in walking over :and schemas. About to close a PR which will add utilities for doing that and much more. Getting closer to release.