Basic idea: A Nim DSL that describes the game model declaratively
There is a
raw list/sequence of the data for fast iteration over all elements. The implementation
should be either based on an ordinary contiguous sequence or something like: http://plflib.org/colony.htm which is essentially a linked list of growing arrays so that no reallocations are required.
In addition to the contiguous storage there can be multiple indexes into the data. The indexes can be hash based or based on a BTree depending on whether ranges queries need to be supported. There is always a primary key of type integer that can be used to index the contiguous array.