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

推荐订阅源

Help Net Security
Help Net Security
S
Schneier on Security
Security Latest
Security Latest
C
Cyber Attacks, Cyber Crime and Cyber Security
博客园_首页
K
Kaspersky official blog
B
Blog
雷峰网
雷峰网
MyScale Blog
MyScale Blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
人人都是产品经理
人人都是产品经理
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
T
Threatpost
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Latest news
Latest news
J
Java Code Geeks
W
WeLiveSecurity
GbyAI
GbyAI
V
Vulnerabilities – Threatpost
S
Secure Thoughts
IT之家
IT之家
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
博客园 - 叶小钗
Engineering at Meta
Engineering at Meta
S
Security @ Cisco Blogs
罗磊的独立博客
M
MIT News - Artificial intelligence
Blog — PlanetScale
Blog — PlanetScale
Stack Overflow Blog
Stack Overflow Blog
月光博客
月光博客
P
Proofpoint News Feed
博客园 - 聂微东
云风的 BLOG
云风的 BLOG
N
Netflix TechBlog - Medium
D
DataBreaches.Net
S
SegmentFault 最新的问题
V
Visual Studio Blog
V
V2EX
The Register - Security
The Register - Security
N
News | PayPal Newsroom
aimingoo的专栏
aimingoo的专栏
C
Cybersecurity and Infrastructure Security Agency CISA
N
News and Events Feed by Topic
Hacker News: Ask HN
Hacker News: Ask HN
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Google DeepMind News
Google DeepMind News
Webroot Blog
Webroot Blog
NISL@THU
NISL@THU
D
Darknet – Hacking Tools, Hacker News & Cyber Security

Hacker News - Newest: "AI"

