feat: implement redis caching actor#4
Open
haongo138 wants to merge 8 commits intowebuild-community:masterfrom
Open
feat: implement redis caching actor#4haongo138 wants to merge 8 commits intowebuild-community:masterfrom
haongo138 wants to merge 8 commits intowebuild-community:masterfrom
Conversation
hieuphq
reviewed
Dec 13, 2023
hieuphq
reviewed
Dec 13, 2023
|
|
||
| #[derive(Serialize, Deserialize)] | ||
| struct ScoreboardEntry { | ||
| player_id: u32, |
There was a problem hiding this comment.
Can we expose more data? how about name, sth like that. We can't show the data just the id
Author
There was a problem hiding this comment.
Thanks, I just pushed my refactor to include more info (api_key, team_name) in scoreboard response.
hieuphq
reviewed
Dec 13, 2023
f9e0186 to
43f1268
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This pull request aims to integrate Redis into our application as an actor, enabling us to cache game state data for future use.
Changes
Implement a
StoreActorto handle Redis GET / SET actions:game.state.scoreboard) at game end by keyroom:{room_id}:scoreboardapi_key,team_name) onPlayerJoinedmessage/rooms/{room_token}/scoreboardto get afinishedroom's scoreboardExample response: