Live data from Hacker News

Instant 1.0, a backend for AI-coded apps

instantdb.com

21–30 of 133 posts

Re: Instant 1.0, a backend for AI-coded apps

#21
post #10

This is super cool and exactly what I've been looking for for personal projects I think. I wanna try it out, but the "agent" part could be more seamless. How does my coding agent know how to work this thing? I'd suggest including a skill for this, or if there's already one linking to it on the blog!

Good idea! I went ahead and updated the essay:

https://github.com/instantdb/instant/pull/2530

It should be live in a few minutes.

Re: Instant 1.0, a backend for AI-coded apps

#22
One thing I have always wanted to do is cancel an AI Agent executing remotely that I kicked off as it streamed its part by part response(part could words, list of urls or whatever you want the FE to display). A good example is web-researcher agent that searches and fetches web pages remotely and sends it back to the local sub-agent to summarize the results. This is something claude-code in the terminal does not quite provide. In Instant would this be trivial to build?

Here is how I built it in a WUI: I sent SSE events from Server -> Client streaming web-search progress, but then the client could update a `x` box on "parent" widget using the `id` from a SSE event using a simple REST call. The `id` could belong to parent web-search or to certain URLs which are being fetched. And then whatever is yielding your SSE lines would check the db would cancel the send(assuming it had not sent all the words already).

Re: Instant 1.0, a backend for AI-coded apps

#23
post #6

I wonder if people really need this. How many people are really building multiplayer apps like Figma, Linear etc? I'm guessing 99% are CRUD and I doubt that will change. Even if so, would you want to vendor lock into some proprietary technology rather than build with tried and tested open source components?

Yeah I kinda agree. Considering llms write most of the code today, the need for fancy tech is lower than ever. A good old crud app looks like a perfect fit for ai - its simple, repetitive and ai is great at sql. Go binary for backend and react for frontend - covers 99.9% use cases with basically zero resource usage. 5 usd node will handle 100k mau without breaking a sweat.

> 5 usd node will handle 100k mau without breaking a sweat.

One problem you may encounter with the 5 usd node: how do you handle multiple projects? You could put them all in one VM, but that set up can get esoteric, and as you look for more isolation, the processes won't fit on such a small machine.

With Instant, you can make unlimited projects. Your app also gets a sync engine, which is both good for your users, and at least in our experiments, the AIs prefer building with it.

And if you ever want to get off Instant, the whole system is open source.

I still resonate with a good Hetzner box though, and it can make sense to self-host or to use more tried-and-true tech.

For what it's worth, with Instant you would get a lot more support for easy projects. At least in our benchmarks, AI

Re: Instant 1.0, a backend for AI-coded apps

#24
post #22

One thing I have always wanted to do is cancel an AI Agent executing remotely that I kicked off as it streamed its part by part response(part could words, list of urls or whatever you want the FE to display). A good example is web-researcher agent that searches and fetches web pages remotely and sends it back to the local sub-agent to summarize the results. This is something claude-code in the terminal does not quite…

If I understood you correctly:

You kick off an agent. It reports work back to the user. The user can click cancel, and the agent gets terminated.

You are right, this kind of UX comes very naturally with Instant. If an agent writes data to Instant, it will show up right away to the user. If the user clicks an `X` button, it will propagate to the agent.

The basic sync engine would handle a lot of the complexity here. If the data streaming gets more complicated, you may want to use Instant streams. For example, if you want to convey updates character by character, you can use Instant streams as an included service, which does this extremely efficiently.

More about the sync engine: https://www.instantdb.com/product/sync More about streams: https://www.instantdb.com/docs/streams

Re: Instant 1.0, a backend for AI-coded apps

#26

with a huge multi-tenant database, how do you deal with noisy neighbors? indexes are surely necessary, which impose a non-trivial cost at scale.

One data structure that helps a lot is the grouped queue.

I cover it in the essay here:

https://www.instantdb.com/essays/architecture#:~:text=is%20t...

To summarize:

In places where we process throughput, we generally stick a grouped queue and a threadpool that takes from it. The mechanics for this queue make it so that if there's one noisy neighbor, it can't hog all the threads.

There's more too (runbooks, rate limiting systems, buffers, isolated instances), but I thought this particular data structure was really fun to share.

Re: Instant 1.0, a backend for AI-coded apps

#28
An honest question - why would we need any frameworks at all for vibe coded apps? I can just tell the coding agent to use pure HTML5/Vanilla JS/CSS on the frontend and pure whatever on the backend and it would do it. No need for hundreds/thousands dependencies. For deployment I can ask the coding agent to do the same.

Re: Instant 1.0, a backend for AI-coded apps

#29

How does security and isolation work? If someone else's account is compromised, how do I know I won't be? If instant is compromised, how do I know I won't be?

If someone else's account is compromised, you would not be, because apps are logically separated. There would be no way for the compromised or uncompromised account to ever see your data.

If Instant is compromised, then that's a lot more dangerous. We minimize this risk following security best practices: keeping data encrypted at rest, keeping secrets hashed at creation time, etc.

Post reply on HN