-- Leo's gemini proxy

-- Connecting to iceworks.cc:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini

The Truth (Our Machinery Data Model)

Created: 2023-02-08T08:38:24-06:00

Return to the Index


Data model for the Our Machinery engine.


Refer to object by a reference number / object ID

Create a meta-model of the object

Generate code to interact with objects of particular types

Generate code to serialize objects of particular types

Get free undo/redo support by swapping pointers around

Copy data out, change it, then do atomic pointer swaps to update references

Use Compare and Swap operations to check if committing an object succeeded


The Story behind The Truth: Designing a Data Model

Multi-Threading The Truth


Explicit read, write, and commit verbs exist to facilitate pulling objects out or writing them to new data to be committed to the system.


Heirarchial storage

Root -> super blocks -> blocks.

Allows fixed size arrays to be used to back object IDs but allocated in banks when needed. Heirarchy can be adjusted based on profiling to what the game needs.

Write-locks used when allocating a new ID to issue an object to.

Threading

Give each thread its own superblock to work with. This stops threads from having write contention over object IDs for the most part.


-- Response ended

-- Page fetched on Fri Jun 7 02:45:50 2024