AI 资讯
Stop Over-Optimizing Performance: The Modern Full-Stack Toolkit in 2026
Let’s face it: if your current frontend optimization strategy still involves manually auditing codebases for missing useMemo hooks, micro-managing dependency arrays, or aggressively fighting layout shifts with complex client-side state management, you are wasting your engineering leverage. As we cross the midpoint of 2026, web framework architecture has quietly undergone a massive shift. We have firmly moved out of the era of manual performance tweaking and entered the era of automated, compile-time optimization . The goal of modern development is no longer just shipping fewer kilobytes to human users—it's also about optimizing data chunk delivery for AI web crawlers that evaluate your site in real-time. Here is how the modern full-stack ecosystem redefined performance this year, and what you should focus on instead. 1. The Death of Manual Memoization (Thanks, React Compiler) For years, React developers bore the cognitive load of rendering performance. One misplaced reference and your entire component tree re-rendered down to the root. With the absolute maturity and default adoption of the React Compiler across production frameworks, that paradigm is officially legacy code. The compiler handles component memoization automatically at the build step by analyzing javascript structures directly. // ❌ THE OLD WAY (Pre-2026 Manual Overhead) const ExpensiveComponent = memo (({ data }) => { const processedData = useMemo (() => computeHeavyMetrics ( data ), [ data ]); const handleAction = useCallback (() => { ... }, []); return < DataGrid items = " {processedData} " onAction = " {handleAction} " /> ; }); // THE MODERN WAY (Zero Performance Boilerplate) export function ModernComponent ({ data }) { const processedData = computeHeavyMetrics ( data ); const handleAction = () => { ... }; return < DataGrid items = " {processedData} " onAction = " {handleAction} " /> ; } Because the compiler injects optimization markers directly into the output code, human engineers can stop arguin
AI 资讯
4-Phase Orchestration: 5 Universal Agent Skills with YAML-Driven Rules, Composable Components, and Graceful Degradation
4-Phase Orchestration: How 5 Universal Agent Skills Achieve YAML-Driven Rules + Composable Components + Graceful Degradation When you're hard-coding your 3rd scoring if-else, maybe it's time to ask: can I move the rules into YAML and let the business change config instead of code? The Problem: Why Do Agent Skills Keep Reinventing the Wheel? Every Agent developer faces the same dilemma — every business scenario rewrites a similar pipeline : Scoring: Extract features → Match rules → Calculate score → Generate report Complaints: Extract ticket → Cross-validate → Pinpoint root cause → Archive Querying: Understand intent → Build SQL → Execute query → Render chart The skeleton is identical. What changes is only the "content" at each step. Yet every team builds pipelines from scratch. teleagent-skills offers an answer: freeze the skeleton into 5 universal Skills with 4-Phase orchestration, and let business changes live in YAML config only . Architecture Overview: 4-Phase Pipeline + 5 Universal Skills 2.1 4-Phase Orchestration Diagram ┌─────────────────────────────────────────────────────────────┐ │ Upper Business Skill │ │ (Scoring Engine / Evidence Chain / Data Aggregator / ...) │ └──────────┬──────────┬──────────┬──────────┬────────────────┘ │ │ │ │ ▼ ▼ ▼ ▼ ┌──────────┐┌──────────┐┌──────────┐┌──────────┐ │ Phase 1 ││ Phase 2 ││ Phase 3 ││ Phase 4 │ │ Extract ││ Analyze ││ Generate ││ Archive │ │ ││ ││ ││ │ │Info- ││Data- ││Report- ││Archive- │ │Extractor ││Analyst ││Generator ││Manager │ └────┬─────┘└────┬─────┘└────┬─────┘└────┬─────┘ │ │ │ │ ▼ ▼ ▼ ▼ ┌─────────────────────────────────────────────────┐ │ JSON Contract (Structured Data Contract) │ │ phase1_output.json → phase2_input.json → ... │ └─────────────────────────────────────────────────┘ Core idea: each Phase is an independent component, and Phases pass data only through JSON contracts . Any Phase can be replaced (want a more powerful Analyzer? Swap it out) Any Phase can be skipped (degradation mode) Any Phase c
AI 资讯
Python Selenium Architecture
**Python Selenium Architecture** Introduction: Selenium automates web browsers. The Python Selenium architecture consists of four main components that work together to control a browser. 1.Selenium Client Library (Python Language Binding) Python developers write automation scripts using the standard Selenium API. This library converts your Python code into a standardized format. It sends these commands as programmatic requests to the browser driver. 2.W3C WebDriver Protocol/JSON Wire Protocol This is the communication channel between the code and the driver. Historically, Selenium used the JSON Wire Protocol over HTTP. Modern Selenium (Version 4+) uses the standardized W3CWebDriver Protocol. Commands and responses are transferred directly without any middle translation. 3.Browser Drivers Every web browser has its own specific executable driver. Examples include ChromeDriver for Chrome and GeckoDriver for Firefox. The driver acts as a secure HTTP server that receives commands. It passes these requests directly to the browser and returns results. 4.Web Browsers This is the final layer where execution happens physically. Supported browsers include Google Chrome, Mozilla Firefox, Microsoft Edge, and Safari. The browser receives commands through its native OS-level API. It executes actions like clicking, typing, or fetching text. Significance of Python Virtual Environments: A Python Virtual Environment is an isolated directory containing its own Python installation and independent packages. It prevents dependency conflicts across different software projects. Conclusion: Why It Matters? Avoids Dependency Hell: Different projects can use different versions of the same library. Protects System Python: Prevents breaking system-wide packages required by your operating system. Ensures Reproducibility: Allows developers to easily recreate the exact environment on other machines. No Admin Privileges Needed: Allows installing packages without sudo or administrator rights. Real-Wo
开发者
Gamifying the Game: How Micro-Betting and Smart Stadiums Keep Fans Hooked
The days of simply sitting in a plastic seat, eating a lukewarm hot dog, and watching a game with nothing but a physical scoreboard for context are officially over. Today, the sports world is undergoing a massive, tech-driven paradigm shift. Stadiums are no longer just concrete arenas; they are hyper-connected, edge-computing data centers . At the same time, live broadcasting is shifting from a passive, one-way viewing experience to an interactive, gamified reality. By combining next-generation stadium infrastructure with real-time, algorithmic micro-betting, the sports industry has figured out how to extract attention—and revenue—from fans every single second of a match. Here is a deep dive into the tech stack and engineering principles turning modern sports into a live-action video game. 1. The Smart Stadium Tech Stack: Infrastructure at Scale To engage tens of thousands of fans simultaneously in a single physical location, stadiums require enterprise-grade infrastructure capable of handling massive spikes in data throughput. When a touchdown is scored or a goal is disallowed, thousands of devices instantly pull video replays, refresh betting odds, and upload content. High-Density Wi-Fi 6E/7 and Private 5G Networks Traditional cellular networks quickly collapse under the density of 70,000+ fans. Modern venues like SoFi Stadium in Los Angeles or Allegiant Stadium in Las Vegas solve this using localized high-density networks: Wi-Fi 6E/7: Operating in the 6 GHz spectrum, these routers utilize wider channels (up to 320 MHz) and MU-MIMO (Multi-User, Multiple-Input, Multiple-Output) to beam dedicated streams to thousands of individual devices simultaneously without interference. CBRS (Citizens Broadband Radio Service) & Private 5G: Teams deploy private 5G networks using millimeter-wave (mmWave) technology. This provides ultra-low latency (< 10ms) and massive bandwidth, reserving dedicated lanes for stadium operations, point-of-sale systems, and premium fan applications.
AI 资讯
"How to Stop AI Agent Skills, Hooks, and Cron Jobs from Silently Conflicting Over Where They Run and What Data They Trust"
Originally published on hexisteme notes . Make every skill, hook, and scheduled job declare four invariants before it ships — Locality (where it can run), Source-of-truth (which facts it owns or borrows), Cross-ref (what depends on it and what it depends on), and Trigger-measurability (whether its trigger is observable at runtime or hidden in external state) — and refuse to hand off any component that leaves one undeclared, because an undeclared assumption is exactly the seam where two components silently disagree. Two separate runtime leaks surfaced in a single audit session, and both traced back to the same root cause: a component that never declared its assumptions. One read configuration from a file that had stopped being the source of truth (so it always returned a stale default); the other was a scheduled job pointed at a remote sandbox while its prompt referenced local-only paths — caught minutes before registration, where any later and it would have billed compute and produced nothing. Neither was a coding bug. Both were missing declarations. The failure mode: components that work alone but leak when combined When you build an AI agent system out of small parts — skills the model loads on demand, hooks that fire on lifecycle events, cron jobs and scheduled routines that run unattended, helper scripts, config profiles — each part usually gets tested in isolation. It works. You move on. The trouble is that "it works" only proves single-shot correctness; it says nothing about whether the part's assumptions agree with the rest of the system. Every component carries hidden assumptions: where it runs (local machine vs. a remote sandbox), which facts it treats as authoritative, what other components it silently depends on, and what its trigger actually measures. When those assumptions go undeclared, conflicts stay invisible until they surface to the user as a flaky, hard-to-trace symptom — the kind that feels like a vicious cycle because every fix in one place re-o
AI 资讯
Article on Modelling, Joins, Relationships and Different Schemas In Power BI
Data Modeling, Relationships, and Schemas in Data Analytics In the fields of data analytics, data warehousing, and database management, modeling and schema design are the fundamental pillars used to organize and query information efficiently. This article provides a comprehensive guide to these core concepts. 1. Data Modeling Data modeling is the architectural process of designing how data is stored, interconnected, and accessed within a system. Core Questions Addressed: Storage: What specific data points need to be captured? Structure: How should individual tables be organized? Connectivity: How do these tables interact with one another? Levels of Data Models: Conceptual Model: A high-level business perspective focusing on entities and their relationships, devoid of technical specifications. Logical Model: Defines specific attributes, keys, and relationships. It is independent of the Database Management System (DBMS). Physical Model: The actual implementation within a database, including technical details like indexes, partitions, and storage requirements. 2. Relationships Relationships define the logic of how data in one table corresponds to data in another. One-to-One (1:1): A single record in Table A relates to exactly one record in Table B. One-to-Many (1:M): The most common relationship; for example, one Customer can place many Orders . Many-to-Many (M:M): Multiple records in one table relate to multiple records in another. This requires a Junction Table (Bridge Table) to function. Example: One Student can enroll in many Courses, and one Course contains many Students. 3. SQL Joins Joins are used to combine rows from two or more tables based on a related column. Join Type Description Inner Join Returns only the records that have matching values in both tables. Left Join Returns all records from the left table and the matched records from the right. Right Join Returns all records from the right table and the matched records from the left. Full Outer Join Returns
AI 资讯
Can you build observability ingestion on S3 alone — no Kafka, no disks, no coordination layer?
TL;DR — A Kafka + Flink + OTel ingestion pipeline cost us ~$700–800/month at 10 MB/s. We rebuilt it as a single binary where the data, the write-ahead log, and the Iceberg catalog all live in S3 alone — no Kafka, no local disks, no coordination service — for ~$100/month . Here's the design. Self-hosted observability sooner or later runs into the problem of storing state. Query load, CPU, and data volume can all be handled by scaling out, but the stateful layer is something you have to operate by hand. At first it's almost unnoticeable: a disk degrades here, replication falls behind there, a recovery hangs somewhere else. As the data grows, incidents stop being one-offs and start to recur. At some point your observability stack - whether it's Grafana Loki, Elastic, or ClickHouse - starts demanding the same attention as a full-blown database that you're on the hook for. Kubernetes operators cover some of these cases, but operating the state is still on you. Managed solutions take that burden away and bring their own: rising costs, ingestion-pipeline constraints, and limits on retention and cardinality. But if you'd rather not sign up for the constant operational grind - or live with the constraints of managed solutions - it's worth asking: can we take the stateful part out of operations entirely? Storage and format The first candidate for offloading storage responsibility is Amazon S3. S3 gives you what local disks can't: fault tolerance and practically unlimited scale, with no storage to manage yourself. It isn't free, though: data-access latency goes up, and you pick up separate costs for API operations. For OLTP workloads that's a dealbreaker. For observability workloads - which are dominated by sequential writes and analytical reads - these trade-offs are often acceptable. At first glance, this problem is already solved. Loki , for example, uses S3 as its primary storage. But according to Loki's public documentation (v3.6.x) at the time of writing, Loki doesn't re
AI 资讯
Learn DynamoDB by running it - accesspatterns.dev
I've been building on DynamoDB since around 2015, and these days I build tools for it: dynoxide , a DynamoDB engine, and Nubo , a native client. So I'm not neutral about it. It's the first database I reach for, and with reason - the operational overhead is close to nil, no connections to pool or instances to size, and it holds the same single-digit-millisecond reads whether the table has a thousand items or a billion. The data modelling is a craft, and a satisfying one. It's also one of the harder databases to learn, and that's the part I keep coming back to. DynamoDB punishes the instincts you bring from SQL. You don't normalise and join at read time; you work out the questions your app will ask first, and shape the data around those access patterns, until one table answers all of them. It's a real shift in how you think, and it's where a lot of people bounce off - it feels backwards right up until it clicks. The people who teach it best all teach it the same way. Alex DeBrie's The DynamoDB Book , the arc.codes team's examples, Rick Houlihan's re:Invent talks - the legendary ones, where he models half a dozen access patterns onto a single table at a hundred miles an hour - none of them hand you rules to memorise. They show you patterns and make you run them. I learned a lot of my DynamoDB from all three, and it stuck because I was building as I went. That last part is the bit that's hard to come by on your own. Reading about an access pattern and having it in your fingers are different things, and to run one - build the table, write the items, fire the query and see what comes back - you need an AWS account, or a local emulator installed and seeded. Enough friction that plenty of people read about single-table design without ever building one. There was a second thing pulling the same way. dynoxide had learned to run in the browser only last month, compiled to WebAssembly with no server behind it, and it was a preview I didn't fully trust. What it needed was a real
AI 资讯
Stop Chunking Documents: The Open Knowledge Format (OKF) for Enterprise AI
Originally published on PrepStack . Everyone's first RAG pipeline is the same four boxes: documents, chunk, vector DB, LLM. It demos in an afternoon and then quietly betrays you in production — stale answers, no relationships, no governance, and a model guessing from fragments. The fix is not a bigger vector index. It is to stop storing documents and start storing knowledge . That is Open Knowledge Format (OKF). To be clear up front, because the title is deliberately provocative: OKF does not kill embeddings. Vectors still do the recall. What OKF kills is blind chunking — slicing opaque documents into context-free fragments and hoping cosine similarity reassembles meaning. On Mattrx , a multi-tenant marketing-analytics SaaS (.NET 9 + Azure SQL + a Python FastAPI AI service), replacing blind chunking with OKF + a Context Engine took the assistant's hallucination rate from 18% to 3% and stale-answer rate from 11% to 1.5% . TL;DR Dimension Documents → chunk → vector DB (before) OKF + Context Engine (after) Unit of knowledge Opaque chunk of text Typed, governed knowledge unit Structure None — chunks are islands Metadata + relationships + schemas Freshness Snapshot, rots silently valid_until + live API refs Rules Buried in prose, ignorable First-class data the engine enforces Retrieval Top-k cosine Hybrid + vector + graph Multi-hop questions Unanswerable Answered via relationships Results after the rebuild: Knowledge base restructured into ~11,000 OKF units (Markdown + metadata + relationships + APIs + schemas + business rules). Hallucination 18% -> 3% ; faithfulness 0.96 ; answer-relevance 0.91 . Context tokens/call 14k -> 3.5k — structure lets the engine attach the right thing, not everything. Outdated-answer rate 11% -> 1.5% ( valid_until + metadata freshness). Multi-hop questions unanswerable -> answered via graph retrieval. Deprecated-plan recommendations recurring -> 0 (business rules enforced as data). The one mental shift: a chunk is a fragment of text with no id
AI 资讯
Why AI Hates Modern Frameworks (and Loves Web Standards)
There's a paradox nobody wants to say out loud: the same frameworks companies pick because they're "enterprise-ready," "scalable," and "industry standard" are, for an LLM writing code, a minefield. Angular , React with its whole ecosystem, Nx with its monorepos: these are powerful tools, built by humans to coordinate teams of humans on massive codebases. And for that purpose, they're often the right choice — if your primary constraint is coordinating hundreds of engineers over a decade, the conventions and tooling of an established framework earn their keep. But there's a second actor in the room now. When the one writing the code is an AI, the very traits that make these frameworks "robust" turn into pure friction. The argument I'm making isn't "Angular and React are obsolete." It's narrower: we've historically optimized software architecture for human cognition, and LLMs introduce a different cost model that may favor simpler, more deterministic architectures — at least in some domains. Let's break down why, in three points. 1. The Token Tax (and the Cognitive Bottleneck) An LLM doesn't "understand" code the way we do — it processes it token by token, and every token costs something: money, latency, and context window that could otherwise be spent reasoning about the actual problem. Try asking an AI to generate a simple input form in a typical Angular/Nx context. To do it "properly" it has to: create the component (separate .ts , .html , .css files) declare the @Component with all its metadata import and wire up the right modules possibly touch an NgModule or a standalone-components config navigate 4-5 folder levels inside a typical Nx structure ( apps/ , libs/ , feature-x/ , data-access/ , ui/ ...) All of this before writing a single line of actual logic. That's architectural complexity that, for a human, pays for itself over time thanks to tooling, autocomplete, and internalized conventions. For an LLM generating text sequentially, it's a tax paid on every singl
AI 资讯
AWS Launches Lambda MicroVMs for Isolated Agent and User Code Execution
AWS launched Lambda MicroVMs, a new serverless compute primitive that runs each user session or AI agent in its own Firecracker virtual machine with hardware-level isolation, snapshot-based rapid launch, and state preservation for up to eight hours. Reddit community analysis found the minimum setup costs $3.03/day, roughly 9x Fargate spot pricing. By Steef-Jan Wiggers
AI 资讯
Article: Scaling Java-Based Real-Time Systems: The Hidden Tradeoffs of Event-Driven Design
Event-driven architecture promises scalability, but in Java-based real-time systems the tradeoffs only surface in production. Drawing on a Java/Kafka contact center platform handling 80k BHCC across 10k agents, this article details where the design breaks down—state management, partition limits, deduplication, JVM tuning, cascading consumer failures—and the Redis-backed patterns that fixed each. By Sagar Deepak Joshi
AI 资讯
The Illusion of the Clean Slate
Every engineer has fantasized about it: starting over. Throwing out the old system and building something clean. No legacy constraints. No accumulated compromises. Just pure, intentional design. It never works that way. You can delete all the code. You can architect from scratch. You can make the best technical decisions possible. But you can't delete the organizational memory. You can't unlearn what the last system taught you. You can't escape the patterns that already run through the business, the workflows people have shaped themselves around, the problems you've already paid the cost of understanding. The new system will look clean. But it will be haunted. What rewrites actually inherit A rewrite isn't a fresh start. It's archaeology pretending to be innovation. The constraints don't go away. The old system wasn't overcomplicated because engineers were bad. It was overcomplicated because of customer requirements, regulatory expectations, performance demands, and edge cases that took years to discover. A fresh rewrite finds all those edge cases again. Slower this time, because you don't have documentation—you have broken customers and escalations. The system gets layers of protection again, but now it looks like paranoia instead of learned caution. The organizational memory becomes invisible. Someone fought for that data model three years ago. There was a reason. A business rule that couldn't be violated. A data consistency requirement that cost a quarter to figure out. The new system doesn't have the battle scars that explain why things are the way they are. So they get rebuilt differently, until they hit the same requirement at 2am on a Saturday. The workflow is already baked in. Users have shaped their behavior around the old system. Sales has built their pitch around certain capabilities. Support has written documentation and runbooks. Customers have automation that depends on specific behaviors. The new system is technically cleaner, but it forces change on
AI 资讯
AI Chunking Changes How We Should Build Content Pages
Traditional content pages are often designed for a linear reader. The introduction sets context, the middle develops the idea, and the conclusion ties everything together. AI retrieval does not always work that way. A system may identify smaller content units, pull the most relevant section, compare it with other sources, and use that fragment to support an answer. The full page still matters, but the retrievable blocks inside the page matter just as much. A useful Tumblr post explains the idea in simple terms: https://www.tumblr.com/digitalisedsoul/820825642809573376/ai-does-not-read-your-content-like-a-human?source=share For Dev Community readers, the pattern is familiar. Poorly structured inputs lead to weaker outputs. If content is dense, vague, or dependent on surrounding paragraphs, it becomes harder to extract and reuse. If content is modular, clear, and properly scoped, retrieval becomes easier. Marketing teams can learn a lot from this. A strong content page should behave like a set of well labelled components. Each section should answer a specific question. Headings should be descriptive, not decorative. Paragraphs should avoid vague references such as the above point or this approach when the section may be read independently. Definitions should appear close to the terms they explain. Examples should include enough context to stand alone. Proof should be written as text, not only displayed as graphics. Internal links should connect related concepts in a way that helps both readers and systems understand the topic map. A page about AI search visibility, for example, should not only include one broad explanation. It should break the topic into useful blocks: what AI visibility means, why AI systems retrieve passages, how source trust works, what makes content reusable, and how brands should measure answer presence. Each block becomes a possible answer unit. That structure does not weaken the reader experience. It improves it. Developers, marketers, and busi
AI 资讯
Co-locating Data and Application Code for a 4.5x Performance Gain
Modern web application architectures typically run each layer in its own process, like a NodeJS server and database both running in their own processes. They communicate via a network connection or localhost socket. This separation introduces protocol overheads, TCP stack latency, and data serialization/deserialization costs on every single query. Planck is designed around the concept of Zero-Distance Architecture that co-locates data and application code. It combines the database engine and a WebAssembly application runtime into a single, unified process. By running your application code directly inside the database process, database calls become direct in-memory function calls rather than network round-trips. This article provides a practical guide to getting started with Planck. We will look at the core toolchain, walk through setting up a self-contained local benchmark, compare its performance against a NodeJS, ExpressJS, MongoDB stack, and look at how to build more complex features. The Toolchain: Planck, planctl, and Workbench Running and managing a zero-distance app requires three main components. Planck itself is the core binary. It functions as both the storage engine (a WiscKey-style, LSM-tree-based engine) and the WebAssembly host. Instead of running a database in one process and your application server in another, you run a single Planck process. It loads your compiled WebAssembly application directly into its memory, running it in the same process space as the database. To manage this runtime, you use planctl. This is the command-line tool for developers. It handles the compilation of your code, packages it, and deploys it to the Planck host. It also allows you to perform database operations, like creating stores and defining indexes, export/import, backup/restore directly from your terminal. Finally, there is the Workbench. This is a web console that comes built into the platform. It provides a visual dashboard to monitor your applications, view databa
AI 资讯
Resolve the tenant from the user, not the request
TL;DR A multi-tenant app was resolving the active tenant from the request (subdomain/header) instead of the authenticated user . That makes the client the source of truth for "which tenant am I" — the wrong place for it. Fix: derive the tenant from the user's organization membership, enforce it in middleware, and fail closed. One test locks the behaviour. The bug, in one sentence The request was telling the app which tenant to load, and the app believed it. In a multi-tenant SaaS, every query is implicitly scoped: "give me this tenant's dashboards." If the tenant ID comes from something the client controls — a subdomain, a header, a route param — then the scoping is only as trustworthy as the client. That's a leak waiting to happen. Where the trust should live Think of it like a building pass. The request is someone saying "I'm here for floor 9." The membership record is the pass that says which floors you're actually allowed on. You check the pass, not the claim. Before After Source of truth request (subdomain / header) user's organization membership Who decides the tenant the client the server Failure mode user can land in a tenant they don't belong to resolution fails closed Testable? hard — depends on request shape yes — depends on the user The shape of the fix Resolve the tenant from the authenticated user's organization, in one middleware, before anything tenant-scoped runs: final class SetTenantContext { public function handle ( Request $request , Closure $next ): Response { $org = $request -> user () ?-> currentOrganization (); // No org, no tenant context. Fail closed, never guess. abort_if ( $org === null , 403 , 'No organization context.' ); Tenancy :: setCurrent ( $org -> tenant ); // server-derived, not request-derived return $next ( $request ); } } The key line isn't the setCurrent() — it's that the value comes from $request->user() , not from $request . The user is authenticated; the subdomain is not. request ──> [auth] ──> [SetTenantContext] ──> tena
AI 资讯
When a KPI reads 163 billion instead of 819
TL;DR A metrics engine had two query paths — a SQL push-down for big datasets, an in-memory aggregator for small ones. They drifted. The push-down path bound a metric parameter but never added it to the WHERE . With several metric series in one dataset, every query summed across all of them. A KPI that should read 819 read 163,667,603,769 . Fix: put the metric_key predicate in the shared base WHERE so every compile path inherits it, and regression-test both paths assert it. The setup: two paths, one contract A lot of analytics layers compute the same number two ways. For a big dataset you push the aggregation down to the database. For a small one — a preview, a draft dashboard — you pull the rows and aggregate in memory. Faster path, correct path. Both are supposed to return the same value. That's the contract. The dataset stores rows keyed by a metric_key , because one dataset can hold several series at once — say a plain row count and a count-distinct. Each series lives in the same table, told apart only by its key. The bug: a bound param is not a filter The in-memory aggregator filtered by metric_key correctly. The SQL compiler bound a metric parameter into the query... and never referenced it in the WHERE . With a single series in the dataset, it worked by accident — there was nothing else to sum. Add a second series and the math quietly breaks: the query sums across every series. In this case the second series stored hashed values around 1.9 billion each, so the KPI ballooned from 819 to 163 billion. Before After metric value bound, unused bound WHERE predicate (none on metric) metric_key = {metric:String} 1 series in dataset correct (by luck) correct N series in dataset sums across all isolated The lesson is small and easy to miss: binding a parameter only makes the value available — it does nothing until a predicate references it. When one path already returns sane-looking numbers, nobody goes looking. The real fix is parity, not a patch You could bolt the pr
开发者
Dev Log: 2026-06-29
TL;DR Two threads today: an organization layer on top of an existing multi-tenant app, and driver-based password-reset backends in an identity portal. Both came down to the same idea — put the source of truth in the right place, then test it. Multi-tenant app: an organization layer above tenancy The product already had tenancy. What it lacked was a human-friendly layer on top: organizations users actually belong to, can switch between, and manage. What landed: Area Change Org switcher A sidebar switcher to move between organizations you belong to Management Create/update org, invitations, ownership transfer Tenancy Resolve the active tenant from the user's org — closed a leak UI Dark-mode pass + responsive fixes across the org views Dashboards Richer per-widget configuration from the UI The standout is the tenancy fix: the active tenant was being resolved from the request instead of the authenticated user. I pulled that into its own focused post — "Resolve the tenant from the user, not the request." Short version: if a value scopes data, it can't come from something the client controls. Identity portal: make the reset backends swappable The password-reset flow needed to support more than one backend, and let an admin decide the order they run in. Classic case for a driver-based abstraction — a contract plus interchangeable drivers, picked at runtime from config. interface PasswordResetBackend { public function reset ( User $user , string $password ): void ; public function name (): string ; } Two optional backends came back as drivers behind that contract, and the run order is now admin-reorderable instead of hard-coded. Adding a third backend later is a new class + a config line — no touching the flow itself. The other half of the day was unglamorous but necessary: the test suite had drifted — stale tests for removed features, and env leakage between tests (one test's state bleeding into the next). Fixed the leakage, deleted the dead tests, and the suite is honest
AI 资讯
Dev Log: 2026-06-28
TL;DR Centred a sidebar brand mark in the collapsed rail (open-source starter kit) — pure CSS, no JS. A CRM app got a "daily cockpit" dashboard (hot leads + overdue follow-ups) plus a full favicon/PWA icon set. An analytics product's ingest pipeline learned to handle messy uploads — files with no date column and no numeric measure — and a nasty metrics bug got squashed. A spread day across three repos. Quick tour. Centring a collapsed sidebar logo (CSS only) Kickoff , my open-source Laravel starter kit, had a small visual snag: when the sidebar collapses to a narrow rail, the header switches to a column — but the brand mark sat off-centre. The content area is ~72px, yet the logo kept its width and a leftover space-x margin, nudging it left of the nav icons. No JavaScript needed. Make the logo and toggle full-width, centre their content, and zero the leftover child margins when collapsed: [ data-flux-sidebar ][ data-collapsed ] .sidebar-header .app-logo { width : 100% ; justify-content : center ; padding-inline : 0 ; } /* kill the leftover space-x margin pushing it off-centre */ [ data-flux-sidebar ][ data-collapsed ] .sidebar-header .app-logo > * { margin : 0 ; } Lesson: when a flex container changes direction, old horizontal margins don't disappear — they just push things in the new axis. Tag the element, scope the override to the collapsed state, done. A CRM "daily cockpit" A CRM app I work on got a dashboard rebuild: instead of a generic landing screen, the first thing you see is what needs action today — hot leads and overdue follow-ups. The cockpit framing matters more than the widgets: surface the work, don't make people hunt for it. Also shipped a full favicon/PWA icon set and a branded responsive landing page, with feature tests so the brand pass didn't quietly break routing. Ingest that survives real-world files The bigger chunk of the day went into an analytics/dashboard product's ingest pipeline. Real uploads are messy, so the pipeline now copes with the
AI 资讯
Designing Reliable Queueing and Message‑Broker Layers in PMS Platforms
Modern Property Management Systems depend on continuous data exchange between internal modules and external services. Bookings, calendar updates, guest communication, cleaning tasks, and maintenance triggers all generate operational events that must be processed quickly and reliably. Free PMS platforms such as PMS.Rent rely on robust queueing and message‑broker layers to ensure that these events never get lost and are always processed in the correct order. At the core of this architecture is the concept of distributed message‑broker orchestration, which enables the PMS to scale horizontally, maintain predictable performance, and avoid bottlenecks during peak operational periods. Why Message Brokers Matter A PMS handles thousands of small but critical operations every day. Without a message broker, these operations would compete for system resources, causing delays, blocking workflows, and creating inconsistent states. A broker solves this by: receiving events, storing them durably, routing them to the correct processors, retrying failed operations, ensuring ordered execution when required. This creates a stable foundation for automation and real‑time synchronization. Queue Types Inside a PMS A modern PMS typically uses several queue types: Operational queues for bookings, calendar updates, and guest messages Automation queues for cleaning tasks, reminders, and workflow triggers Synchronization queues for channel managers and external APIs Fallback queues for events that require manual review Each queue isolates a specific category of tasks, preventing unrelated operations from interfering with each other. Distributed Workers Workers are lightweight processes that consume events from queues. They operate in parallel, allowing the PMS to scale dynamically. If the system detects increased load — for example, during high‑season booking spikes — it simply launches more workers. Workers typically perform tasks such as: updating property calendars, generating guest notific