AI can't read an investor deck AI as an attorney? Student uses ChatGPT, Gemini to sue UW over alleged racial discrimination Hacking MCP Servers in AI Systems – The Rug Pull: Tool Changes After Approval GitHub - MeepCastana/KubeezCut: Free Web based video editor GitHub - GenAI-Gurus/awesome-eu-ai-act: Curated tools, official sources, OSS, templates, and guides for EU AI Act compliance. Can AI judge journalism? A Thiel-backed startup says yes, even if it risks chilling whistleblowers Coming soon: 10 Things That Matter in AI Right Now DARPA built an AI to fact-check enemy weapons claims What explains heterogeneity in AI adoption? When AI Meets Muscle: Context-Aware Electrical Stimulation Promises a New Way to Guide Human Movements - Department of Computer Science AI Changed How We Build. It Did Not Change What Matters. Linux rules on using AI-generated code - Copilot is OK, but humans must take 'full responsibility for the… Meta spins up AI version of Mark Zuckerberg to engage with employees Code Mode: Let Your AI Write Programs, Not Just Call Tools | TanStack Blog GitHub - Delavalom/graft: Go framework for building AI agents. Type-safe tools, multi-provider (OpenAI, Anthropic, Gemini, Bedrock), zero vendor SDKs. India's TCS tops estimates, says new AI models did not dent services demand Gen Z's fading AI hype Strong feeling: we are in a folded AI reality GitHub - machinarii/total-recall-catalog: A reference catalog of latest knowledge retrieval, memory & RAG systems GitHub - mensfeld/code-on-incus: Give each AI agent its own isolated machine with root, Docker, and systemd. Active defense detects and stops threats automatically.. Quantization, LoRA, and the 8% Problem: Benchmarking Local LLMs for Production AI Iran war: We spoke to the man making Lego-style AI videos that experts say are powerful propaganda Powell, Bessent discussed Anthropic's Mythos AI cyber threat with major U.S. banks GitHub - immartian/bellamem: Persistent belief-graph memory for AI agents. Retrieves decisive context by importance — not recency, not RAG, not /compact. recursive-mode: The Repo-Native Operating System for AI Engineering After the attack on Sam Altman's home, will AI CEO's go on the offensive? The biggest advance in AI since the LLM Opus 4.6 vs GPT 5.4 One Prompt Unity World Generation Test “AI polls” are fake polls Client Challenge Can AI be a 'child of God'? Inside Anthropic's meeting with Christian leaders How to Switch AI Chatbots and Why You Might Want To GitHub - MattMessinger1/agentic_refund_guardrail: Safe refund policy layer for AI agents — Python + TypeScript. Same behavior, shared tests. Adam/papers/emergent_values_whitepaper.md at master · strangeadvancedmarketing/Adam Ask HN: How do you stop playing 20 questions with your AI coding tools How far can automation and AI support psychotherapy? - @theU GitHub - stagas/rtdiff: realtime git diff gui and AI-assisted commits A Mac Studio for Local AI — 6 Months Later A History of the Early Years of AI at the University of Edinburgh Why AI Coding Tools Still Feel Stuck on Localhost MSN AI Datacenters Are Becoming Strategic Targets twitter.com Penn Researchers Use AI to Surface Unreported GLP-1 Side Effects in Reddit Posts Show HN: MoodSense AI (ML and FastAPI and Gradio, Deployed on Hugging Face) Moodsense Ai - a Hugging Face Space by aman179102 AI models are terrible at betting on soccer—especially xAI Grok GitHub - xialeistudio/echoic GitHub - HimashaHerath/github-dev-wrapped: AI-powered weekly GitHub activity reports deployed to GitHub Pages GitHub - alejandrobalderas/claude-code-from-source: Architecture, patterns & internals of Anthropic's AI coding agent — reverse-engineered from source maps AI and Tech brief: Ireland ascendant GitHub - Titovilal/context0: Context0 - Never Surrender Training for a Marathon with an AI Coach: What Worked and What Didn't Cyber Pulse: Agentic Intel - Apps on Google Play I Built an AI PR Reviewer That Catches Bugs by Not Looking for Bugs Gen Z workers are so fearful AI will take their job they’re intentionally sabotaging their company’s AI rollout | Fortune How AI Is Reimagining the Game of Golf–For Both Players and Courses GitHub - nattergabriel/reseed: A CLI tool for managing and distributing agent skills across projects Is SVG the final frontier? My AI workflow evolved from prompts to a near-autonomous workflow MLSharp Help - 3DGS Viewer & Generator I put my cognitive field based AI's runtime on GitHub Is Numble the first AI-proof game? A3: Kubernetes for autonomous AI agent fleets | Emergent Principles Deepali Vyas ("The Elite Recruiter") GitHub - msmarkgu/RelayFreeLLM: A restful API designed to route user prompts to various AI model providers. Unionized ProPublica staff are on strike over AI, layoffs, and wages Unleashing the Advantage of Quantum AI We're heading for an AI-fueled 'dementia crisis,' brain scientist warns The AI-Assisted Breach of Mexico's Government Infrastructure [pdf] GitHub - stef41/lmscan: 🔍 Detect AI-generated text and fingerprint which LLM wrote it. Open-source GPTZero alternative. Zero dependencies, works offline. MSN GitHub - visionscaper/collabmem: Enabling long-term collaboration with Agentic AI - building up episodic and world model memory over time with in-context awareness We gave an AI a 3 year retail lease in SF and asked it to make a profit | Andon Labs AI Code is Hollowing Out Open Source, and Maintainers are Looking the Other Way What leaked "SteamGPT" files could mean for the PC gaming platform's use of AI AI is the boss at this retail store. What could go wrong? GitHub - Wuzu11517/agentic-proxy: Local proxy meant to help reduce With Drones, Geophysics and ArtificiaI Intelligence, Researchers Prepare to Do Battle Against Land Mines A Single Operator, Two AI Platforms, Nine Government Agencies: The Full Technical Report 在 Steam 上购买 FriedrichAI: Offline AI 立省 10% GitHub - inevolin/resume-cli: Hit Claude usage limits? Resume any AI coding session elsewhere. Switch tools at zero friction. GitHub - atripati/ark: AI Runtime Kernel — a context operating system for AI agents. Eliminates tool bloat, loads only what’s needed, and gives LLMs their reasoning space back. How to Build a Secure AI PR Reviewer with Claude, GitHub Actions, and JavaScript This Startup Wants You to Pay Up to Talk With AI Versions of Human Experts Intel Arc Pro B70 Brings 32GB VRAM to Local AI for $949 WordPress 7.0: The Good, the AI, and the Still Missing AI on the couch: Anthropic gives Claude 20 hours of psychiatry IatroBench: Pre-Registered Evidence of Iatrogenic Harm from AI Safety Measures AI Agents Know About Supabase. They Don't Always Use It Right. The history and future of AI at Google, with Sundar Pichai Inside an AI‑enabled device code phishing campaign How Meta Used AI to Map Tribal Knowledge in Large-Scale Data Pipelines AI for Systems: Using LLMs to Optimize Database Query Execution Forecasting the Economic Effects of AI Introducing Tinker: Play with AI, bring your ideas to life AI sheds light on an ancient gaming mystery People really hate AI but not as much as Iran—or Democrats | Fortune What is an AI Product Engineer? Phoebe Gates wants her $185 million AI startup to succeed with 'no ties to my privilege or my last name': 'I have a chip on my shoulder' | Fortune
Engineering message appends for AI Transport: three vignettes
SEMW · 2026-05-06 · via Hacker News - Newest: "AI"

