Starbase: SQLite on the Edge

132 points42 comments2 days ago
mooktakim

You opted for a fancy website rather than actually explaining what it is.

dantiberian

I don't really understand what this is offering beyond Cloudflare's recent release of running SQLite in durable objects: https://blog.cloudflare.com/sqlite-in-durable-objects/. Is it about providing an external interface to Cloudflare's SQLite databases?

show comments
rmbyrro

From what I could understand of their architecture [1], you may lose data when the machine running DO fails.

DO implements a very comprehensive strategy to mitigate data loss in DO backed by SQLite. But Starbase seems to add a layer of query caching on the application level, which seems to be naively implemented (I might be misunderstanding, please correct if I'm wrong).

[1] https://starbasedb.com/blog/developing-acid-transaction-supp...

show comments
ec109685

How does this compare with Cloudflare’s new offering SQLite it durable objects: https://blog.cloudflare.com/sqlite-in-durable-objects

show comments
_hyn3

This is pretty cool. Great artwork too. Building edge DBs on top of S3 or R2 had interested me for a long time. Thanks for writing it!

Update: bug in redirection: https://starbasedb.com/blog/blog/blog/blog/blog/blog/develop...

show comments
dorianjp

Really glad Kenton chimed in there, as it wasn't clear in the docs and I was about to implement a similar pseudo transaction pattern as this.

Pretty excited about this tech, it really flips the script on the concept of a DB per user / sharding approach which used to be costly at the schema/physical db level.

jitl

What is the difference between this and Cloudflare’s first party D1 database offering? https://developers.cloudflare.com/d1/

D1 is SQLite

show comments
irq-1

Cloudflare recently updated this:

Zero-latency SQLite storage in every Durable Object

https://blog.cloudflare.com/sqlite-in-durable-objects/

sgammon

This is awesome. We’ve adopted a similar architecture with DO. Does it do data sync across devices? Offline first? Or is it all online thru DO and D1?

show comments
shivawu

Am I right to say that this is a template on top of cloudflare durable objects, not an actual software of its own?

rmbyrro

This is very appealing. If the authors are reading:

What is the architecture overview? Does each worker have a copy or do all of them work on the same DB files? How does it handle concurrent workers and db locking? Is SQLite native locking mechanism sufficient in this application?

show comments
aliasxneo

It appears the blog links are broken. Are those also supposed to function as the documentation?

show comments
pixelatedindex

I find the website design to be quite charming. Actually evokes some of the Outer World game vibes.

show comments
MPSimmons

Does stuff like this still have database-level locking? If so, how does that scale at all?

show comments
bythreads

May I just say; hell yeah on the brand identity! - finally someone has the guts to actually have an identity instead og pastel based standard b2b shit.

Last time I saw that was zendesk with their Buddha's and weird tonal audio devices.

Edited for corrected semi-colon because I'm haunted by a grammar-nazi.

robertclaus

`Isolation. Due to the nature of our queue and query executions, everything is synchronous by nature so no two queries can be ran concurrently making them run in an isolated nature by default. Check.`

I'm not sure if I misunderstood something, but using a global queue/lock to enforce isolation properties seems to be just a little disingenuous for a dbms. It works, but it's odd to talk about isolation in a system with zero concurrency. It's like saying a bicycle gets infinite miles per gallon in fuel efficiency.

solarkraft

This has the same name as an Elon Musk project. I can see the point of reusing names (this is a clever spin after all), but I’d expect the association to evoke quite some negative reactions.

Onavo
wslh

ELI5: Does "Open source, scale-to-zero, HTTP SQLite database built on top of Cloudflare Durable Objects" mean that you should pay and/or use Cloudflare for this? Or CDOs are generally available outside Cloudflare?

show comments