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

推荐订阅源

钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
J
Java Code Geeks
B
Blog
腾讯CDC
博客园 - 三生石上(FineUI控件)
S
SegmentFault 最新的问题
H
Hackread – Cybersecurity News, Data Breaches, AI and More
博客园 - Franky
罗磊的独立博客
月光博客
月光博客
Jina AI
Jina AI
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
D
Docker
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
G
Google Developers Blog
V
Visual Studio Blog
I
InfoQ
有赞技术团队
有赞技术团队
D
DataBreaches.Net
Microsoft Security Blog
Microsoft Security Blog
WordPress大学
WordPress大学
阮一峰的网络日志
阮一峰的网络日志
宝玉的分享
宝玉的分享
Blog — PlanetScale
Blog — PlanetScale

Owen - Latest posts

在对话中,人们倾向于用"转移式回应"(shift response,把话题转回自己)而不是"支持式回应"(support... - Owen 问 GPT 港乐里有哪些歌词 精妙的写出了我们不同阶段的情绪 ,发现好多歌都听过,但是没有仔细研究过歌词,还让 GPT 创建了一个... - Owen 学到了 一个概念: Hypomnēma ,"是一种将真理转化为品格的方法: 通过每天回顾那些让你切实感受到理想生活方式的句子,你会更容易记... - Owen 约翰娜给孩子们讲了三年前的一天:当时我参加一份工作面试,那份工作薪水足够让我们支付修缮费用,从而保住农场。约翰娜和我花了一整天时间练习我要... - Owen 上次 碎瓜 给我的生活小 tips:买 7 条以上的毛巾,每天洗完澡都用干燥的新毛巾,对生活体验提升极大,试了一下,是真的。 - Owen 洗烘一体机 和 洗碗机 是最性价比极高的解放家务的电器,务必要早买早享受。我用的洗烘一体机是小米的一款 1500... - Owen 当前想置顶的一些内容 - Owen 对我来说,重新进入专注状态前,都会先经历一段放纵的信息过载期,对各种社交媒体刷到反胃,终于感觉自己刷够了,这个时候内心才会开始平静的使用手... - Owen 前 90%的代码占用了前 90%的开发时间。剩下的 10%的代码则占用了其余 90%的开发时间。 - 90/90定律 - Owen 随机散步游戏:每到一个路口看当前时间的秒数,1-15: 左转,16-30: 直走,31-45: 右转或直走右边那条路(防止 5... - Owen 爱情的反讽之一,你越不喜欢一个人,你越能够信心百倍、轻而易举地吸引她;强烈的欲望使人丧失了爱情游戏中必不可少的一种漫不经心;你如被人吸引,... - Owen The Costco theory of the internet 甜点带来的大部分享受都集中在最初的三口。之后,你就该停下来了。 - perell.com - Owen SearchSharp · 搜全它的所有叫法 我的前夫陪我去了殡仪馆。在殡仪馆的架子上摆放着人造花,后边放着一些扶手椅和一张矮桌,桌子上还放着几本杂志。 - 一个女人的故事 - Owen 有了 Jant 之后,我发现我会刻意去翻一下我的截屏之类的,一翻就会启发出更多的输出,而且也没有什么压力,就发在这里就好了。 昨天在... - Owen 和 AI 聊了一下如何对待玄学。如果玄学让你更加有能动性,能帮助你行动起来,那么就是健康的。但如果它让你认命什么的,就是有害的。 - Owen e.tb.cn 唯有的倾注了我的意愿、我的欲望或是某种人类智性(预测、评估是该做还是不该做,结果是什么)的活动都和那个男人相关,比如:... - Owen 期待能在上海拥有四人友谊,也就是 A、B、C、D,四个人既可以一起玩也可以互相玩的那种关系。... - Owen 在欧洲的时候和同伴痛心疾首地靠寸头来判断某个亚裔男是不是中国人,回来就决定必须服美役留个长发试试,不知道能不能救回来💪💪💪 - Owen Meetups in July and August 2026: call for organizers 我讨厌发贴打扰别人的时间轴,所以用 Jant 解决了这个问题。 但是我发现对喜欢的人,却希望对方每天更新一百个帖子。完全不存在打扰我时间轴... - Owen 我给朋友发: “我知道我们为什么喜欢巴黎了,因为浮日广场。” - Owen 关于阅读文学小说: “但文学小说的作用也是有限的。它可以提高一个人理解他人的可能性,却不能保证这个人一定会变得更善良。理解别人的痛苦和不去... - Owen 旅游回来鞋变得很脏,发现京东 Plus 会员可以兑换洗鞋服务。今天打开 APP,看到这个进度,感觉像是在提醒我:是谁在为你的便利工作。 - Owen 原来过 n 年之后看剪报的感觉是这样: From《金色笔记》 - Owen 也够怪的,我每次都得调用极大的意志力才能不感觉自己像个婊子,而那些富豪们每次都全力以赴地—当然他们是无意的,这就是他们的成功之处了—让人感... - Owen Claude - 长期关系里抗折旧的品质: 修复能力 善意归因的习惯 把对方当未完成品的好奇心 坏状态下的底层行为模式 情绪的自我负责... 韩国游客领跑亚洲的现象,是不是会导致首尔的新商业越来越多,而东京会慢慢只留下存量商业? - Owen
GitHub - instantdb/instant: Instant is the best backend f...
2026-04-10 · via Owen - Latest posts

Shows the Instant logo

stars

Get Started · Examples · Try the Demo · Docs · Discord

Instant is the best backend for AI-coded apps. You get auth, permissions, storage, presence, and streams — everything you need to ship apps your users will love.

You write relational queries in the shape of the data you want and Instant handles all the data fetching, permission checking, and offline caching. When you change data, optimistic updates and rollbacks are handled for you as well. Plus, every query is multiplayer by default.

We also support ephemeral updates, like cursors, or who's online. Currently we have SDKs for Javascript, React, and React Native.

How does it look? Here's a barebones chat app in about 12 lines:

// ༼ つ ◕_◕ ༽つ Real-time Chat
// ----------------------------------
// * Updates instantly
// * Multiplayer
// * Works offline

import { init, id } from "@instantdb/react";

const db = init({ 
  appId: process.env.NEXT_PUBLIC_APP_ID,
});

function Chat() {
  // 1. Read
  const { isLoading, error, data } = db.useQuery({
    messages: {},
  });

  // 2. Write
  const addMessage = (message) => {
    db.transact(db.tx.messages[id()].update(message));
  };

  // 3. Render!
  return <UI data={data} onAdd={addMessage} />;
}

Want to see for yourself? try a demo in your browser.

Motivation

Writing modern apps is full of schleps. Most of the time you start with the server: stand up databases, caches, ORMs, and endpoints. Then you write client-side code: stores, selectors, mutators. Finally you paint a screen. If you add multiplayer you need to think about stateful servers, and if you support offline mode, you need to think about IndexedDB and transaction queues.

To make things worse, whenever you add a new feature, you go through the same song and dance over and over again: add models, write endpoints, stores, selectors, and finally the UI.

Could it be better?

In 2021, we realized that most of the schleps we face as UI engineers are actually database problems in disguise. (We got into greater detail in this essay)

Shows how Instant compresses schleps

If you had a database on the client, you wouldn't need to think about stores, selectors, endpoints, or local caches: just write queries. If these queries were multiplayer by default, you wouldn't have to worry about stateful servers. And if your database supported rollback, you'd get optimistic updates for free.

So we built Instant. Instant gives you a database you can use in the client, so you can focus on what’s important: building a great UX for your users, and doing it quickly.

Architectural Overview

Here's how Instant works at a high level:

Shows how Instant compresses schleps

Under the hood, we store all user data as triples in one big Postgres database. A multi-tenant setup lets us offer a free tier that never pauses.

A sync server written in Clojure talks to Postgres. We wrote a query engine that understands datalog and InstaQL, a relational language that looks a lot like GraphQL:

// give me all users, their posts and comments
{
  users: {
    posts: {
      comments: {
      }
    }
  }
}

Taking inspiration from Asana’s WorldStore and Figma’s LiveGraph, we tail postgres’ WAL to detect novelty and invalidate relevant queries.

For the frontend, we wrote a client-side triple store. The SDK handles persisting a cache of recent queries to IndexedDB on web, and AsyncStorage in React Native.

All data goes through a permission system powered by Google's CEL library.

Getting Started

The easiest way to get started with Instant is by signing up on instantdb.com. You can create a functional app in 5 minutes or less.

If you have any questions, you can jump in on our discord.

Contributing

You can start by joining our discord and introducing yourself. Even if you don't contribute code, we always love feedback.

If you want to make changes, start by reading the client and server READMEs. There you'll find instructions to start Instant locally.