今日已更新 328 条资讯 | 累计 20300 条内容
关于我们

标签:#architecture

找到 366 篇相关文章

AI 资讯

From Monolith to Microservices: Why I Redesigned Finovara's Architecture - Finovara

At some point, a monolith starts working against you. In my case, Finovara was a single Spring Boot application handling everything (authentication, transactions, limits, piggy banks, notifications, activity logs, currency conversion) The bigger it got, the harder it was to change anything without worrying about something else breaking. So I broke it apart. This post is about the first three pieces I extracted: the API Gateway , the activity-log-backend , and a shared module called contracts-backend . The Old Structure Everything lived in one Spring Boot app. The activity log — which tracks everything a user does in the app (expenses added, limits changed, logins, account changes) — was tangled up with the core business logic. Adding a new type of activity meant touching the same codebase responsible for transactions, security, and everything else. The New Structure finovara-backend/ ├── api-gateway/ ├── activity-log-backend/ ├── contracts-backend/ └── core-backend/ Four modules (there will be more). Each with a clear responsibility. API Gateway The gateway is the single entry point for every request coming from the frontend. It runs on port 8888 with SSL enabled and uses Spring Cloud Gateway (WebFlux-based). Routing is simple and declarative: routes : - id : activity-log-backend uri : ${ACTIVITY_LOG_URL} predicates : - Path=/api/account-activity/**,/api/archive-activities/** - id : notification-backend uri : ${NOTIFICATION_BACKEND_URL} predicates : - Path=/api/notification-settings/** - id : core-backend uri : ${CORE_BACKEND_URL} predicates : - Path=/** Activity log routes go to activity-log-backend . Notification routes go to notification-backend . Everything else falls through to core-backend . The gateway also handles CORS centrally — https://localhost:5173 is the only allowed origin, with credentials support. No individual service needs to worry about CORS anymore. One thing worth noting: the gateway uses use-insecure-trust-manager: true for the HTTP client. Th

2026-06-07 原文 →
AI 资讯

Clean Architecture Revisited

If you are a Software Developer of some form or another, chances are that you follow what are considered best practices for "Clean Code"or "Clean Architecture". It's considered generally best practice according to these books to keep functions down to a few lines, ensure classes have exactly one reason to change, and wrap implementation details behind abstract interfaces. It’s an approach designed to isolate responsibilities and keep the long-term cost of software modifications flat. Yet, as codebases grow under this paradigm, engineers frequently encounter a subtle friction. In the drive to decouple every moving part, applications often accumulate a massive web of boilerplate and multi-layered abstractions. This raises a fundamental question: does hyper-decomposing code actually reduce complexity, or does it simply scatter it across dozens of shallow files, making a single linear operation difficult to follow? This article revisits the baseline assumptions of Clean Architecture by examining a growing yet subtly different software design philosophy championed by systems engineers and computer science pragmatists. We will explore how different software environments define code quality, look at actual case studies of algorithmic decomposition, and map out alternative patterns like John Ousterhout's "Deep Modules." Along the way, we will examine how our design choices interact with mathematical correctness proofs, functional programming paradigms, and a modern toolchain increasingly driven by automated AI agents. The bubbles that shape your opinions The frameworks championed by the "Clean" movement were largely forged in the world of large-scale corporate IT consulting. They were explicitly designed to manage risk in massive organizations where hundreds of engineers with varying levels of experience write code against a single, shared repository. In a setting like a sprawling insurance platform or a legacy banking app with shifting corporate rules, Clean Architecture s

2026-06-07 原文 →
AI 资讯

WordPress headless Project and how to deal with

Hey everyone! Our team and I (acting as a junior backend) recently finished rebuilding GlobeVM (an enterprise Cloud, IT, and Cybersecurity provider) from a traditional monolithic WordPress site into a Headless architecture. I wanted to share our entire journey, our tech stack, the massive headaches we faced, and the solutions we engineered. If you are planning a Headless WP build soon, grab a this might save you weeks of debugging! The Tech Stack Frontend: Next.js (App Router), React, deployed on Vercel. Backend: WordPress hosted on Cloudways (Purely as a headless CMS). Data Structure: Advanced Custom Fields (ACF Pro) + Custom Post Type UI (CPT UI). SEO: Yoast SEO Premium (via REST API). Caching: Vercel Edge Cache (ISR) + Redis Object Cache on Cloudways. During the development and deployment of this website we faced several issues containing the frontend stack itself and traditional features of WordPress. I tried my best to save them all and show them all up here for everyone so that we can discuss on every section of it, maybe we could reach to even something more special :) Challenge 1: The API Was a Mess ("BFF" Architecture) When we first started, we were using the default WordPress REST API. Our Next.js frontend was making 8 different fetch() calls just to build the Blog Homepage (fetching posts, authors, categories, tags, ACF fields, etc.). We were also using messy URLs like ?_fields=id,title,acf&_embed. The Solution: We built a Backend-For-Frontend (BFF). Instead of Next.js doing the heavy lifting, we wrote a custom PHP plugin in WordPress. We created a single master endpoint (/wp-json/gvm/v1/blog-home). WordPress ran all the complex database queries, bundled the Tags, Hero Article, and Categories into one beautiful JSON array, and cached it in RAM using Transients & Redis. Only one of WordPress default api was used for our categories. Result: Next.js made one fetch call. The page loads instantly.' Challenge 2: Handling Vector Icons & ACF Our design heavily re

2026-06-06 原文 →
AI 资讯

Road To KiwiEngine #11: Why I’m Building Sovereign AI Instead of Another AI Wrapper

Most AI products today are wrappers. Different interfaces. Different branding. Different marketing. But underneath many of them is the same pattern: centralized models, rented intelligence, recurring dependence, and cloud-first control. The user doesn’t own the intelligence. They lease access to it. I think that creates a dangerous future. AI Is Quietly Becoming Infrastructure We’re moving toward a world where AI won’t just help write emails or generate images. It will: operate businesses, manage workflows, coordinate logistics, assist with infrastructure, analyze systems, monitor environments, and increasingly act as operational infrastructure. That changes the stakes dramatically. If AI becomes operational infrastructure, then ownership matters. Control matters. Resilience matters. And right now, most users have very little of any of those things. The Problem With Generalized Intelligence One of the biggest issues I see in modern GenAI is overgeneralization. We’re trying to build one giant intelligence that does everything: coding, marketing, legal reasoning, architecture, writing, support, psychology, operations, and research. The results can be impressive. But also unreliable. Hallucinations happen because the systems are stretched across too many domains simultaneously. The broader the intelligence becomes, the harder consistency becomes. That’s why I’ve become increasingly interested in specialized AI systems. AI Should Work Like A Workforce Instead of one giant model pretending to know everything, I believe AI should operate more like a coordinated workforce. Specialized agents. Focused responsibilities. Defined operational boundaries. For example: a development agent, an infrastructure agent, a security agent, a documentation agent, a research agent, a support agent, a creative writing agent. Each one optimized for a specific domain. Each one independently updateable. Independently replaceable. Independently trainable. Not one brain. Many experts. Local-Firs

2026-06-06 原文 →
AI 资讯

Fallacies of GenAI Development #8: More AI Agents Means More Productivity

This is the eighth and final post in a series on the false assumptions teams make when building with generative AI. The series began with the observation that the trough of disillusionment for AI-assisted development has arrived — not because AI is useless, but because eight false assumptions made the trough inevitable. This post covers the last assumption and closes the series. The Fallacy "If one AI agent gives us a 10x boost, ten agents will give us 100x." Why it's tempting The arithmetic feels irresistible. One agent generates code for the backend. Another generates the frontend. A third writes tests. A fourth handles database migrations. A fifth generates documentation. Each agent works in parallel. No meetings, waiting or coordination overhead. Pure throughput. Leadership sees the potential: a five-person team with fifty agents has the output of a fifty-person team at the cost of a five-person team plus API credits. The scaling is linear. The economics are transformational. And the early results confirm it. Each agent, working on its own, produces impressive output. The backend agent generates Go code. The frontend agent generates React components. The test agent generates test suites. Each agent, in isolation, looks like a 10x developer. Why it's wrong You've seen this problem before. It has a name. It's called distributed systems. A distributed system is a collection of independent actors that must coordinate to produce a coherent result. Each actor makes decisions locally. The system's correctness depends on those local decisions being compatible globally. When they aren't, you get inconsistency, conflicts, data corruption, and cascading failures. AI agents working on the same codebase are a distributed system. Each agent makes decisions — variable names, error handling strategies, retry policies, data formats, abstraction levels, dependency choices. Each decision is made locally, in the context of one prompt, one file, one task. No agent sees the full pict

2026-06-06 原文 →
AI 资讯

How to Choose Tech Decisions That Serve You (And the "This Must Be False" Rule)

Inspired by Nir Eyal's "beliefs are tools" framework Beliefs are tools, not truths. Tech stacks are too. Pick the ones that work for you. Most "tech debt" is actually "belief debt". We hold onto frameworks, patterns, and processes long after they stop serving the product. To build great software, we need to introduce a core rule: If a tech belief or "best practice" doesn’t solve a real problem for you right now, it must be treated as false. Here is how to audit your tech beliefs using 5 filters. 1. ARE THEY USEFUL? The real question isn’t "Is this the best tech?" It’s "Does this serve the user?" Tools are tools. Keep the ones that ship. Bad belief (Treat as False): "We need Kubernetes because it’s the industry standard." Useful belief (True for Now): "A $5 VPS serves 10k users. We’ll use K8s when we have a scaling problem, not a resume problem." If your architecture choice doesn’t make the core loop faster, cheaper, or simpler for users, it’s not serving you. Delete it. 2. ARE THEY TESTED? A useful stack holds up when the world pushes back. Pay attention to production, not the trending blog posts. Bad belief (Treat as False): "Microservices are inherently more scalable"—said before you even have 2 concurrent users. Tested belief (True for Now): "Our monolith handles 50 req/s perfectly. We’ll split services only when latency exceeds 300ms in prod." Load test it. Dogfood it. If it only works in a conference slide deck, it’s a story, not a tool. 3. ARE THEY OPEN? A tech choice you can’t change has stopped being a tool and has become a cage. Hold opinions firmly, but hold implementations loosely. Bad belief (Treat as False): "We’re a React shop forever." Open belief (True for Now): "React serves us today. If HTMX lets us ship this feature in 2 days instead of 2 weeks, we’ll use HTMX." In a famous study on hope, Curt Richter’s rats swam for 60 hours when they believed rescue was coming. Your team will grind for years on a legacy stack if they believe it can actually be r

2026-06-06 原文 →
AI 资讯

DIFP Nostr: Fitting 6,000+ Products into a Single 64 KB Event

TL;DR — The DIFP protocol was designed to be data-compact and geo-aware from day one. We recently discovered it maps almost perfectly onto the Nostr event format. Here's how, and why it matters for decentralized food infrastructure. Background: What Is DIFP? DIFP (Djowda Interconnected Food Protocol) is an open protocol designed to sync food product data across distributed nodes — compactly, efficiently, and with geo-location awareness built in by default. One of its core design decisions is the PAD system (Preloaded Asset Distribution): Apps ship with a preloaded asset pack — item metadata, compressed images, category structure — all bundled at install time. Only price and availability need to travel over the wire during sync. This means the data footprint per product is tiny. Very tiny. Enter Nostr Nostr is a simple, open protocol for decentralized communication. One of its key specs: events support up to 64 KB of content . When we started exploring Nostr as a potential transport layer, we ran the numbers — and the fit was surprisingly clean. The Math: Products Per Event Baseline encoding A product represented with three fields: { "id" : 500 , "available" : true , "price" : 30000 } At this level of verbosity, a single 64 KB Nostr event can hold approximately: ~1,500 – 2,000 products Already useful. But we can do better. Optimized encoding Two key optimizations: 1. Drop the availability key — If a product entry exists in the JSON, it's available. If it's absent, it's not. No boolean needed. 2. Drop the field names — Instead of {"id": 500, "price": 30000} , just store: 500,30000 Field mapping is handled at the app level, not the protocol level. The device knows position 0 is the product ID, position 1 is the price (in smallest currency unit, e.g. cents). Result ~6,000 – 7,000 products per single Nostr event Possibly more, depending on the price distribution and ID ranges in a given catalog. Geo-Discovery: MinMax99 Cells DIFP uses a geo-cell system called MinMax99 to

2026-06-06 原文 →
AI 资讯

How We Strengthened Magento Performance Architecture for a Multi-Million Product Store

Managing a multi-million product catalog on Magento presents unique challenges around performance, scalability, and operational efficiency. At Rave Digital, we recently undertook a Magento performance optimization project for a large-scale eCommerce merchant struggling with slow site speed, infrastructure bottlenecks, and backend instability. This use case breakdown details how we modernized their Magento architecture, optimized database performance, and scaled infrastructure to deliver a stable, high-speed shopping experience. This post is tailored for eCommerce managers, directors, and Magento merchants—especially those running Adobe Commerce or Magento Open Source platforms—who want to understand practical strategies for Magento architecture scaling and performance tuning for large catalogs. The Problem: Performance Bottlenecks in a Complex Magento Environment: Our client operated an enterprise Magento store with a multi-million product catalog. Despite Magento’s robust capabilities, the site suffered from: Slow page load times impacting user experience and SEO Scalability challenges as product volume and traffic grew Infrastructure bottlenecks causing backend instability and downtime Complex integrations and manual processes limiting operational efficiency Platform limitations in handling large catalog management and real-time inventory updates These issues collectively threatened the site’s ability to support growth and deliver a seamless customer experience. The client sought a comprehensive Magento platform modernization to address these challenges. Context: Why Magento Architecture and Infrastructure Matter Magento’s flexibility and extensibility make it ideal for enterprise eCommerce, but large catalogs require careful architecture and infrastructure planning. Key technical pain points include: Database performance under heavy read/write loads Indexing delays and cache invalidation impacting site speed Integration complexity with third-party systems and API

2026-06-05 原文 →
AI 资讯

The Context Compression Pattern

Pattern Defined Precise Definition: Context Compression is an inference pattern that utilizes a specialized "selector" model or a ranker to distill large volumes of retrieved data into its most salient semantic components, removing redundant or irrelevant tokens before the final inference pass. Problem Being Solved We are currently fighting the "Lost in the Middle" phenomenon. Even with massive token windows, LLM performance degrades significantly when relevant information is buried deep within a context block; more data often leads to less accuracy. For a Director of Engineering, this is a direct threat to the Sovereign Vault's integrity. Every irrelevant token passed to the model is a potential point of failure for privacy airlocks and data governance. As established with the Sovereign Redactor , minimizing the noise isn't just about saving money—it is about shrinking the surface area for hallucinations and privacy leaks. Use Case Consider an Archival Intelligence system processing 1880s shipping ledgers. A single query about "cargo weights in 1884" might pull 20 pages of scanned text. Most of those pages contain sailor names and weather reports that have no bearing on the weight data. Without compression, the model has to "read" the entire ledger, leading to high costs and potential confusion. With the Context Compression pattern, a smaller, faster ranker identifies the specific sentences regarding "tonnage" and "cargo," passing only those 200 relevant words to the high-reasoning model. The Forensic Auditor gets a precise answer in half the time. Solution The pattern typically follows a three-step pipeline: Retrieve: Fetch the top documents using standard RAG. Compress: Use a technique like LongLLMLingua (a token-pruning method developed by Microsoft Research) or a Cross-Encoder to rank and prune tokens. Synthesize: Pass the condensed, high-signal prompt to the final model. flowchart LR A([User Query]) --> B[RAG Retrieval\nTop N Documents] B --> C[Compression Lay

2026-06-05 原文 →
AI 资讯

If the warehouse already has the data, why are we copying it elsewhere?

When we started working on Krenalis , we spent a lot of time reviewing how customer data typically flows through a modern data stack. One pattern kept showing up often enough that we started questioning it. In many modern stacks, customer data already lands in a warehouse. Yet we often copy that same data into a CDP before we can start building customer profiles. During one of those discussions, someone asked a question that sounded almost naive: Why are we moving all this data in the first place? Nobody had a particularly strong answer ready. The answer was mostly: Because that's how CDPs work. We expected the question to have an obvious answer. It didn't. The warehouse is no longer just for analytics Over the last few years, the role of the data warehouse has changed significantly. Warehouses are no longer just analytical systems. They're increasingly becoming the place where organizations centralize the context used by applications, AI agents, copilots, and business processes. Customer data from systems like Shopify, Stripe, CRMs, support platforms, and internal applications often ends up there long before anyone starts thinking about segmentation or activation. In many organizations, the warehouse is already the place where teams answer questions about customers, revenue, retention, and product usage. That made us wonder: If the warehouse is already becoming the operational center of the data stack, why does customer identity usually live somewhere else? Consider a customer who buys through Shopify, pays through Stripe, opens support tickets in Zendesk, and uses the product under a different email address. In many organizations, all of those records already end up in the warehouse. Yet building a unified profile often requires exporting that same data into another platform before identity can be resolved. The cost of another copy To be clear, data duplication is not inherently bad. Most software systems rely on some form of replication, caching, or denormalizati

2026-06-05 原文 →
AI 资讯

Full-stack RBAC with NestJS Clean Architecture + Next.js FSD

Built a full-stack RBAC admin starter: NestJS (Clean Architecture) + Next.js 16 (FSD). JWT refresh, permission-gated UI, sheet-based CRUD. MIT. Looking for feedback. ⚡ Next.js 16 Admin Dashboard Template Architecture: Strictly adheres to Feature-Sliced Design (FSD) to prevent codebase rot in large applications. Key Features: Full-scale Role-Based Access Control (RBAC) UI, URL-driven advanced tables (TanStack Table v8), global caching (TanStack Query v5), and dynamic sheet-based UX configurations using shadcn/ui and Tailwind v4. Quality Assurance: Pre-configured with Playwright for End-to-End (E2E) testing and automated GitHub Actions CI. 🛡️ NestJS Clean Architecture REST API Architecture: Implements strict layered Clean Architecture (Presentation ➔ Application ➔ Domain 🡨 Infrastructure) ensuring zero database/framework lock-in. Key Features: Advanced authentication via JWT refresh rotation, stateful RBAC with high-performance Redis permissions caching, and enterprise-grade security structures. Quality Assurance: Achieves ~98% test coverage across domain and application layers using Jest.

2026-06-05 原文 →
AI 资讯

How I Organize a Small Next.js Content Hub by Search Intent

When building a small content site, the framework is usually not the hardest part. The harder part is deciding what each page should be responsible for. A lot of sites start as a simple article list. That works for a while, but it becomes messy when visitors arrive with different search intents. Some users want to learn what something means. Some want download or setup information. Others are trying to fix a specific issue. Those users should not all land on the same generic page. The structure I use For a small Next.js content hub, I like to separate routes by intent: Homepage: broad entry point Learn hub: basic explanations and guides Learn detail pages: specific guide topics Download page: download or install intent Fix hub: troubleshooting entry point Fix detail pages: specific issue pages English and Japanese routes: language-specific entry points This structure is simple, but it keeps the site easier to maintain. Page role comes first Before writing a page, I define its role. A learn page answers what something is, how it works, and what a beginner should understand first. A download page answers where a user should get something, what should be checked before installing, and which platform or device matters. A fix page answers what is not working, what should be checked first, and whether the problem is related to permissions, notifications, device settings, or installation. The page role decides the title, description, internal links, and body structure. Why this helps SEO This approach helps avoid pages competing with each other. For example, a download page should not try to rank for every tutorial query. A troubleshooting page should not read like a general homepage. Each page can link to related pages, but the primary intent stays clear. That makes the site cleaner for both users and search engines. Metadata and sitemap discipline In a Next.js App Router project, I also like to keep metadata and sitemap updates close to the route change. For example: If

2026-06-05 原文 →
AI 资讯

Amazon S3 Doesn't Hope Hardware Won't Fail. It Assumes It Already Has.

Most engineers build distributed systems hoping nothing breaks. Amazon S3 was engineered under the opposite assumption: that something is already broken, right now, and the system needs to be fine with that. That one mindset shift explains almost everything about how S3 works — and why it's one of the most reliable pieces of infrastructure on the planet. I went through a deep-dive conversation with Mai-Lan Tomsen Bukovec, VP of Data and Analytics at AWS, and extracted the engineering philosophy underneath the product. Not the marketing version. The real one. Here's what actually matters. 1. Hardware failure is not an emergency. It's Tuesday. S3 manages hundreds of exabytes of data across tens of millions of hard drives, spread across 120 Availability Zones in 38 AWS Regions. It currently stores over 500 trillion objects. At that scale, something is always failing. A disk here. A rack there. An availability zone every now and then. The math is unforgiving. So the S3 team made a deliberate architectural decision early: stop treating failure as an exception. Design it into the system as the baseline state. This means dedicated auditor and repair microservices run continuously in the background — not when something goes wrong, but always. They scan the entire fleet, inspect every byte of data, detect discrepancies, and trigger repairs automatically. No human in the loop. No incident ticket. No war room. There's also a specific property they engineer for called crash consistency — the system is designed so that after any fail-stop event, it automatically returns to a valid state without manual intervention. The failure happens. The system continues. Those two things are not in conflict. The system heals itself because it was designed to assume it's already sick. If you're building distributed systems and your failure handling is reactive — you only respond after something breaks — you've already lost. Design the repair loop as a first-class citizen, not an afterthought.

2026-06-05 原文 →
AI 资讯

AWS Types of Databases: The Complete 2026 Guide for Developers

If you’re building a generative AI chatbot, global e-commerce platform, or industrial IoT solution in 2026, picking the wrong database can sink performance, blow your budget, or delay your launch. For years, teams relied on one-size-fits-all relational databases for every workload, but modern applications demand specialized tools for specific use cases. AWS solves this challenge with 15+ purpose-built database engines across 8 distinct categories, optimized for performance, scalability, and cost efficiency for every imaginable workload. This guide breaks down every AWS database type, its core features, real-world use cases, and 2026 best practices to help you choose the right tool for your next project. Table of Contents Why Purpose-Built Databases Are the Standard in 2026 AWS Database Categories: A Deep Dive 2.1 Relational Databases 2.2 Key-Value Databases 2.3 In-Memory Databases 2.4 Document Databases 2.5 Graph Databases 2.6 Wide Column Databases 2.7 Time-Series Databases 2.8 Data Warehouse 2026 AWS Database Best Practices Common Mistakes to Avoid When Choosing AWS Databases Conclusion References Why Purpose-Built Databases Are the Standard in 2026 Modern workloads have vastly different requirements: a generative AI RAG system needs fast vector search, an IoT fleet needs high-throughput time-series data ingestion, and a global SaaS platform needs multi-region consistency with zero downtime. A single relational database cannot meet all these needs without tradeoffs. AWS purpose-built databases eliminate these tradeoffs by: Supporting open standard APIs to avoid vendor lock-in Offering serverless deployment options for all major engines Including built-in AI/ML and vector search capabilities Delivering up to 99.999% availability for mission-critical workloads Reducing TCO by 25-48% compared to self-managed or generic alternatives (per IDC) AWS Database Categories: A Deep Dive Relational Databases Relational databases store data in structured tables with fixed schema

2026-06-05 原文 →
产品设计

30+ Updates per Second per Account: Uber Scales Ledger Processing with Batching

Uber introduced a high-throughput financial ledger processing system designed to handle hot account write contention at scale. Using 250ms batching, Redis coordination, and optimistic atomic updates, the system supports 30+ updates per second per account while preserving consistency and auditability, reducing multi-hour processing pipelines to minutes in its distributed accounting infrastructure. By Leela Kumili

2026-06-04 原文 →
AI 资讯

How I Built a Hotel AI Platform in Go (And Every Honest Technical Debt We're Carrying)

Building Stayzr meant solving real problems: PMS integration, high-throughput webhook handling, and AI that actually knows your property. Here's how we architected it. The Stack (What's Running in Production) Backend: Go 1.23 with Fiber framework, pgx/v5 connection pooling, Bun ORM over PostgreSQL, Redis for caching/sessions, OpenTelemetry for tracing AI Agents Service: Python 3.11 + FastAPI (Uvicorn), LangChain primitives, Qdrant for knowledge base, ChromaDB for conversation memory Frontend: Next.js 15 / React admin UI + marketing site 3rd-party Integrations: Mews (PMS), WhatsApp Business/Meta, Resend + Postmark (email), Azure Blob Storage (files), Gemini + OpenAI (LLM + embeddings), Infisical (secrets), SigNoz + Oneuptime (observability) It's a polyglot monorepo: Go where throughput and concurrency matter (API, dispatch, sync), Python where the LLM/RAG ecosystem lives. Why Go Over Python/Node/Java? For the parts handling concurrent I/O — PMS sync workers, email dispatch worker, webhook fan-in — Go's goroutines + channels let us run in-process worker pools without pulling in a broker or heavyweight async runtime. The dispatch worker is a for{ select } loop over a ticker and wake channel — simple and effective for our use case. We kept Python only for the agents service because that's where LangChain, Gemini/OpenAI SDKs, and vector-store clients live. The honest answer: Go for systems work, Python where AI tooling requires it. Multi-Tenancy: Row-Level Isolation Shared database, shared schema, row-level isolation by organizationId . Every tenant-scoped table carries an organizationId , with a TenantDB wrapper in the data layer that auto-appends organization_id = $N to queries. Middleware ( MultiTenantContext / RequireTenant ) resolves the org from the X-Organization-ID header, query param, cookie, or JWT claim. Below org we scope further by propertyId (a hotel can have multiple properties). The AI memory store enforces the same boundary differently — every guest's co

2026-06-04 原文 →
AI 资讯

Stop Hardcoding 301s: How I Built a Redirect Engine That Doesn't Break at 2 A.M.

Marketing wants an A/B landing page by Friday. Product wants to gracefully deprecate a legacy API without breaking old mobile clients. Growth wants ten thousand short links, and Ops does not want ten thousand Nginx edits. At some point, a single return 301 in your CDN stops being a configuration problem and becomes a routing product . Someone has to answer, on every HTTP request: Given this host, path, query, and method—where does this visitor go, and with which status code? I built that answer as a pipeline at LinkShift . Not a pile of special cases, but a fixed sequence of steps that runs the exact same way for real visitors and for the tools you use to test rules before rollout. Here is how I designed a deterministic redirect engine, the pipeline that powers it, and the edge cases that kept me up at night so they don't have to keep you up. Why "Usually Works" Is Not Enough A redirect engine fails quietly. The browser follows a broken 302 and nobody files a ticket. The damage shows up days later in analytics: wrong campaign, wrong locale, or an infinite loop that only appears when two rules on the same host point at each other. What I wanted early on was boring, bulletproof reliability: Same inputs → same decision. Two engineers simulating the same request against the same rule set should get the same target URL. Same resolution logic everywhere. Matching and destination resolution must not diverge between the "Test Rule" button in the dashboard and an actual click on a custom domain. Guards before cleverness. Rate limits and access checks run before anyone evaluates a ternary conditional in a destination string. Expressiveness is easy. Ordering is what saves you in production. The Pipeline, Told as a Story Picture a request hitting a hostname. Before the engine asks "which rule wins?", the request walks through a strict corridor of gates. Only then does it enter the rule loop. Gate 1: The Host Has to Exist If the hostname does not resolve to a domain or LinkShift

2026-06-04 原文 →
AI 资讯

The Future of Code Documentation Is Atomic Context, Not Essays

Most teams don’t have a documentation shortage. They have a context shortage. The average developer spends 20 minutes hunting for context before a one-line change. Their AI pair-programmer spends that same time hallucinating. I’ve been thinking a lot about what documentation actually needs to become in an AI-assisted world. The answer isn’t “more docs.” It’s not even “AI-generated docs.” It’s Atomic Context Documentation : smaller, sharper, verified context that stays near the code and helps both humans and AI work on the system safely. In my new article, I break down: Why traditional docs fail the “second reader” (AI) From context to results 👉 Full Article If you’ve ever watched AI confidently guess wrong about your codebase, this one’s for you.

2026-06-04 原文 →
AI 资讯

Cursor Developer Habits Report 2026: Why AI Coding Needs Governance Infrastructure

Cursor's Developer Habits Report is one of the clearest signals yet that AI coding has crossed from individual productivity into software-delivery infrastructure. The headline numbers read as a story about speed: more code per week, larger PRs, deeper agent sessions, more changes committing without manual review. The deeper implication is governance -- whether teams can preserve architectural intent while generation, review, automation, and commit flows all accelerate at once. The velocity curve is now measured, not anecdotal. For two years the claim that AI coding is accelerating rested mostly on vibes and vendor decks. Cursor's data turns it into telemetry. And read as an operations document rather than a marketing one, that telemetry describes a structural shift: software delivery is getting harder to govern, not just faster to produce. This is not a critique of Cursor. The report is strong validation. Cursor proves the velocity curve with numbers most of the industry only gestured at. The point of this essay is what sits on the other side of that curve. What the Cursor Developer Habits Report Shows The inaugural Cursor Developer Habits Report (Spring 2026 edition), published by Cursor (Anysphere, Inc.), draws on Cursor usage data rather than survey responses. It captures the transformation across five themes -- developer acceleration, the economics of intelligence, the power user gap, the rise of context, and the shift to automation. The headline figures: 3.6K -> 8.6K lines added per developer per week -- the per-developer code volume rose from 3.6K (Jan 2025) to 8.6K (May 2026), with growth accelerating since the start of 2026. 125.86 -> 345.02 lines per PR at p75 -- lines added per pull request at the 75th percentile rose roughly 2.5x year over year (Jan 2025 to May 2026). Developers are taking on larger units of work in a single PR. 8% -> 13.8% mega PRs -- the share of PRs with at least 1,000 changed lines grew from 8% (Jan 2025) to 13.8% (May 2026). ~30% mor

2026-06-04 原文 →