-
Notifications
You must be signed in to change notification settings - Fork 4
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
Database and connectivity #7
Comments
As much as I agree with the "one source of true" part I do not think that pub/sub is fast enough. For the pub/sub thing this already been done by one of the members of our community here From what I heard is would't be ideal for sector but if we want to consider Redis we should ask him for the pros and cons of this solution. I was more thinking about using proprietary tcp solution that would be fast and extremely scalable when it comes to the dynamic mode Another problem with using a standard database is speed. If we would to send data to it and receive it on every transport this would create a huge lag. I think we should use it one - on join. Everything later would be happening via spigot data and communication protocol that we would decide on We also could just use redis - It is fast due to it's in memory way of storing data and it is also persistent. If we decide to use it we can just save a lot of time on pub/sub and also have a great database to relay on |
bruh |
After a long discussion on bookitty we have decides to do an abstraction that would support easy changing of broker system and for start implement it with redis |
For persistent data storage I think we should just use MySQL, we can change it later on if it poses too much trouble. There isn't a point in discussing that subject for days or even weeks when we don't have anything at all so we can't just test our assumptions and pick the best option available. |
I'm not very experienced in distributed programming for Minecraft, but I can express my opinion on options you considered here.
Summarizing, in my opinion abstraction layer for message brokers (with default implementation of Redis) + PostgreSQL is the way to go. When performance of Redis will not be satisfying (highly doubt) you can always implement other solutions such as Kafka, RabbitMQ. |
Just curious, I believe you're talking about performance, how could it affect it? If used right, redis should be just distributed cache and something wrong must happen to make it perform poorly
I think that abstraction layer for all external services should be created, for any case in which we discover some service is restraining us hard in the future |
Yeah, you are right, we should do an abstraction layer for all external services. |
I was talking about server in host meaning, not in Minecraft server meaning. Redis taking up a lot of memory can affect other services running on the same host making them run less performant/crash etc. That was my argument against using redis as primary database. |
So to recap we are starting with redis and MySql as the first implementation of the abstraction layer? |
I believe that one of the most important things are good choices of database and methods of communication between instances and proxies. For start it could be enough to just assume that there is only one proxy server and number of minecraft server instances that is declared once and never changes, but we can do better than this. It would be perfect to make it possible for server owners to add more sectors if they feel like it, so we shouldn't just trust spigot server with what it believes is player equipment, coordinates etc., we should store it in separate database that will be the single source of truth. We need to pick good database engine for it and it should be great to have only one database engine required for the project to run, so we wouldn't one day wake up with 3 different databases for different purposes, and some other software that we depend on. I think about 3 options, but I'll be happy for other sugestions in this thread:
Also, another thing to consider, a bit related to databases (so its in the same discussion issue), is communication method for plugins to exchange data and notify other nodes about events that they should be aware about. I'm not 100% sure, but it may be achievable by usage of Plugin channels, but this looks very primitive and I believe that use of pub-sub solution may be the better idea. One of such solutions may be redis pub/sub, but if you know something that may suit better - let us know in this issue!
The text was updated successfully, but these errors were encountered: