SShortSingh.
Back to feed

Developer Rebuilt Express in C++ to Understand It, Achieved 4.8x Speed Gain

0
·1 views

A developer at FYCLabs who struggled to understand Express's middleware chaining decided to rebuild the framework from scratch in C++ rather than simply reading its source code. The project, called PlusWeb, revealed that Express uses a linear route-matching scan, meaning routing performance degrades as more routes are registered. By implementing a segment-based trie instead, PlusWeb maintained roughly 90,000 requests per second regardless of route count, while Express dropped to 355 rps with 10,000 routes. On a realistic five-route application, PlusWeb outperformed Express 5 by about 4.8 times. The developer also learned through a side project building a JavaScript interpreter that Node.js itself wraps libuv, leading them to eventually adopt the library rather than maintain their own event loop.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Key Backend Patterns to Protect Critical Business Data from Loss or Corruption

Backend systems handling payments, orders, and employee records require more than basic database storage — they must preserve history, enforce access control, and provide context when issues arise. Storing only the current state of a record leaves engineers without the audit trail needed to understand how that state was reached, making a change-history table or event-based approach far more effective. Naming business events meaningfully — such as payment_received or approval_granted — helps different services like notifications, auditing, and analytics respond appropriately to the same action. Idempotency, where the server tracks unique request identifiers to avoid duplicate processing, is essential for APIs operating over unreliable networks. Structured audit logs that record who acted, what changed, when, and on which object are also recommended as a separate layer from standard operational logs.

0
ProgrammingDEV Community ·

Build vs Buy: The Real Cost of Rolling Your Own .NET Licensing in 2026

A detailed technical guide published on DEV Community examines the true complexity and cost of building custom software licensing for .NET applications. While generating and verifying a cryptographic license key is straightforward using built-in .NET libraries, developers quickly face far harder challenges around key management, seat enforcement, and format versioning. Features like seat limits require a stateful, always-on backend service to atomically track activations, making DIY licensing effectively a separate product to build and maintain. The guide also highlights difficulties with machine fingerprinting, offline validation, and the operational burden of key rotation without breaking existing deployments. Its conclusion is that developers should only build their own licensing if needs are genuinely simple, and should consider buying a solution the moment features like trials, revocation, or customer portals are required.

0
ProgrammingDEV Community ·

How Public-Key Signing Enables Offline Software Licensing in .NET Apps

A technical guide outlines how .NET developers can implement software licensing using asymmetric cryptography, where a private key on the server signs license payloads and a public key embedded in the app verifies them offline. The approach uses a small JSON license payload containing fields such as licensee, product tier, seat count, and expiry, all protected by an RSA signature. Developers can use the Keyright.NET SDK to initialize a single client at startup, which validates the license without making a network call, making it suitable for air-gapped or enterprise environments. The guide notes that while offline validation is fast and functional, it can be patched out by a determined attacker, and online activation should be layered on top when seat enforcement or key revocation is required.

0
ProgrammingDEV Community ·

Self-hosted Pi-hole and Tailscale setup fails silently after Tailscale's 180-day key expiry

A developer running Pi-hole and Tailscale on a free Oracle Cloud VM in São Paulo lost DNS resolution across all devices after six months of smooth operation. The outage was traced to Tailscale's default 180-day node key expiry, which silently dropped the VM from the mesh network. Because the setup relied on a single DNS resolver — the now-unreachable VM — no fallback was available, blacking out name resolution on both a Windows 11 PC and a Galaxy S23 simultaneously. Internet connectivity itself remained intact, as confirmed by successful pings to public IPs, which helped isolate the failure to the DNS layer. The author has since documented the recovery process and flagged the key expiry behaviour as a critical detail for anyone running headless Tailscale nodes.