惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

F
Full Disclosure
Recorded Future
Recorded Future
T
Tenable Blog
S
Securelist
C
CERT Recently Published Vulnerability Notes
T
Threatpost
S
Schneier on Security
A
Arctic Wolf
The Hacker News
The Hacker News
C
CXSECURITY Database RSS Feed - CXSecurity.com
Know Your Adversary
Know Your Adversary
P
Privacy International News Feed
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
The Register - Security
The Register - Security
Cisco Talos Blog
Cisco Talos Blog
AWS News Blog
AWS News Blog
K
Kaspersky official blog
T
True Tiger Recordings
T
Threat Research - Cisco Blogs
V
Vulnerabilities – Threatpost
P
Palo Alto Networks Blog
T
The Exploit Database - CXSecurity.com
小众软件
小众软件
B
Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Microsoft Azure Blog
Microsoft Azure Blog
Cyberwarzone
Cyberwarzone
C
Cybersecurity and Infrastructure Security Agency CISA
T
Tor Project blog
Spread Privacy
Spread Privacy
Malwarebytes
Malwarebytes
P
Proofpoint News Feed
F
Fox-IT International blog
F
Fortinet All Blogs
P
Privacy & Cybersecurity Law Blog
G
GRAHAM CLULEY
量子位
Latest news
Latest news
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 叶小钗
Project Zero
Project Zero
T
Tailwind CSS Blog
N
Netflix TechBlog - Medium
Martin Fowler
Martin Fowler
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
I
Intezer
博客园_首页
腾讯CDC
H
Hackread – Cybersecurity News, Data Breaches, AI and More
D
Darknet – Hacking Tools, Hacker News & Cyber Security

DEV Community

