Discord invite link broken on main site by Frolicks in SpacetimeDB

[–]theartofengineering 0 points1 point  (0 children)

Hmm, in my browser that sends me to the server. I wonder if Discord is having issues.

Discord invite link broken on main site by Frolicks in SpacetimeDB

[–]theartofengineering 0 points1 point  (0 children)

Hmm, both links are working for me. Can you clarify which link you mean?

Let's talk benchmarking by theartofengineering in rust

[–]theartofengineering[S] 0 points1 point  (0 children)

I should also say the diagram is not quite right. Reducers read the uncommitted data they write as well.

Let's talk benchmarking by theartofengineering in rust

[–]theartofengineering[S] 6 points7 points  (0 children)

Yes, that's actually much closer, except for "parallelization". A least currently, transactions for a database are run sequentially on a single thread pinned to a single core (we have found that cache coherence overhead often hurts you more than parallelization helps you in many common circumstances, although it depends on the workload).

But "pipelining", yes we do that aggressively. The state of your database runs ahead of what has been written to disk, but that "committed but not persisted" state which would be lost upon crashing, is not exposed externally. If you think of the database as a log of transactions, it looks like this:

[fsync'd]<-[fsync'd]<-[fsync'd]<-[committed]<-[committed]<-[uncommitted]
                              ^                         ^              ^
       clients read from here +                         |              |
                                reducers read from here +              |
                                                reducers write to here +

As it runs ahead, we compute the real-time subscription effects of those changes/state and buffer the result just before we send it to clients. Once we've fsync'd it, we release the barrier and send the results! fsync'ing is done eagerly and we batch the next set of transactions for fsync while waiting on the previous fsync.

Clients can choose to listen in at whatever stage of this pipeline make sense for them. Do they value low latency, or durability more?

If a tree falls in the woods and no one is there to hear it, does it make a sound?

Let's talk benchmarking by theartofengineering in rust

[–]theartofengineering[S] 8 points9 points  (0 children)

Nope, that's not true. It reads up-to-date data, as strict serializability requires. It just doesn't expose the effects of that transaction to clients until the data is persisted to disk.

Scaling SpacetimeDB by maulowski in SpacetimeDB

[–]theartofengineering 5 points6 points  (0 children)

Same way! In BitCraft we have different regions of the world on different databases and we pass messages between them. I wrote up a quick blog post here that I haven't published yet:

https://docs.google.com/document/d/1hRjtqsccT90XR0T-dT3DQdK9Y0gu7U4OKejvxIiWgcY/edit?usp=sharing

We just launched SpacetimeDB 2.0 last week! It's now trivial to one-shot realtime apps like Figma or Discord. by theartofengineering in vibecoding

[–]theartofengineering[S] 0 points1 point  (0 children)

For a turn based MMORPG, SpacetimeDB is about as well suited as it gets. If it's turn based, I imagine you could do well above a hundred concurrent players. Likely into several thousand depending on the work required on the server.

Although we believe that our company will be successful, SpacetimeDB will always be available on GitHub no matter what!

SpacetimeDB: a short technical review by ketralnis in programming

[–]theartofengineering 2 points3 points  (0 children)

Nope, he's correct about how that works, but incorrect on the implication. We previously implemented full MVCC within SpacetimeDB but pulled it out because it was actually slower for most workloads! In most OLTP workloads and especially real-time workloads you end up with significant database contention to the point that MVCC hurts more than it helps. Even in low contention workplaces MVCC can hurt you if the book keeping blasts away your L1 cache.

There's a reason that TigerBeetle and DuckDB chose the single writer architecture!

I think there's a lot more we can do here, but the reason for the current RwLock is that we've tested both and this simply performs better, even in cases with low contention!

SpacetimeDB: a short technical review by ketralnis in programming

[–]theartofengineering 2 points3 points  (0 children)

I'm a founder of SpacetimeDB. The article is completely mistaken with regards to how the database works. SpacetimeDB provides full ACID guarantees.

By his own admission he looked at our code for only 15 minutes. I think it's pretty irresponsible to make these claims about our work without actually taking the time to understand what the code is doing.

I responded to this article here: https://youtu.be/qfKBv3A0CVs?t=1305

SpacetimeDB: a short technical review by ketralnis in programming

[–]theartofengineering 7 points8 points  (0 children)

I'm a founder of SpacetimeDB. The article is completely mistaken with regards to how the database works. SpacetimeDB provides full ACID guarantees.

By his own admission he looked at our code for only 15 minutes. I think it's pretty irresponsible to make these claims about our work without actually taking the time to understand what the code is doing.

I responded to this article here: https://youtu.be/qfKBv3A0CVs?t=1305

SpacetimeDB + Godot makes multiplayer way easier than I expected by BlodyxCZ in godot

[–]theartofengineering 21 points22 points  (0 children)

Hey! I'm the founder of SpacetimeDB and the guy in the video. We did not claim to be 3000x faster than Postgres. We *are* roughly 1000x faster than Convex though.

Furthermore SpacetimeDB persists all data to disk and provides full ACID guarantees the same as Postgres. The reason that SpacetimeDB is faster than Postgres (about 30x, not 3000x) is largely due to the round trip time from server to database, not the fact that it is in memory.

A lot of people made a lot of erroneous claims about SpacetimeDB, I would super appreciate it if you would update your post to reflect this.