← Back
Home › Systems › Operating systems and runtimes

js-runtime

server JavaScript runtime

Node, Bun

SystemTechniques · 16Primitives · 62 js-runtime Dependency version resolutioncompilers · medium: Pick package versions that satisfy semver constraints (PubGrub, SAT) with readable conflict errorsHeap snapshot startupcompilers · medium: Serialize an initialized VM heap and deserialize at startup to cut boot timeJavascript event loopcompilers · medium: Task and microtask queues, rendering steps, timers and promise job ordering in JS hostsWork-stealing dequeconcurrency · medium: Per-worker deque: the owner pushes and pops at the bottom without contention, idle workers steal from the top; the core of Rayon, Tokio and Go.›Deterministic simulation testingdistributed · medium: Run the whole system in one thread under a seeded scheduler with simulated network, disk and clock, so every failure replays from its seed.›Primary-backup replicationdistributed · medium: One node orders all writes and ships them to standbys; the acknowledgement rule (none, one, all) sets what a crash loses, and an external arbiter decides who takes over.›Coverage-guided fuzzingsecurity · medium: Mutate inputs, run an instrumented target, and keep any input that reaches a new code edge; feedback turns blind guessing into incremental search.›epoll event loopnetworking · low: One thread waits on thousands of non-blocking sockets with epoll_wait and handles only ready ones; the core of nginx, Redis and tokio.›d-ary heapdata-structures · low: Array heap with d children per node (d = 4 typical): half the binary heap's depth, siblings in one cache line, faster priority queues.›Calling conventions abicompilers · low: System V, Windows x64 and AAPCS64 ABIs: argument registers, stack frames, struct passing, FFIModule resolutioncompilers · low: Resolve import specifiers to files: Node and ESM resolution, package exports, CJS interopHdr histogramdata-structures · low: Log-linear bucketed histograms with bounded relative error for latency percentilesBuffer pools for zero-allocation I/Ohardware-os · low: Preallocate a fixed set of aligned I/O buffers and recycle them through a free list, so the hot path never mallocs, faults or unmaps. The bounded count doubles as back pressure.›File system watchinghardware-os · low: Treat OS change notices as hints, debounce them, and rescan and diff a snapshot whenever notices overflow or may be lost.›Process supervisionhardware-os · low: A parent process starts services, reaps their exits and restarts them under a delay and burst-limit policy, then stops them with SIGTERM before SIGKILL.›HTTP/1.1 message parsingnetworking · low: Parse HTTP/1.1 requests and responses incrementally from a byte stream: RFC 9112 body-length rules, chunked decoding and the strictness that stops request smuggling.›io_uringnetworking · low: Linux async I/O through two shared-memory rings (submissions in, completions out), batching or eliminating syscalls for sockets and files alike.›WebSocketsnetworking · low: Full-duplex message framing over one upgraded HTTP connection; the standard way to push real-time data to browsers.›Zero-copy I/Onetworking · low: Move bytes between files, sockets and NICs by passing page references instead of copying through user space: sendfile, splice, MSG_ZEROCOPY, kTLS.›Mutual TLSsecurity · low: TLS where the client also proves a certificate key, so every connection carries a verified, rotatable machine identity.›Graceful drainingsystems · low: On a termination signal, stop taking new work, finish in-flight work until a deadline, tell clients to reconnect elsewhere, then exit; clients resume from a token.›Semver range matchingcompilers · low: Semantic version parsing, ordering and range matchingTopological sortgraphs · low: Order the vertices of a DAG so every edge points forward; the core of build systems, schedulers and dependency resolution, with cycle detection for free.›+ 9 more techniques+ 46 more primitives

Similar systems

Share the most building blocks with this one.