98. RAG: Give Your AI Access to Your Documents Why Getting a Tech Job Right Now Feels Broken? The Container Runtime Nobody Told You About (And Four Others) The Singleton Labyrinth Build your first MCP server in TypeScript: the 2026 setup that takes 30 minutes. Check Wallet Balances Across 4 Chains with Zero Dependencies — chain_balance.py Vectr — Code Intelligence AI Tool Beyond Monolithic AI: How to Build a Pluggable "Brain" Architecture for Autonomous Agents 5 PostgreSQL locking behaviors that trip people up The Operational Cost of JWT Lifecycle Management: Overlooked Details Mastering Structured JSON Outputs with Gemini API ATR Implements the Detection Layer the NSA Identified as Missing in MCP I tried both Cursor and Antigravity(1.20) - Switching Context - which one is better? Negative Lookups in Bf-Tree: Caching Things That Don't Exist My Struggles as a Software Engineer in 2026 Why Hybrid Metaheuristics Still Beat “Smarter” AI in Real-World Optimization Cómo destacar como JR DEV en tu equipo I got tired of guessing which model holds my VRAM, so I built a tiny dashboard Qwen Is Not Yet Ready to Power Local OpenClaw Deployments Top 7 Featured DEV Posts of the Week Why I got frustrated with AI job search tools and built my own 10 Best Open-Source AI Agents for 2026 Contract Analysis Will Replace Legal Gatekeeping AWS Cloud Shell with Antigravity CLI Building Reliable Event Delivery for XRPL Applications AMTP: HTTP for the Agentic Web — A New Markdown-First Protocol for AI Agents LLM Security Vulnerabilities Engineers Need to Know in 2026 Shared Build Cache: Makes Sense for the Independent Developer? Live Lessons From Running a 5-Minute Polymarket Crypto Bot Cómo Evaluar Agentes IA: Tutorial de LLM-as-Judge Day 2 of Python Learning 🐍 I built a local-first Apple Health recovery briefing that shows its math I Built a REST Microservice With a Database in 3 Files — and Wrote Zero Code 10 Avro Schema Mistakes Even Experienced Developer Do Commit: Refactor background workers and logging pipeline GitHub Actions vs Jenkins vs GitLab CI: A Developer's Honest Comparison (2026) Clean Architecture in MongoDB + C#: Why is the Repository Pattern Alone Not Enough? I Tested 10 More Models. Five Brand New Families Debuted. None Scored Below 75%. I Almost Quit Coding to Become a Welder Understanding Reinforcement Learning with Human Feedback Part 6: How the Reward Model Trains the Original Model # Level Up Your Portfolio with Wowfolio.in: Free, Customizable, Type Inhabitation in Lean: Why “Hello {name}” Can Become a Theorem Mastering Context in Go: A Senior Engineer’s Playbook for Lifecycle Management Solana Transactions Through a Backend Developer’s Eye Agent as a Tool Call: Claude Code's Fork-Exec Pattern How I wired Stripe subscriptions to Supabase in Next.js 15 (the parts tutorials skip) Introduction to A2A and Agent Search Why Doesn't Linux Break Every Week? The "AI" Label Is Losing Its Meaning, and Companies Are the Ones Diluting It Bucky Fuller's To-Do List: Can AI Finally Solve the World's Cataloged Problems? My $10/Month VPS Gets 659 SSH Attacks per Day — Here's What 4 Weeks of Running an Autonomous AI Has Taught Me About Infrastructure Speed Up Your WordPress Site in 30 Minutes: A No-Plugin Performance Guide Breaking Code: The Addiction Nobody in Tech Will Admit To Nobody Reads AI Safety Papers. But 649 People Upvoted a Letter to an LLM. The Pope wrote about me Je vibe-coded app werkt. Maar kan hij ook live? The Event Store That Survived Black Friday Without a Single 5xx Audit-trail-by-construction: a thesis for spec-driven AI coding Day 8 - Sparse embedding - RAG How we made our Mac launcher feel instant by killing slow providers How we made our Mac launcher feel instant by killing slow providers Enterprise AI Agent Orchestration Patterns How to build your first MCP server in 10 minutes Claude Code's plan mode is prompt engineering, not hard enforcement Built a C# AI Agent That Researches Errors and Suggests Fixes From Shell Scripts to MCP Servers: How SEO Broke My Brain (in a Good Way) AI Agent Platform Buyer's Guide: 12 Questions to Ask Before You Sign 🦋 I Built a Living Terminal Animation with Hermes Agent — Here's How It Went. AI Agents Are Coming for Your WordPress Admin Panel, and That's Not a Bad Thing Tailscale + k3s in a 2‑node homelab: why I use Tailscale ONLY for the control plane When NOT to Use AI Agents: A Realistic Framework Human-in-the-Loop Patterns for High-Stakes AI Agent Decisions LLM Cost Optimization for Agent Workflows: A Practical Guide An Evolving Strategy for Knowledge Work: From Human-In-the-Loop to Human-Before-the-Loop Why I Wake Up at 5am to Run (And Why You Might Want To) I Scanned 260 Packages that your are using and Found 43 With Security Vulnerabilities The Easiest Way to Implement Theme Toggling in React 19 using next-themes & Tailwind CSS v4 AI skill testing: yes, your prompts need regression tests Why We Built AnToAnt: Designing Software Before Writing Code How I Built an End-to-End HR Attrition Dashboard Using MySQL & Power BI Why Hytale Treasure Hunt Engines Stumble Before 1,000 Concurrent Diggers: What Veltrix Does Not Document How to Implement Dark/Light Mode with No Flickers in Next.js Building My First Solana Transfer CLI Tool | #100DaysOfSolana What Is OAuth Token Exchange? CLI wrapper for Cloudflare Tunnel with Zero Trust Your Agent Acts Without Checking Your Error Budget — That's the Failure Mode Nobody Is Tracking The Death of the Junior Developer Is Greatly Exaggerated How I Built a Programmatic SEO Site with 16,750 Pages Using FastAPI and PostgreSQL Toward a Standard Model for Agent Memory I Applied SLA Concepts to My Email Inbox — Here's What I Learned Building the Chrome Extension How Spring Data JPA, JPA, and Hibernate work together What useOptimistic Actually Saves You The Vibe Tax: How Unvalidated AI Code Is Flooding the Market and Driving Up Technical Debt Building My First MCP Server with Claude and Python Azure Blob Storage for Beginners: Private Access, SAS Tokens & Cost Savings Explained I'm building a TypeScript data grid where config reads like English Revamped Proof for Finish-Up-A-Thon Selectors and its uses in HTML & CSS Bronto for Fastly: Real-Time CDN Logging That Actually Scales I Built a Local Interview Coach That Learns From Every Submission With Hermes Agent.
Veltrix Was Killing Us With YAML
Lillian Dube · 2026-05-27 · via DEV Community

The Problem We Were Actually Solving

The real pain wasnt disk size; it was cognitive load on level designers. Every hunt lived in a separate fork of the same monorepo, diffing 14 kB YAMLs was misery, and once the file exceeded 100 kB we started getting partial-checkout timeouts in CI because Git would spend 4 seconds compressing a blob larger than our entire Rust crate. We told ourselves YAML was human-readable, but by Hunt #62 even the most senior designer was copy-pasting reward GUIDs because grep wasnt fast enough to keep up with change velocity.

