microhttp
libs
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
microhttp
- FLaNK Stack Weekly 11 Dec 2023
- Any suggestions for good open source Java codebases to study(With below criteria)?
- Latest version of Microhttp, an event-driven, zero-dependency, pure-Java web server with 500 LOC, capable of 1,000,000+ requests per second on commodity EC2 hardware.
- Microhttp: Event-driven, zero-dependency web svr, 500 LOC, capable of 100k r/SEC
- Microhttp is an event-driven, single-threaded, zero-dependency web server with 500 LOC. Benchmarks on EC2 show 100,000+ requests per second and 50,000+ persistent connections.
libs
-
Deno vs. Bun performance is rigged
like bun or node or deno (Rust as well as C++).
in techempower, the vast vast majority of code running in the just-js entry is JavaScript. all the core libraries for networking and interacting with the OS are js wrappers around C++/v8. the http server, though incomplete and not production rady, is written in javascript, with http parsing handed off to picohttpparser. the postgres wire protocol is completely written in javascript. in fact, one of the advantages JS and other JIT languages have is you can optimize away a lot of unnecessary logic at run time when you need to. e.g. https://github.com/just-js/libs/blob/main/pg/pg.js#L241
the whole point of doing this was to prove that JS can be as fast as any other language for most real world web serving scenarios.
if i had more time to work on it, i am sure i could improve the fortunes score where it would be at or very close to the top of that ranking too.
- TechEmpower Web Framework Benchmarks: Round 21
-
Latest version of Microhttp, an event-driven, zero-dependency, pure-Java web server with 500 LOC, capable of 1,000,000+ requests per second on commodity EC2 hardware.
yes. it's mostly pure javascript though - postgres library is completely written in JS as is the http framework, which uses C++ wrapper around picohttpparser for fast http parsing. admittedly both are incomplete and need a lot of work done to make them "production ready" but JS is incredibly fast on modern engines like v8 and spidermonkey *if* you are careful about how much garbage you create and spend some time benchmarking and optimising. the C++ in just-js is minimal and mostly just simple wrappers around syscalls.
What are some alternatives?
ring - Clojure HTTP server abstraction
just - the only javascript runtime to hit no.1 on techempower :fire:
Guava - Google core libraries for Java
jsoup - jsoup: the Java HTML parser, built for HTML editing, cleaning, scraping, and XSS safety.
deezpatch - A simple fast dispatch library.
MFL - A Java library for reading and writing MATLAB's MAT File format
AssertJ - AssertJ is a library providing easy to use rich typed assertions
FrameworkBenchmarks - Source for the TechEmpower Framework Benchmarks project
leftright-map-java - A (hopefully) Fast, (hopefully) Thread safe map inspired by evmap
VTerminal - A new Look-and-Feel (LaF) for Java, which allows for a grid-based display of Unicode characters with custom fore/background colors, font sizes, and pseudo-shaders. Originally designed for developing Roguelike/lite games.
VNameGenerator - A Java implementation of various procedural name generation algorithms, including combinatorial, consonant vowel, context-free grammar, and Markov chain.