iroha icon indicating copy to clipboard operation
iroha copied to clipboard

[refactor]: Shallow objects in `data_model`

Open Erigara opened this issue 1 year ago • 3 comments

Currently objects in data_model are nested. Domains contain Accounts and AssetDefinitions inside it, Accounts contains Assets and Roles and so on.

We should consider making objects shallow: so that all Assets would be sotred in the single place and only reference owner Account by it's AccountId.

This way iteration over objects will be more effective.

As a sidenote such structure more closely resemble data organization typically encountered in relational databases.

Erigara avatar Sep 25 '23 11:09 Erigara

let's consider after new wsv

mversic avatar Oct 19 '23 10:10 mversic

Another benefit comes from how our new state works, which favors granular updates to avoid extensive cloning.

Erigara avatar Apr 17 '24 08:04 Erigara

First PR was merged.

SamHSmith avatar Jun 27 '24 20:06 SamHSmith

Apparently, we're moving to a sort of static Entity-Component-System / Struct of Arrays, so all data model structs should eventually disappear.

nxsaken avatar Jul 02 '24 08:07 nxsaken

This issue is about how the code should be structured. PR's containing these changes have been merged already. Therefore the issue is closed.

SamHSmith avatar Aug 06 '24 16:08 SamHSmith