2 ms·
> Very nice! If you wanted it to save to disk instead of living wholly in memory, how would you do that in C? The idea would be to map your memory space to dis
by flavio81 9y ago
> Very nice! If you wanted it to save to disk instead of living wholly in memory, how would you do that in C?
The idea would be to map your memory space to disk space (using random access as provided by C stdlib); the problem would then be:
1. Caching - i guess you should then provide your cache implementation. And i would guess this opens a can of sync problems...
2. Finding a way to efficiently write the data on disk (i.e. which data should stay contiguous?; how much "slack" space should i leave on "extents" (oracle slang for a container for many data blocks)? Should you do column-store?
3. Compacting the data (removing slack)
etc etc.
I think it's not easy at all !