We dismissed JSON as an option because three years earlier a prototype using JSON had leaked a massive object graph that GC couldnt collect, causing the JVM heap to balloon to 2 GB during hunt spawning. We blamed Jackson, but the deeper truth was that we had optimized for flexibility and paid the price in GC pauses.

What We Tried First (And Why It Failed)

We started by splitting the YAML into chunks: one file per hunt, one file per loot table, one file per zone. That bought us two weeks before the first designer wrote a shell script to merge them at build time, and suddenly our Git history became a merge-hell of spawner rebalancings and last-minute event overrides.

We tried HCL with Terraforms hclwrite, but the interpolation syntax kept breaking when designers forgot to escape dollar signs and CI would compile a hunt that referenced ${spawner_count} as a literal instead of a variable, yielding a spawn storm that filled the test world with 3,000 chickens and locked the server for 47 seconds.

We even tried Protocol Buffers. We defined a proto schema with 37 message types, generated Rust bindings, and patched Veltrix to read the binary proto instead of YAML. Latency dropped from 800 ms to 45 ms, but the tooling story collapsed: designers couldnt eyeball a .pb file in VS Code, and our custom veltrix-inspect tool had to ship with every designers machine because the binary was opaque. By Hunt #76 we had three deserialization branches — one for the editor, one for the server, one for the CLI — and the protobuf version was the slowest path due to unnecessary copying.

The Architecture Decision

In the end we chose SQLite with a code-generated schema.

Every hunt became a SQLite database file: one row per zone, one row per spawner, one table per loot pool, indexes on spawn weight and reward scalar so queries stayed sub-millisecond. We wrote a tiny schema compiler in Go that turned a markdown-like .sql.md file into a SQLite .db artifact, complete with CREATE INDEX IF NOT EXISTS loot_pool_scalar_idx ON loot_pool(scalar ASC). Designers still write text files, but now the build pipeline compiles them into a binary artifact the server loads in 8 ms, and veltrix-validate runs in-process with zero GC pressure.

We picked SQLite over Postgres because we needed zero-coordination across forks: each hunt is a standalone artifact, and the server loads hundreds of them at startup without a connection pool. We kept the compiled .db files under version control because Git LFS handles 50 MB binaries fine, and the diffs are actually readable — binary, yes, but structured, and git blame works when someone accidentally deletes a boss trigger.

The migration wasnt painless. We had to teach the build pipeline to run sqlite3 hunt47.db < schema.sql during the asset compile step, and we added a pre-commit hook that runs veltrix-validate --schema hunt47.sql.md on any changed .sql.md file so designers see the error before the commit. We also had to ship a tiny Rust crate, veltrix-sqlite, that wraps the rusqlite crate with a buffered batch API so the server can spawn 30,000 entities in 1.2 seconds without fighting the GIL.

What The Numbers Said After

After the switch, validation time per hunt dropped from 800 ms to 15 ms, and CI went from occasionally timing out to consistently finishing in 45 seconds. Memory usage on the server during hunt load went from 250 MB heap pressure to a steady 30 MB RSS. We instrumented with jemalloc and confirmed that the SQLite memory allocator path was half the total mallocs we saw with JSON.

Most importantly, the number of merge conflicts dropped from three per hunt to zero, and the time designers spend context-switching between hunts went from 12 minutes to 2 minutes. The single worst error we fixed was a hunt that had referenced a deleted loot table GUID; with SQLite the foreign key constraint caught it at build time instead of runtime, saving us a 17-minute server crash during a closed beta.

What I Would Do Differently

I would not use SQLite for mutable state. We almost did when a designer asked for live reloading of hunt parameters during player testing. Zero-downtime reload sounds great until you realize that SQLite file locks on 80 concurrent desktops create a thundering-herd of writers and the servers PRAGMA journal_mode=WAL cant keep up with a 100 MB hunt file. We backed off and built a tiny HTTP service that serves the SQLite file over gRPC so designers can push updates without touching Git, and we added a 5-second local in-memory cache in the server so reloads dont hammer disk.

I would also standardize the schema compiler earlier. We started with three different hand-rolled SQLite builders, each with its own flavor of SQL injection vulnerability. Once we consolidated to one Go generator we could ship veltrix-db v1.3 with a single security