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

Communications and data caching #26

Open
axyiee opened this issue Apr 24, 2022 · 0 comments
Open

Communications and data caching #26

axyiee opened this issue Apr 24, 2022 · 0 comments
Assignees
Labels
🤷 good first issue Good for newcomers ❗ priority: high 🌊 proxy plugins Issue or pull request related to our Flamecord/Waterfall plugins 💜 purpur plugins Issue or pull request related to our Purpur plugins 😴 rest Issue or pull request related to the REST modules 🔒 security Issue or pull request for security improvements 🏗️ structuring This issue or pull request is related in how we can improve the project structure

Comments

@axyiee
Copy link
Member

axyiee commented Apr 24, 2022

Communications and data caching

Table of contents:

Summary

We need to find out a good solution for communication between modules, servers and a good way to cache data and keep it always up-to-date.

The proposed solution

RabbitMQ

RabbitMQ is the most widely deployed open source message broker. It is probably the most robust solution for this problem.

Sockets

A alternative to RabbitMQ would be creating our own message broker implementation through TCP sockets. The reason why TCP is better for this specific scenario is because it has lost packet retransmission features, and we wouldn't want to have losses in communications.

Communications-based caching

The communications-based caching is a technique for always having data up-to-date. It would work in the following process:

  1. Whenever the player logs into any server, make a request to the web server about the player's data and store it in local cache
  2. Save multi server data (global player data, party info, etc.) in the proxy, and pass it to other servers via communications - RabbitMQ
  3. Use Redis to store some private info like a JWT key for accessing private web server endpoints
  4. Whenever there is some change in the local cache of some server, send a request to the web server updating the data
  5. Be able to update the local cache forcibly through communications, and always notify by communications when some data is changed, to be able to change in the local caches

Reference

  1. RabbitMQ
  2. Redis
  3. What is a web server?
  4. TCP Packet Retransmission

Final considerations

Suggestions are appreciated for new sections in this issue, or if you have a better idea about how to improve our communications or/and data caching structure, feel free to let us know about it by commenting down below. Thank you for the attention.

@axyiee axyiee added 🤷 good first issue Good for newcomers 💜 purpur plugins Issue or pull request related to our Purpur plugins 🌊 proxy plugins Issue or pull request related to our Flamecord/Waterfall plugins 😴 rest Issue or pull request related to the REST modules 🔒 security Issue or pull request for security improvements ❗ priority: high 🏗️ structuring This issue or pull request is related in how we can improve the project structure labels Apr 24, 2022
@axyiee axyiee self-assigned this Apr 24, 2022
@axyiee axyiee pinned this issue Apr 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤷 good first issue Good for newcomers ❗ priority: high 🌊 proxy plugins Issue or pull request related to our Flamecord/Waterfall plugins 💜 purpur plugins Issue or pull request related to our Purpur plugins 😴 rest Issue or pull request related to the REST modules 🔒 security Issue or pull request for security improvements 🏗️ structuring This issue or pull request is related in how we can improve the project structure
Projects
None yet
Development

No branches or pull requests

1 participant