portkey 2020-03-09

baptiste-from-paris 2020-03-09T08:05:53.000500Z

hello !

mentally playing with an idea on reitit route data -> API GW + handlers to Lambdas... (maybe have :target keyword on route data for specifying the type of lambda, like jvm, or graal...)

to have fast local playground and the deploy to cloud

just on thought level currently

leaves a thought trail in #portkey channel history

baptiste-from-paris 2020-03-09T08:10:23.004800Z

I am a little lost with reitit compared to other routing libs, any help ?

it represents routes as as via nested vectors, then has ways to compile the routes into fast dispatch via the url path. The leafs of routes can have data attached to them to describe middleware, endpoint handler etc.

Tommi has spend effort on making the dispatch fast

baptiste-from-paris 2020-03-09T08:16:15.008400Z

compojure was not good enough ?

reitit can also be used on the frontend, there's a core lib and then bindings to other stuff

compojure is macro heavy, no inspection possible and the standard route matching is O(n) (walks the routes one by one to match for the url path/method)

and does weird things where it traverses twice to conditionnally apply middlewares

not saying that don't use compojure, just that there are differencies 🙂

baptiste-from-paris 2020-03-09T08:18:26.011100Z

okay, got it !