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

Server run modes and multi-server dispatch support #74

Merged
10 commits merged into from
Apr 21, 2022

Conversation

4Benj
Copy link
Member

@4Benj 4Benj commented Apr 21, 2022

Changes:

  • The server can now be ran in HYBRID (original), DISPATCH_ONLY, or GAME_ONLY modes, which as the name suggests turns on and off the dispatch and game servers depending on its value in the config
  • Multiple game servers can be configured in the server's configured so players can connect to different servers setup by server administrators.
  • Completely overhauled the config to move things into dispatch or game server only sections

Things that need to be improved:

  • Currently the game servers does not connect to the dispatch server to communicate. In order to authenticate the user, game servers need access to the dispatch database. The current plan is for creating an authentication route in the dispatch server to checking the user's session token.

image

@4Benj
Copy link
Member Author

4Benj commented Apr 21, 2022

Have just realised there is an issue in HYBRID mode where the user data isn't stored correctly on the dispatch server.
Fix is currently being attempted.

@4Benj
Copy link
Member Author

4Benj commented Apr 21, 2022

I had to get rid of my users hashmap in the dispatch server as it wasn't doing what I intended at all.
The only solution I can see now is connecting the game server to the dispatch server which will have to be done anyway 😢

@4Benj
Copy link
Member Author

4Benj commented Apr 21, 2022

Other then that though everything works and is safe to merge. Unless the maintainers want the servers to be connected first.

@Mar0xy
Copy link

Mar0xy commented Apr 21, 2022

IMO The servers should be connected first for simplicity reasons instead of complicating it further down the line but hey that's just my opinion.

PacketPlayerLoginRsp now creates the required QuerryCurrRegionHttpRsp itself.
@4Benj
Copy link
Member Author

4Benj commented Apr 21, 2022

All the issues with PlayerLoginRsp should now be fixed 👍
It's ready to be merged but I'll probably do another PR another day adding routes to the dispatch server that verifies the player's session, so then we don't have to have two databases on one server.

@ghost ghost merged commit a05f827 into Grasscutters:development Apr 21, 2022
Birdulon pushed a commit to Birdulon/Grasscutter that referenced this pull request Aug 21, 2022
Server run modes and multi-server dispatch support
This pull request was closed.
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

Successfully merging this pull request may close these issues.

2 participants