[Polish] Remove in memory provider in favour of Mongo2go
Description
We want to remove the in memory provider (for running the server locally in a developer environment)
Current State
Currently we have, for local development, an in memory provider
How should it look/feel?
It would be nice if we can replace the in memory provider with Mongo2Go. This gives us a bunch of wins: removes a backend that behaves differently from our production environment, and allows us to have an easy to deploy automatic mongodb instance for local development and integration testing.
The first step would be to look at https://github.com/Mongo2Go/Mongo2Go and figure out how its configuration works, import it into our project and set it up, and remove the in memory provider code paths, tests and configuration. Some documentation would need to be updated to reflect the new state of local development as well
Steps
-
Confirm server-side version compatibility -
Implement Mongo2go as a data access utility -
Install Mongo2Go NuGet package -
Create Mongo2Go Data Access wrapper
-
-
Interface generic data providers of each type if not already present-
Generic data providers should receive Mongo2go by DI if server is ran in debug mode -
Generic data providers should receive current production data access utility otherwise
-
-
Register all data access classes and data provider classes in Startup.cs
for DI if not already done so -
Negate / cleanup MongoDB Server instances after local debug mode and tests -
Mark old MongoDB tests as [Skip]
- OR
-
Write in some additional cleanup code for when the in-memory provider is disposed (Windows specific?)
-
Success/AC
In local debugging mode:
-
Objects should retain their states after browser closing -
Tokens -
Maps -
Campaigns -
Players -
Messages -
Chat
-
-
After the server-side program closes, there are no leftover instances of MongoDB still open
In unit tests:
-
After tests are ran, no instances of MongoDB are leftover
Resources
- Mongo2Go project site: https://github.com/Mongo2Go/Mongo2Go
- Mongo2Go documentation: https://csharpdoc.hotexamples.com/namespace/Mongo2Go