HN.zip

Pocketbase – open-source realtime back end in 1 file

97 points by modinfo - 38 comments
Humphrey [3 hidden]5 mins ago
I've been trying out Pocketbase on a side project idea. I'm super impressed!

Having worked for many years on Django projects, Pocketbase seems like a perfect fit for those small to medium sized projects for which you don't want to create and maintain a traditional backend for.

Happy to answer any questions.

rubenvanwyk [3 hidden]5 mins ago
Trailbase is the same concept, but written in Rust instead of Go.
odie5533 [3 hidden]5 mins ago
TrailBase has a comparison page https://trailbase.io/comparison/pocketbase/
cyco130 [3 hidden]5 mins ago
What a respectfully and humbly written comparison page. Ditto for their Supabase comparison. I can't rate the objectivity since I know very little about TrailBase but they got my attention now. It brings me such joy to see such a writeup in a world where humility is perceived as weakness. Kudos.
rudedogg [3 hidden]5 mins ago
I appreciate their honesty. After a quick look I’d give another point to Pocketbase for it’s admin UI. The TrailBase one is pretty sloppy (on mobile at least), and looks like it’s using bootstrap.

Pocketbase has a sense of quality/care around it that seems missing.

wowamit [3 hidden]5 mins ago
I am curious to better understand the benchmarks against simple SQLite, especially under typical load. Any level of latency will be an unnecessary overhead.
JodieBenitez [3 hidden]5 mins ago
Database, admin, auth... is this some kind of Go's Django ?
EvanAnderson [3 hidden]5 mins ago
It got some good discussion back in January, 2024: https://news.ycombinator.com/item?id=38898934

There have been a ton of releases since then. It looked like a pretty interesting project at the time. It made me want to look for a project to use it for but I never got around to it.

I'd be interested to hear from people who have been using it and how keeping up with the releases has been (compatibility / breaking changes in API, ease of migration, issues, etc).

impure [3 hidden]5 mins ago
I've been using it for a while. There was only one release that required manual migrations. I think 0.23.0 and apparently the dev is backporting security updates for those who haven't upgraded.

I use Go so all I have to do is `go get -u` and `go mod tidy` and then it's upgraded. It works great.

tommica [3 hidden]5 mins ago
How is it in production? Does it it live up to your requirements?
impure [3 hidden]5 mins ago
Yes, I use it with an RSS reader and an email app and it works great.
aitchnyu [3 hidden]5 mins ago
Whats the method to maintain a git repo of JS and unit tests? I remember a team with Firebase copy pasting code from dev to prod and between "modules" within an env and making a ton of mistakes.
mickael-kerjean [3 hidden]5 mins ago
Is this some sort of supabase but with sqlite and without the operational complexity?
odie5533 [3 hidden]5 mins ago
Yes that is what it is.
ffsm8 [3 hidden]5 mins ago
Is this really realtime?

From looking at the description it sounds more like subscriptions to events of data changes that are dispatched close to the data operation

How would realtime even work for a networked system going over tcp?

https://en.wikipedia.org/wiki/Real-time_computing

SerCe [3 hidden]5 mins ago
I believe there is no contradiction with the definition from the linked article?

> A system is said to be real-time if the total correctness of an operation depends not only upon its logical correctness, but also upon the time in which it is performed. Real-time systems, as well as their deadlines, are classified by the consequence of missing a deadline:

> Hard – missing a deadline is a total system failure.

> Firm – infrequent deadline misses are tolerable, but may degrade the system's quality of service. The usefulness of a result is zero after its deadline.

> Soft – the usefulness of a result degrades after its deadline, thereby degrading the system's quality of service.

From what I can tell, https://pocketbase.io/ attempts to be a soft-realtime system.

phplovesong [3 hidden]5 mins ago
There is realtime, and there is "realtime". The other one being realtime in apps doing some sort of music thing, flight controllers etc. Then there is web "realtime" that basically only means 2sec in the past-realtime.
zwnow [3 hidden]5 mins ago
Realtime in tech is considered in timespans with short delays allowed, last time i have read about it it was like 100ms.
anonymousiam [3 hidden]5 mins ago
Heh. I wasn't aware that there was a new definition of realtime. My 40+ year career consisted of about 20% realtime embedded firmware development. In all of my experience, 100ms is an absurdly long delay. Most RTOSs (that call themselves such) have latency measured in μs. The last serious RTOS that I wrote (MSP430, non-preemptive) had a firm requirement that any task must complete within 1ms. That one ran on a single threaded MCU clocked at 25MHz.
zwnow [3 hidden]5 mins ago
Well Pocketbase isnt embedded firmware.
fragmede [3 hidden]5 mins ago
Realtime in tech has a specific definition. The Wikipedia article covers it in more detail, but think about things like airplane wing control or space rocket computers needing to do things exactly when asked, or else people die.
zwnow [3 hidden]5 mins ago
Even that stuff has a delay.
wowamit [3 hidden]5 mins ago
> PocketBase is an open source backend consisting of embedded database (SQLite) with realtime subscriptions

I am not sure I understand—is this a wrapper around SQLite?

odie5533 [3 hidden]5 mins ago
It makes SQLite a service that provides you with an authenticated data access layer via a REST API. It is not a wrapper although it does use SQLite as its database.
RedShift1 [3 hidden]5 mins ago
It creates a REST API for your SQLite database with some extras.
zipping1549 [3 hidden]5 mins ago
Been following this for some time now and it's a real delight to use. SSE subscription is really nice.
tommica [3 hidden]5 mins ago
Do you use it in small projects only?
ftchd [3 hidden]5 mins ago
sjdonado [3 hidden]5 mins ago
This is an amazing project, can't wait to see the 1.0
postbase [3 hidden]5 mins ago
Congrats on the launch!
ranger_danger [3 hidden]5 mins ago
Apparently 1 file just means a static go binary with a bunch of separate assets compiled in.

I guess for some reason I was hoping for source code that was only one file.

wowamit [3 hidden]5 mins ago
Same here. At first, I thought it was a one-file-based database, which would have been even more commendable.
florians [3 hidden]5 mins ago
Same
dustbunny [3 hidden]5 mins ago
Like a single header c lib from some eastern European S tier programmer.
ftchd [3 hidden]5 mins ago
tsoding mentioned
phplovesong [3 hidden]5 mins ago
I really loved his ocaml days. Learnt alot. He does only C these days, but his streams are fun to watch nontheless.
m00dy [3 hidden]5 mins ago
I can vibe code this in rust in a day most
razemio [3 hidden]5 mins ago
No, simple answer. Try it, link to the repo and I will tell you all the placed it failed. Vibe coding has its places. For something like pocketbase it most definitely is not ready yet.