Dynmap-Forge/Fabric

Dynmap-Forge/Fabric

1M Downloads

LevelDB storage type

ashduino101 opened this issue ยท 2 comments

commented

Feature Description: An option to save map tiles and data in the LevelDB format would be nice. This would allow for the data to be stored as a collection of moderately-sized files in a single flat directory instead of millions of individual files (filesystem), a database that probably supports a lot more functionality than is necessary, degrading query performance (SQLite), or a database that is stored at a low filesystem level and is difficult to migrate or control, as well as the necessity for a socket to be running (MySQL/MariaDB/PostgreSQL). For the database keys, perhaps a format similar to Bedrock Edition's world format would suffice, where tile coordinates are serialized as int32s along with an indicator to differentiate the tiles from other types of data being stored (e.g. entities, dimensions, general metadata), a dimension ID, and maybe a map type ID as well, just as an example.

Additional context: In case you don't know what LevelDB is, it's essentially a glorified on-disk dictionary, with extremely fast query times for large amounts of binary rows. MCBE/MCPE uses it, allowing for extremely small world sizes (some of the fairly large example maps are under 8 megabytes!), low memory usage, and fairly succinct filesystem storage.

commented

I'd just go with H2 instead if SQLite won't do, since it seems to have less problems with performance than SQLite.

^ According to https://stackoverflow.com/a/62845028 it has a high-likelihood of corruption if the app shuts down illegally, though.

commented

This would be awesome as I believe it will indirectly address my issue with having a single huge monolithic db that is a pain to backup and maintain.