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

Feature: Support SQlite and use it as default database #91

Open
sazarkin opened this issue Mar 18, 2024 · 6 comments
Open

Feature: Support SQlite and use it as default database #91

sazarkin opened this issue Mar 18, 2024 · 6 comments

Comments

@sazarkin
Copy link

sazarkin commented Mar 18, 2024

It will be nice to get sqlite integrated database out of the box without extra MySQL instance required.

Database can be an interface and have two implementation: sqlite and mysql.

I play maybe once a month on my server and do not want to keep mysql instance only for ban/mute logic to work.

Docs example: https://docs.cssharp.dev/examples/WithDatabase.html

@Dliix66
Copy link
Contributor

Dliix66 commented Apr 26, 2024

The main target with this plugin is to be able to share the DB accross server and/or access its data through a web plugin or discord bot.
This would not be possible with SQLite.
We could make an SQLite option, but this should never be the default.

@sazarkin
Copy link
Author

but this should never be the default.

I mean if you have not put mysql settings in config, it should use sqlite.

Right now if you haven't configured mysql half of features do not work.

@jstnmthw
Copy link

This would not be possible with SQLite.

Of course it would be possible with SQLite. Why wouldn't it?

Running a SQLite docker image with a persistent volume comes to mind, for example.

@daffyyyy
Copy link
Owner

This would not be possible with SQLite.

Of course it would be possible with SQLite. Why wouldn't it?

Running a SQLite docker image with a persistent volume comes to mind, for example.

Nope, sqlite allow only 1 connection to write at once, u can read but write = bottleneck

@jstnmthw
Copy link

Nope, sqlite allow only 1 connection to write at once, u can read but write = bottleneck

Bottleneck != not possible.

Besides in real world scenario you might achieve somewhere between write 20k writes per second. How often are you writing to your database? And even if you were.

@daffyyyy
Copy link
Owner

Nope, sqlite allow only 1 connection to write at once, u can read but write = bottleneck

Bottleneck != not possible.

Besides in real world scenario you might achieve somewhere between write 20k writes per second. How often are you writing to your database? And even if you were.

Penalties with timemode set to 0 update database every minute for each player.
When player connect with new nickname but banned, then plugin update nickname/ip in database.
When player connect then plugin save ip to database (if new IP) even if not banned.
Connect = map change too

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

No branches or pull requests

4 participants