Live data from Hacker News

Databases are the endgame for data-oriented design

spacetimedb.com

101–110 of 157 posts

Re: Databases are the endgame for data-oriented design

#101
post #33

Earlier quoted context omitted.

> I appreciate that most of the ECS hype has been around specific use cases, though. I recently watched the first 30 minutes of Mike Acton's 2014 talk, and while that portion of the talk wasn't about ECS specifically, it very much presented an absolutist perspective.

This is a issue with how most potential solutions or languages are marketed, even to experienced developers. They're all sold as silver bullets and every experienced programmer should know that there is no such thing. A lot of it also stems from what I call 'the hello world problem'. Very simple cases are brought up to sell you on the idea, but it's only in complex scenarios that you really learn the worth of somethi…

The biggest issue is that it's a mischaracterization of the talk.

He spent quite a bit of time at the start of the talk defining the context w/i which he was talking. He used strong language but it was never absolutist.

Re: Databases are the endgame for data-oriented design

#102

The relational model is one of those eternal diamonds that will be just as relevant in 2090 as in 1990.

I kinda think adding some logical/semantic level on top of it (like datalog) will make it even more robust.

Datalog (intentionally) isn't Turing-complete, though. That might hurt applicability for a generalized ECS model.

Re: Databases are the endgame for data-oriented design

#103
post #26

As an ex-game developer and software architecture nerd, I'm very excited about data-oriented design and ECS. It really is a cool pattern, and it's a very common one in shipping games today. It's not just architecture astronaut stuff. At the same time, the level of hype about ECS today reminds me an awful lot of the amount of hype surrounding OOP in the 90s. Can ECS be a better way to structure your game entities and…

"At the same time, the level of hype about ECS today reminds me an awful lot of the amount of hype surrounding OOP in the 90s." I appreciate that most of the ECS hype has been around specific use cases, though. OOP was claimed as not a specific useful tool, but the answer to all programming, a billing it has not lived up to. It achieved "useful tool", no question, especially as some of the very rough bits were sanded…

> I appreciate that most of the ECS hype has been around specific use cases, though.

Depends a lot on where you hang out. On amateur gamedev fora, I have seen many many many posts from beginners where they are struggling to cram ECS into their game and feel they need to because it's simply "the way" that one architects a game. Even if their game is written in a language that offers no performance benefits and the their simulation benefits nothing from it, they just think they have to.

It's heartbreaking watching someone go, "I know I could just store this piece of data right here in my entity class, but I'm not supposed to because of DoD, so how should I do this?" And then they get back confidence answers that involve pages of code and unnecessary systems.

It's exactly like the OOP fad of the 90s, just in the opposite direction. Yes, it turned out you don't need to encapsulate all data in classes. But, also, it is OK to just store data in stuff. You don't have to make every letter of your pop-up dialog a separate component.

Re: Databases are the endgame for data-oriented design

#104

As an ex-game developer and software architecture nerd, I'm very excited about data-oriented design and ECS. It really is a cool pattern, and it's a very common one in shipping games today. It's not just architecture astronaut stuff. At the same time, the level of hype about ECS today reminds me an awful lot of the amount of hype surrounding OOP in the 90s. Can ECS be a better way to structure your game entities and…

> There are ECS frameworks in JavaScript, which gives you absolutely no control over memory layout and thus completely defeats one of the primary purposes of the pattern. It doesn't give you direct control over the memory layout, but it's still fairly safe to assume that arrays are going to end up in relatively contiguous memory, which the relevant part for the performance difference between structs of arrays and arr…

> it's still fairly safe to assume that arrays are going to end up in relatively contiguous memory

A contiguous array of pointers to the actual objects doesn't buy you much. You're still doing an indirection and risking blowing your cache each time you do something with each element. It may be the case that the objects the array elements point to are contiguous in memory, but that's entirely a roll of the dice, and those dice get re-rolled on every garbage collection.

Re: Databases are the endgame for data-oriented design

#105

As an ex-game developer and software architecture nerd, I'm very excited about data-oriented design and ECS. It really is a cool pattern, and it's a very common one in shipping games today. It's not just architecture astronaut stuff. At the same time, the level of hype about ECS today reminds me an awful lot of the amount of hype surrounding OOP in the 90s. Can ECS be a better way to structure your game entities and…

I don't think memory layout is the sole draw, it's also about incrementally building up programs live.

You don't need ECS for that and it doesn't necessarily buy you much. Composition over inheritance can often accomplish the same goal.

Re: Databases are the endgame for data-oriented design

#106
post #96

Hi spacetimedb.com. You apparently want people to read about your product, but have a non-GDPR-compliant popup that requires people to uncheck multiple "vendors" if your readers do not want to be tracked. Edit: it actually does not allow any unchecking. Just "you agree to these marketing and tracking cookies by using this site" Nope. Baffling. It does not lend confidence in your core product. If you're not respectful…

Will fix!

Re: Databases are the endgame for data-oriented design

#107
post #94

Andrew Kelley of Zig fame did an excellent talk on this very subject: https://vimeo.com/649009599 Strongly recommended viewing if you are interested in understanding why DoD is a big deal for performant applications (hint: it's about the cache).

This is an excellent talk for sure.

Re: Databases are the endgame for data-oriented design

#108

Earlier quoted context omitted.

I am on here. Will definitely take a look!

While you're here... where's the scrollbar? I'm on desktop (Edge) and don't see a scrollbar. Very distracting.

Will fix. Writing all these down.

Re: Databases are the endgame for data-oriented design

#110

The fundamental difference between an ECS and a struct/object layout is that an ECS is column-oriented (aka columnar), while a struct/object layout is row-oriented. Everything else about how you might query these layouts is more superficial... you can provide the same API with either layout, the same way you can in relational database systems (both layouts can be queried with SQL, but with different performance chara…

Are you familiar with any existing ECS implementations which expose a SQL interface?
Post reply on HN