SShortSingh.
Back to feed

Developer Builds End-to-End gRPC Unary RPC on Reactor Netty with Full HTTP/2 Support

0
·2 views

A developer has completed Stage 2 of a custom gRPC implementation on Reactor Netty, delivering the first end-to-end plaintext HTTP/2 unary RPC call. The server validates incoming requests in strict order — checking HTTP method, content-type, trailers declaration, and path — before routing them to a business handler. gRPC status codes are conveyed via HTTP/2 trailing headers, with application exceptions mapped to UNKNOWN and protocol violations mapped to INTERNAL. Metadata handling preserves key ordering and supports binary values via Base64 encoding, while reserved headers like grpc-status and content-type cannot be overwritten by user code. Timeout formatting uses ceiling division to ensure wire deadlines never fall shorter than the caller's original request.

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 ·

Circuit Breaker Pattern: How Software Shields Apps From Cascading Failures

The circuit breaker pattern is a software design strategy that detects failures in external dependencies and temporarily blocks requests to them once errors exceed a set threshold. Inspired by electrical circuit breakers, it prevents a single failing service — such as a payment processor or database — from consuming resources and crashing the entire application. The pattern operates across three states: Closed (normal operation), Open (requests blocked), and Half-Open (limited test traffic allowed to check recovery). If the test requests succeed, the breaker resets to Closed; if they fail, it returns to the Open state. This approach allows applications to stay functional during outages, for example by displaying a graceful error message instead of going fully offline.

0
ProgrammingDEV Community ·

How Cognitive Biases and Mental Shortcuts Quietly Shape Your Decisions

Psychological research shows that human decision-making is heavily influenced by mental shortcuts called heuristics, which allow quick judgments but introduce systematic errors. Common cognitive biases — including anchoring, framing effects, confirmation bias, and the sunk cost fallacy — cause people to make irrational choices even when they believe they are reasoning logically. Classic experiments, such as the Linda problem and the UN nations anchoring study, demonstrate how irrelevant information and flawed prototypes can distort probability judgments. The framing effect further illustrates that identical outcomes can lead to opposite decisions depending solely on how the information is presented. While heuristics are useful adaptations for navigating a complex world, recognizing where they predictably fail is considered the foundation of improved decision-making.

0
ProgrammingDEV Community ·

Developer Proposes 'Dumb Main Session' Architecture to Simplify Long-Running AI Coding Agents

A developer on DEV Community has proposed a new architectural pattern for AI coding agents where the main session acts purely as a runtime, doing little beyond repeatedly calling a subagent. In this model, the subagent handles all intelligence and execution — checking project state, performing work, and updating progress — while the main session requires no deep understanding of the project. The key idea is to offload memory to an external project state, eliminating the need for large persistent contexts in the main session. The author believes this could make long-running coding agents significantly simpler and more efficient. The proposal is aimed at popular tools such as Claude Code, Cursor, Cline, Aider, and OpenHands, and the author is seeking input on whether anyone has already implemented this pattern.

0
ProgrammingDEV Community ·

Linux Kernel Replaced Dual VMA Structures with Maple Tree in Version 6.1

The Linux kernel manages a process's virtual memory through data structures stored in the memory descriptor (mm_struct), which tracks all Virtual Memory Areas (VMAs). Historically, the kernel maintained two parallel structures — a linked list for sequential traversal and a red-black tree for fast O(log n) lookups — requiring both to be updated on every VMA change. Starting with Linux 6.1, both structures were replaced by a single Maple Tree, which handles both traversal and fast lookup in one unified data structure. Unlike a red-black tree that holds one memory region per node, the Maple Tree stores multiple keys per node, similar to a B-tree, reducing overhead. This change simplifies kernel memory management and delivers better real-world performance while maintaining O(log n) time complexity for search, insert, and delete operations.