3 ms·
I usually explained ECS to people unfamiliar with the concept more like a relational database. It's not a perfect 1:1, but I feel like it resonates well if you
by blixt 2y ago
I usually explained ECS to people unfamiliar with the concept more like a relational database. It's not a perfect 1:1, but I feel like it resonates well if you think of components as highly normalized tables, and entities being a table of optional foreign keys to all the other tables. Then systems are queries that pick and update the entity rows joined specifically with the component tables you care about.
When you get deeper into ECS it usually ends up being quite similar, with some components in a system being optional (OUTER JOIN) and the various ways components can be stored for efficient retrieval / updates (indexing in databases).
- fancl20 2y agoI feel like there is a part more difficult to be captured in technical definition. ECS designs usually pay more attention to seperate data and logic because systems are constantly updating data (world state) regardless there is an event or not. In the case of k8s the specs create a target world state and kubelet/controller constantly update the current world state (status) so a control system can be created.