9 min readLast updatedUpdated May 6, 2026

Engineering message appends for AI Transport: three vignettes

At Ably we recently shipped AI Transport, our drop-in transport layer for streaming LLM output over Ably channels, with all the resumability, multi-device continuity, and handover guarantees that implies.

One of the tricky things about token streaming from a pub/sub point of view is that while a model progressively emits fragments of text, those fragments logically all belong to a single message. You want to deliver them to the user live as they're produced, but for many other purposes you want to be able to treat the whole aggregated thing as a unit; e.g. at the end of it all you want your channel history to show a single response, not be cluttered with thousands of fragments. The primitive that we use to resolve this tension is a new type of pub/sub message called an append: a way of publishing an update to a message to extend its payload one fragment at a time. Each token the model produces becomes an append, and any subscriber gets a coherent view of the response as it grows.

Doesn't sound particularly complicated. But reality has a surprising amount of detail.

The space of possible API designs, semantics, and implementation decisions you're working with when implementing something like this is enormous. Here are three vignettes from the build, each covering a place where we ended up somewhere interestingly non-obvious.

1. Dual representations: why is every append stored twice?

Within the Ably system, when we send an append around and persist it, it always includes two alternate versions of itself: the actual append fragment (just the new bit), and the full accumulated payload so far (everything the producer has emitted on that message up to and including this fragment).

On its face this seems silly: the whole point of an append is that it's small. The publisher just sent a token; now we have to carry the whole 2,000-token transcript alongside it? Isn't it a nasty n-squared bug?

Consider a new subscriber, who attaches to a channel partway through a long response. The response so far is a couple of thousand characters long. What's the first thing they should receive? The obvious answer is, they receive the appends as published, and to get the earlier part they could use continuous history to get history up until the attach point. This is a fine answer. But it's not a great answer. An append on its own without the earlier part of the message is not really useful. So that answer would force everyone attaching part way through a response to get history, and wait for the response to that, in order to reconstruct the full message so far. That's both slow and a bit annoying: the current message being streamed isn't exactly history, it's happening now.

A nicer API would just give you the fully-reconstructed message so far as the first message you receive, and then just the incremental appends for all further changes subsequent to that first one (avoiding n-squared bandwidth usage).

Now consider: what do you want to get if you do a REST history query for the last 10 messages? You probably want the last 10 actual messages (with their latest, fully-aggregated content), not the last 10 fragments of some one message. So history should store only fully-aggregated messages, no fragments.

So ideally we need both representations of an append, either the fragment or the full version, available at the subscriber-facing edge, where we can choose between them depending on the consumer, the context, and whether this is the first append for a given message on a new attachment or not.

We could compute the "other" representation on demand at the edge where it's needed, but this gets ugly quickly, and has pathological worst-case behaviour.

So instead, we do the computation exactly once, at the point of publish, and propagate both representations together as a single object with two alternate payloads. This is a little more expensive for us internally: but it isn't that bad; message transit bandwidth within our network is cheap, using a larger and more complicated representation internally to simplify things for the publishing and subscribing clients is usually a good tradeoff.

And part of the reason it's not that bad is the next design decision:

2. Conflation as a semantic property of the message, not of a 'conflation step'

