Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace the custom DBMS in Core.Data with EF Core and SQLite #12

Open
0xlsca opened this issue Oct 31, 2022 · 2 comments
Open

Replace the custom DBMS in Core.Data with EF Core and SQLite #12

0xlsca opened this issue Oct 31, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@0xlsca
Copy link
Collaborator

0xlsca commented Oct 31, 2022

Currently, the GameServer and WebHost lack data acquisition from a database.
Core.Data appears to contain a custom, unfinished implementation.

I propose that instead of going with a custom implementation, replacing it with EF Core and SQLite should be considered.
Not only does the implementation of a custom DBMS come with heavy initial effort, but it also requires the implementing people to stick around and document the implementation so it can be picked up by others in case changes need to be made.

As a replacement, EF and SQLite seem to be highly viable, primarily because EF is an easy to use and well documented ORM and SQLite being a relational DBMS, essentially keeping the knowledge required for working on the database to a minimum.

Another quality of EF is the creation of migrations and as far as I understood it, this essentially allows us to switch to a different DBMS should the need arise (e.g. MariaDB or MSSqlServer).
SQLite is a good choice for the time being since it doesn't require any installation on the developer's side.
The project setup would remain unchanged.

@eXpl0it3r eXpl0it3r added the enhancement New feature or request label Nov 12, 2022
@eXpl0it3r
Copy link
Collaborator

I've once started an attempt, but didn't really get far, as I had trouble configuring EF to work with SQLite.

If you have some experience with that, I'm more than happy to merge such a change. 🙂

@eXpl0it3r
Copy link
Collaborator

An alternative approach for the initial development phase that would allow for an easier interoperability with PacketPeep and faster loop, is to use simple JSON files. That way we don't have to necessarily define a fixed schema and don't have to deal with schema evolution etc.

It might be a bit more cumbersome when it comes to storing dynamic data, like player information, but I think that might not the primary focus. Switching from JSON loading to SQLite should then eventually also be a rather small step.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants