xaya / libxayagame

MIT License
21 stars 19 forks source link

Add LMDB storage #25

Closed domob1812 closed 5 years ago

domob1812 commented 5 years ago

This adds a new LMDBStorage class, which uses LMDB for storing game data. This is a no-SQL database, and thus likely more efficient / suitable for the needs than the SQLite-based storage. With this, we can close #2.

This required a lot of additional refactorings, some of which were already merged to master directly and others are included in this PR. Notably, storage can now throw a RetryWithNewTransaction exception, which will be handled by the Game instance and it will reinitialise and retry the update. This is used to resize the LMDB map as needed.