4 ms·
Nice project. A couple questions: is it EF Core compatible? Can I save the DB file/files to azure blob storage?
by jcmontx 4y ago
Nice project. A couple questions: is it EF Core compatible? Can I save the DB file/files to azure blob storage?
- jermaustin1 4y agoI just found it today, so I might not be the best to answer this, but I doubt it is EF compatible at all as it is a document database (like MongoDB). As for azure blob storage, a quick google search shows a handful of libraries that accomplish that.
- WorldMaker 4y agoEF Core briefly had a (beta-level) MongoDB-compatible provider. It wasn't very useful in practice, but EF Core blogs every now and then talk about returning to document database support as a possibility. I don't think I would use EF Core with a document database, but I can understand the appeal in sharing models with EF Core, and maybe even utilizing a shared "Change Tracker". Unless you are doing your own things, most EF Core models should be POCOs easily enough serializable to JSON to directly use in your document DB, and EF Core contexts at this point have an easy enough Change Tracker API to query that you could possibly reuse it easily enough for a document DB (though that is probably overkill because you don't need per-property tracking at that point usually, just per-document tracking).
- HdS84 4y agoEverybody can write a linq provider, it's just not that easy. Ravendb has a great linq provider and is a nosql db.
- fuzzy2 4y agoWhen using an App Service, you can have it mount a Blob Container or File Share. Dunno how well that works for a database though.
- jbluepolarbear 4y agoI use LiteDB for a game state store and am able to store the database as a gzipped blob. LiteDB allows using memory streams for usage and doesn’t require a file stream so you should be able to use any data store to store your database blobs.
- jermaustin1 4y agoDo you have more information about your game and how you are using LiteDB?
- jbluepolarbear 4y agoI can’t talk about much about the game as it’s in development and unannounced, but it’s a 3d adventure game. We use LiteDB to hold all game state: objects on the ground, button/switch states, ai variables, inventory, etc. LiteDB allows using C# classes directly with the BSON mapper, allowing easy interoperability between the database and using the data in game. LiteDB allows using MemoryStreams which are convenient for loading and saving from a binary storage like a cloud service or a file. It’s fast at querying, but we’ve had issue with upsert performance so we perform all upserts at once in a separate thread to not impact the main game thread. Over all has worked well for the project and has had minimal issues over a year plus of development.