So today I'm working with Hono which is a framework that I'm not really familiar with. It's something new that I'm trying out, and today I learned that executionCtx.waitUntil is actually a way for us to make an endpoint that is able to process some work behind the scenes in an asynchronous manner, even after the endpoint has returned a result to the client. I find it very interesting and very different from Node.js. I noticed that Hono is kind of following web standards instead of following the Node.js paradigm. It feels like a backend that is written using Request/Response as its backbone, where every handler takes a Request in and returns a Response out.
In simple terms, Node.js is giving us a blank form — res, where we fill it piece by piece, adding status, header, body, etc., while Hono is giving us a bag, where we put all the info we want to return, throw it in there and return it at once.
I also found out that's why it is so lightweight and able to run on so many runtimes, like Cloudflare Workers, Deno, Bun. It was really interesting to find out that Express.js basically invented its own Request/Response abstraction because it came out before web standards existed.