AI 资讯
How to Scale Realtime Duplicate Event Delivery: Node.js Chat Reconnects
Short answer: make the event identity durable, deduplicate at the consumer boundary, and resume from a server-issued cursor; a client-side set alone cannot make a marketplace chat room survive reconnects or an incident-response burst. The constraint is trust. A browser reconnects after a laptop sleeps, a mobile radio changes networks, or a tab is restored from the back-forward cache. It may replay its last request, lose an acknowledgement, or present an event twice. In an incident response dashboard, the same mechanics become dangerous at scale: an alert that appears twice can page two people, while a missing alert can hide the incident. I design the storage boundary first, because a pretty WebSocket demo does not answer either question. Start with an event identity that can outlive a connection Every published event needs an immutable identity scoped to the stream, not to a socket. For a marketplace chat room, I use (room_id, sequence) as the primary key and keep a globally unique event_id for tracing. The sequence is allocated by the room writer, so two reconnecting clients can compare progress without trusting wall-clock timestamps. The payload is deliberately boring. It includes the room, sequence, event ID, type, and data. A client can verify that an event belongs to the room it requested; it cannot mint a higher sequence or widen its token scope. That last rule matters more than transport choice. from dataclasses import dataclass from typing import Any @dataclass ( frozen = True ) class ChatEvent : room_id : str sequence : int event_id : str event_type : str data : dict [ str , Any ] def identity ( event : ChatEvent ) -> tuple [ str , int ]: """ The room sequence is the replay-safe identity. """ return event . room_id , event . sequence Do not use a payload hash as the only key. Two legitimate messages can have identical text, and a producer retry can produce different JSON ordering. Persist the identity and the payload together, with a uniqueness constraint,
AI 资讯
Deploying a static site to Cloudflare Workers
Originally published on indiecore.net . I moved this site off a hosted blogging platform onto Cloudflare, with GitHub Actions doing the building and Cloudflare doing the serving. It costs nothing, deploys in about two and a half minutes, and refuses to publish anything that fails its checks. Getting there took longer than it should have. Here is the setup, and the five things that tripped me up — none of which are obvious from the documentation. The shape of it git push └─ GitHub Actions ├─ build generate the site ├─ verify dead links, missing images, bad metadata, broken redirects ├─ Lighthouse fail if performance/accessibility/SEO drop below budget └─ deploy upload to Cloudflare The important part is that deploy depends on the checks . A broken build never reaches the internet. Pull requests get a preview URL; merges to main go live. The triggers and permissions that make that safe: ci-cd.yml — triggers and permissions name : CI/CD # Build and verify every change; deploy previews for PRs and production from main. # Deploy jobs depend on the quality gates, so nothing ships unverified. on : push : branches : [ main ] # The SEO watch ledger is machine-written, is never part of dist/, and is # committed daily. Deploying the site again for it would be pure noise — and # would re-trigger the SEO ping through workflow_run every single day. paths-ignore : - ' _source/seo-watch.json' pull_request : branches : [ main ] workflow_dispatch : # Least privilege by default; individual jobs elevate only what they need. permissions : contents : read # Supersede in-flight runs for a branch, but never interrupt a production deploy. concurrency : group : ci-cd-${{ github.ref }} cancel-in-progress : ${{ github.ref != 'refs/heads/main' }} env : # wrangler ships as a pinned devDependency; never phone home from CI WRANGLER_SEND_METRICS : " false" permissions: contents: read at the top means every job starts with the minimum, and only the one that comments on pull requests gets more. The c
AI 资讯
X says attackers are targeting user accounts after the launch of X Money
X is investigating a wave of unsolicited password reset emails that it believes may be tied to the rollout of its new payments service.
科技前沿
The Diamond Moon and Other Astronomical Events to See in September 2026
September is full of opportunities to expand your knowledge of the night sky. Mark your calendars.
AI 资讯
OpenAI Is About to Release Its First AI Model With ‘Critical’ Cyber Abilities
The company will give select partners early access to its Astra AI model—so they have time to shore up their defenses.
开源项目
Research roundup: 7 cool science stories we almost missed
"Black hole stars," making cookies from plastic, tiny sound-powered drones, and more.
开源项目
CDC reported then deleted two measles deaths that were questioned by RFK Jr.
Historically, state health departments determine cases and deaths, not the CDC.
开发者
Zstandard einfach erklärt in 2 Episoden — Episode 1
Episode 1: Was in einer ZST-Datei passiertEpisode 1: Was in einer ZST-Datei passiertZST-Dateien begegnen uns immer häufiger bei großen Downloads, Softwarepaketen, Backups und Serverdaten. Sie sind oft deutlich kleiner als die ursprünglichen Dateien und lassen sich trotzdem sehr schnell wieder entpacken. Doch wie funktioniert das? Warum werden Dateien komprimiert? Eine Datei besteht aus Daten. Je mehr Daten sie enthält, desto mehr Speicherplatz wird benötigt und desto länger dauert ihre Übertragung. Kompression versucht, dieselben Informationen mit weniger Daten darzustellen. Beim späteren Entpacken muss daraus wieder exakt die ursprüngliche Datei entstehen. Nach dem Entpacken ist die Datei Bit für Bit identisch mit dem Original. Es wird nichts weggelassen und nichts vereinfacht. Wiederholungen benötigen unnötig viel Platz Betrachten wir diesen Satz: Kleine Katzen kuscheln auf kleinen Kissen, junge Katzen kuscheln auf bunten Kissen und alte Katzen kuscheln auf weichen Kissen.Die folgenden Teile kommen mehrfach vor: A = Katzen kuscheln auf B = KissenWenn wir die wiederkehrenden Textteile durch die Variablen A und B ersetzen, können wir den Satz kürzer darstellen: Kleine A kleinen B, junge A bunten B und alte A weichen B.Damit ist der Text noch nicht vollständig. Zusätzlich müssen wir speichern, wofür A und B stehen: A = Katzen kuscheln auf B = KissenAus diesen Informationen lässt sich der ursprüngliche Satz wiederherstellen. Jedes A wird durch Katzen kuscheln auf und jedes B durch Kissen ersetzt. Das ist bereits die grundlegende Idee der verlustfreien Kompression: Wiederkehrende Daten werden nicht jedes Mal vollständig gespeichert. Stattdessen werden sie einmal gespeichert und anschließend durch kürzere Verweise ersetzt. ### Zstandard verwendet keine Variablen Unsere Variablen A und B dienen nur dazu, das Prinzip verständlich zu machen. Zstandard versteht weder Wörter noch Sätze. Es weiß nicht, was Katzen oder Kissen sind. Für das Programm besteht eine Datei lediglich
AI 资讯
From 3:00 AM Panic to Confidence: How I Use AI During On-Call Incidents
In this blog post, we will see how I use AI to speed up incident investigation without letting it take over the decisions that need a human. It is 3:00 AM. Your phone starts making that familiar PagerDuty noise. You open the alert with half-open eyes. Error rates are climbing. Slack is already active. The incident commander wants an update. Depending on the severity, your director or CTO may also join the call. Every developer who goes on call will face this situation at some point. I have faced it a few times a year. The first time, panic is normal. You do not know where to start, which dashboard to open, or how to explain the issue while you are still investigating it. Experience teaches you how to stay prepared. AI can reduce some of that early morning panic too. It will not bring the panic factor down to zero, and it should not replace the engineer. But it can remove the first few minutes of searching, tab switching, and collecting context. The goal is simple: move from panic mode to confidence mode faster. I Started With a Prompt in My Notes I started with something small, before custom skills became common in coding harnesses. I kept one incident prompt at the top of my notes folder. I also pinned it in my clipboard manager. When an alert arrived, I filled in the blanks and launched the investigation: I received this alert: <PagerDuty or Slack alert link>. Context: - Service: <service name> - Environment: <environment> - Region: <region> - Error or symptom: <error details> - Investigation window: past <n> hours - Runbook: <runbook link> Start investigating the issue. 1. Analyze the relevant Splunk logs and dashboards. 2. Check recent deployments, configuration changes, and feature-flag changes. 3. Check upstream and downstream dependencies. 4. Check cloud-provider status pages and internal maintenance announcements. 5. Search PagerDuty history and incident records for similar symptoms. 6. Use parallel agents for independent investigation tracks where useful. R
产品设计
Presentation: Beyond Line Charts: Why Some Diversity in Telemetry Visualization Is Long Overdue
Yao Yue discusses the fundamental limitations of standard line charts for system observability. Drawing from 15 years of operating large-scale systems, she shares how engineering leaders and software architects can transform telemetry data - moving beyond simple time-series defaults - to build visualizations that directly answer critical capacity, latency, and fleet-sizing questions. By Yao Yue
AI 资讯
HCP Terraform Positions Itself as the Control Plane for AI-Driven Infrastructure
HashiCorp is positioning HCP Terraform as the governance and control plane for a new generation of AI-driven infrastructure, arguing that the rapid adoption of coding agents is shifting the biggest infrastructure challenge from writing configuration to verifying and safely executing it. By Craig Risi
科技前沿
Without new landers or rovers, it's helicopters or bust for NASA's Mars program
NASA's cost estimate for SR-1 Freedom is $2.1 billion, but that doesn't include the helicopters.
创业投融资
Inside the Perimenopause Industrial Complex
How an alliance of tech startups, MAHA operatives, and actual medical experts made millennial women the new face of hormone therapy.
AI 资讯
Dyson made a camera-equipped toothbrush that flosses for you
Dyson is once again expanding its line of personal care products with a device that focuses on your teeth instead of your hair. As the name implies, the $499 CameraJet is the first electric toothbrush to incorporate a camera into the brush head. Available starting today in ceramic blue or ceramic pink color options, it […]
AI 资讯
'The Claude Pro Is Consumed Within an Hour': A Week of Coding-Tool Defections
Some weeks the complaints about AI are existential. This one they were arithmetic. Scroll Hacker News over the past week — the forum where developers argue about their tools in unusual detail — and the grievances about AI coding assistants weren’t about the models being dangerous. They were about limits running out, bills that don’t add up, models quietly swapped underneath you, and a desktop app eating memory like a browser. And the recurring move wasn’t outrage. It was switching. Quotes sourced from: Hacker News. Every quote below was located at its comment permalink and reproduced verbatim; each is listed with its username, the platform and the date in the Sources section. As always, we quote experiences, not verdicts — a forum comment is one practitioner’s account, often mid-argument, and we’ve framed them as exactly that. What makes this batch worth reading isn’t volume; it’s that the complaints are specific enough to check, and that they keep ending the same way: with a cancelled subscription. “Consumed within an hour”: the limits gripe The loudest theme by far was paid usage limits that vanish faster than the price suggests. On a thread bluntly titled “Quick impressions: A week of using Codex more than Claude,” a user posting as jmaker , on 22 August, described dropping his subscriptions around exactly this problem: “The Claude Pro is consumed within an hour on a simple task.” That’s one account of one plan, but it wasn’t isolated. In the same discussion, roamerz on 21 August traced the arc from happy customer to defector in four sentences: “Then one day I burned through my limit in about 10 minutes and had to get a project completed. I subscribed to Codex and it has been fantastic… I just dropped my Claude max plan down to the pro and subscribed to the $200 plan on Codex.” The specific number matters less than the shape: a heavy user hits a wall mid-task, and the wall — not the model’s quality — is what sends them to a competitor. It’s the lived version of t
AI 资讯
CI/CD Mistakes That Are Quietly Costing Your Team Deploy Time
Most teams don't notice their CI/CD pipeline is broken — they just notice that deploys "feel slow" and shrug it off as normal. It isn't. A pipeline that takes 25 minutes to ship a one-line copy change isn't a fact of life, it's a symptom. Here are the mistakes we see most often when reviewing pipelines — roughly in order of how much time they silently burn. 1. Running the full test suite on every single change If a developer fixes a typo in a README and the pipeline still runs the entire integration suite, database migrations, and end-to-end tests, you're paying full price for a change that touched nothing critical. Fix: split your pipeline into stages based on what actually changed. Path-based triggers (only run frontend tests if frontend files changed) and a fast "smoke test" tier before the full suite can cut average pipeline time dramatically without sacrificing safety. 2. No caching between builds Reinstalling every dependency from scratch on every run is one of the most common — and most fixable — sources of wasted time. Package managers, build artifacts, and Docker layers are all cacheable, and most CI platforms support this natively. Fix: cache dependency directories keyed by lockfile hash, and structure Dockerfiles so rarely-changing layers (base image, dependencies) come before frequently-changing ones (application code). 3. Sequential steps that don't need to be sequential Linting, unit tests, and security scans are often run one after another when they have no dependency on each other. That's pure wasted wall-clock time. Fix: parallelize independent jobs. Most CI systems support fan-out/fan-in patterns — run lint, test, and scan simultaneously, then gate the deploy on all three passing. 4. Environments that drift from production A pipeline that passes in staging and fails in production usually means the environments aren't actually equivalent — different env vars, different resource limits, different service versions. Teams respond by adding more manual
创业投融资
Apply now to host a Side Event at TechCrunch Disrupt 2026
Apply before September 4 to be a part of the TechCrunch Disrupt community by hosting your own Side Event.
AI 资讯
Instagram puts new limits on undisclosed AI profiles
As frustration over AI influencers has been growing, Instagram is limiting the reach of undisclosed AI profiles.
AI 资讯
Interpreters and Compilers: How Your Code Actually Becomes a Running Program
Every developer writes code that "just works" thousands of times without thinking about what happens between hitting save and seeing output on screen. This article pulls back that curtain. We're going to walk through, in real depth, how source code — plain text you typed — becomes a running program, covering lexing, parsing, abstract syntax trees, semantic analysis, and the actual difference between interpretation and compilation (including why that difference is far blurrier than most explanations make it sound). This is one of those topics where understanding the fundamentals pays off across your entire career — it changes how you read error messages, how you reason about performance, and how you evaluate new languages and tools. 1. The Big Picture: Two Broad Strategies At the highest level, there are two strategies for running code: Compilation — translate the entire source program into another form (often machine code, but not always) before running it. The translation and the execution are separate steps. Interpretation — read and execute the source program directly, translating and running it (roughly) simultaneously, statement by statement. In practice, almost no real system is purely one or the other. Python "compiles" your source to bytecode before interpreting the bytecode. Java compiles to bytecode, then a JIT (Just-In-Time) compiler compiles hot paths of that bytecode to native machine code while the program runs . JavaScript engines like V8 do something similar. The clean binary of "compiled vs. interpreted" that gets taught early on is really a spectrum, and most production language runtimes today live somewhere in the middle. But to understand any point on that spectrum, you need to understand the pipeline every one of these systems shares. Let's build it up stage by stage. 2. Stage One: Lexical Analysis (Lexing / Tokenizing) The first thing that has to happen to your source code is the least glamorous: it gets chopped into pieces. Source code, to a c
AI 资讯
Hugging Face hack could indicate cultural issues at OpenAI
This story originally appeared in The Algorithm, our weekly newsletter on AI. To get stories like this in your inbox first, sign up here. By now you’ve probably heard about last month’s major AI security incident, in which OpenAI agents escaped their sandbox and hacked into the AI platform Hugging Face while trying to cheat on…