keinsell / 20231101-kitchen-sink-on-crack-engineering

This repository is so fucking mess I do not even think
Do What The F*ck You Want To Public License
0 stars 0 forks source link

⚡ <5ms Response Time Challenge #204

Open keinsell opened 9 months ago

keinsell commented 9 months ago

The challenge to create a HTTP Server in JavaScript/TypeScript that will be able to handle single request in less than 5ms in local environment, the such server such include connection to database, authentication and overall end-to-end returning information to user. For learning purposes this can be extended to writing a simple HTTP in Golang and comparing it to Node.js.

Overall recommendedations for API is to response in less than 100ms to provide "instant" feeling to user as so will be standard I choose.


keinsell commented 9 months ago

So far the best potential solution I've found is hyper-express

keinsell commented 9 months ago

https://www.techempower.com/benchmarks/#hw=ph&test=json&section=data-r22&l=yyku7z-cn3

I think Node is not that bad, maybe if we combine Deno or Bun with things like hyper-express and build a little more improvements to typesystem on top of that (ex. how deepkit made bytecode typings) we can have really nice thing that will be productive.

The least performant things in JS are validation and serialization, so once solutions for these problems will be found it can definitely be better than express.js - but I would like to keep a compatiblity layer between express.js and fastify (through proxies)