In the traditional pub/sub model, conflation is something that only happens if the user explicitly creates a conflation rule with a specified conflation key, applied within a configurable conflation interval. Within that conflation step, if two messages published share a conflation key, the older one is dropped in favour of the newer.

We could have kept this for appends. And if we had, that would have been fine. But not great. There would have been some rough edges.

Some models can routinely emit 150 or more tokens per second. Our default per-connection inbound rate limit is 50 messages per second. If every append is a normal immutable message right up until it hits a conflation rule, then someone using such a model would immediately get rate-limited. We'd probably advise them to do some clientside pre-publish batching. Which is a few lines of code, nothing tricky. Still, annoying.

And traditional conflation semantics are the wrong semantics for appends. You never want to keep only the latest fragment of a token stream, what you actually want is to concatenate them. We could have added an option to a conflation rule to concatenate appends instead of dropping all but the latest one, and encouraged users to configure such a step. Which would have been... fine.

But the thing to notice here is: concatenation is not just one of several possible ways of combining appends together. The system stores a fully-aggregated version of the message - that means the system already privileges concatenation as the unique way of combining appends together. That is: appends by definition admit a natural, lossless conflation semantic.

Which means -- why limit it to a 'conflation step'? This actually isn't at all like our normal message conflation, no payload data is dropped. So what if, instead of making the user explicitly set up a 'conflation rule which does appending', we define the semantics of append messages to allow the server to eagerly concatenate them together at every opportunity?

In which case all the questions about where in the pipeline should conflation apply, and how should the user opt in, disappear. There is no need for a policy surface, the message type itself carries the license, and we can just 'do the right thing'. And any kind of batching rule you configure gets to conflate appends for free, without the user needing to configure anything special. And if someone publishes a high rate of appends that would trigger their connection rate limiter, we can just automatically trigger some brief batching of appends at the connection level, reducing a 150/s token stream into something that will fit the connection rate limit (and we do exactly that). The problem is solved for the user before they hit it.

Getting the semantics of an operation right — what guarantees it makes and what guarantees it doesn't make — is one of trickiest but most important things to get right for a great API.

3. Generic primitives beat bespoke features: how we already had most of token streaming before we started

Ably's Chat product has supported editing and deleting messages since last year. A chat user types "helo wolrd", realises, edits to "hello world"; some time later decides the thought was bad and deletes it. Standard chat behaviour.

The easy way to build that would have been to put edit and delete logic inside the Chat product layer. Chat sits on top of pub/sub, and could have implemented editing itself, on top of the existing pub/sub system. The feature would have shipped faster, and would probably have worked well enough for the chat use case.

We didn't do that. We built it from the ground up as a first-class primitive of our pub/sub layer, of which chat was just the first user.

This was a not small amount of work. Updates broke an assumption the old history implementation had relied on — that messages are delivered in the order they were first created and that their content never changes after the fact. We ended up building a whole new history storage layer that allowed history requests to efficiently return messages at their original creation position, but with their latest content.

Was this over-engineering? Why do all the work to make it generic when chat was the only user who had asked for this?

There is often pressure, when you're building a feature motivated by a specific, important use-case, to build only for that use case. The customers you're talking to are the ones who need it for that, the indicators by which you're measuring success are those customers. Genericising takes longer and serves people who haven't asked for it yet.

But I've found that when we do do that work, we later find ourselves glad that we've done so, and when we don't, we regret it. The generic primitive is a lever with unknown future application.

A year or two after doing updates and deletes for chat, we started building AI Transport. And we realised that the semantics we wanted for token streaming was really quite similar to editing messages: a publisher has already put a message onto a channel and wants to modify its payload, and the channel history should reflect only the modified version. The difference is only that you're concatenating instead of replacing. Most of the substrate — the API pattern for publishers referencing existing messages, the capabilities, the history layer that places messages at their creation time, and so on — was already there. If we'd built edits inside Chat, we'd have had to build it again for AI Transport. Instead, we could take advantage of the work we'd already done, just extending it by adding an append operation to update and delete.

You don't always know what the future feature is going to be. When we were building Chat's edit-and-delete, we had no idea we'd shortly be using that primitive to stream tokens.

But adding powerful, composable, generic primitives has a habit of paying off in ways you can't predict.