Archive·tdd.cat
PDF·5 Stories

The Daily Diff

An Engineering Newspaper · Curated by Arpit Bhayani

  /\_/\
 (=^.^=)
 (")_(")
				
  /\_/\
 (=^.^=)
 (")_(")
				

Section
Signal

No stories match the selected filters in today's edition.

Postgres listen notify can actually scale for streaming

PostgreSQL LISTEN and NOTIFY has long suffered from a reputation that it cannot scale in production. The primary villain is typically the engine global lock, which causes contention under heavy write traffic.

The team at DBOS demonstrated that this limitation is often misunderstood. By structuring event streams directly into a dedicated table and decoupling notification payloads, they achieved sixty thousand writes per second on a single database instance while maintaining millisecond-level delivery latency.

Polling tables introduces a vicious dilemma: high polling intervals create intolerable lag for interactive applications, whereas aggressive polling overwhelms database connections. Using LISTEN and NOTIFY allows consumer processes to block efficiently and wake immediately upon row insertion without polling overhead.

With the right write batching and lock management patterns, you do not need an external message broker for lightweight streaming workloads.

Anthropic has released practical blueprints for building resilient multi-agent architectures that address real production bottlenecks. Instead of relying on naive prompting, the guides detail programmatic tool calling, embedding-based tool search, and automatic context compaction.

When an agent needs access to thousands of tools, shoving full schemas into prompt context burns tokens and degrades reasoning. By indexing tools with semantic embeddings, systems can dynamically pull only relevant definitions at execution time. Furthermore, programmatic tool calling allows models to execute routines directly within a sandbox, avoiding multi-turn latency spikes.

Long-running agent workflows regularly suffer from context drift and budget exhaustion. The cookbook introduces concrete implementations for wall-clock latency budgets across lead-and-helper agent teams, alongside deterministic compaction algorithms that compress historical state.

Treating agent context and latency as strict systems engineering constraints changes everything. latency and tool scaling.

Amazon built Aurora DSQL by dismantling the traditional monolithic relational database into independent, horizontally scalable distributed services. Rather than coupling execution and storage onto shared nodes, the architecture isolates query execution, concurrency control, commit logging, and durable storage.

Stateless Query Processors compile queries and buffer mutations locally using a custom PostgreSQL frontend. When a transaction prepares to commit, an independent Adjudicator service verifies serializability conflicts without touching data blocks, while durable replication logs record commits across regions before Crossbar routers deliver changes to sharded multiversion storage nodes.

Decoupling conflict adjudication from underlying data storage completely changes how multi-region active-active workloads behave. Latency paths isolate transaction validation from background page materialization, ensuring that read replicas do not bottleneck write throughput.

Separating transaction adjudication from storage is the logical endgame for cloud-native transactional databases.

Retrofitting memory isolation into an existing monolith is notoriously difficult, especially when the target component touches millions of lines of intertwined state. The Mohabi project from OSDI shows how engineers successfully disaggregated and sandboxed the Firefox SpiderMonkey JavaScript engine using software-based fault isolation.

Instead of taking the heavy performance hit of multi-process boundaries or relying on complex IPC serialization, the authors used automated code generation and type-system analysis to isolate data structures across tens of thousands of functions. Their optimized x86-64 SFI toolchain maintains modest overheads of around 24 percent on JetStream and Speedometer benchmarks, while cutting SPEC 2017 overhead to just 6 percent.

Isolating complex runtimes inside the same address space is finally becoming practical without sacrificing system throughput.

Because an LSM-tree is inherently append-only, RocksDB already possesses half of the architecture required for Multi-Version Concurrency Control. Every write creates a fresh record rather than mutating existing disk pages in place, leaving previous revisions untouched on disk.

The critical missing piece is point-in-time visibility. RocksDB solves this by tagging every single operation with a monotonically increasing sequence number. When a query begins, the engine allocates a snapshot handle pinned to the highest sequence number written at that exact moment. Read operations simply filter out all memtable entries and SSTable keys bearing higher sequence numbers, eliminating the need to lock table structures against concurrent writers.

Garbage collection is deferred entirely to background compaction cycles. Obsolete records persist on disk until compactions merge sorted runs, checking active snapshot references before dropping older versions.

This decoupled design guarantees that readers never block writers and writers never block readers.