Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
MelodyAyane authored Jan 6, 2025
1 parent 750d7aa commit 199a228
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions player/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@

## 📚 Table of Contents

- [Introduction](#introduction)
- [Automation](#automation)
- [Key Components](#key-components)
- [Data Processes](#data-processes)
- [Performance Optimizations](#performance-optimizations)
- [Summary](#summary)
- [License](#license)
- [Introduction](#-introduction)
- [Automation](#-automation)
- [Key Components](#-key-components)
- [Data Processes](#-data-processes)
- [Performance Optimizations](#️-performance-optimizations)
- [Summary](#-summary)
- [License](#-license)

---

Expand Down Expand Up @@ -50,19 +50,23 @@ Automates the management and synchronization of player data across multiple laye

1. **Check L1 Cache**:
- **Note**: Optimized for online players; not queried for offline data.

2. **Query L2 Cache (Redis)**:
- **Cache Hit**: Retrieve data, store in L1, return to requester.
- **Cache Miss**: Query MongoDB.

3. **Query Database (MongoDB)**:
- **Success**: Retrieve, store in L1, return data.
- **No Data Found**: Create new record, store in L1.

### 🚪 Player Logout Process

1. **Retrieve All Instances**: Gather all instances of `LegacyPlayerDataService`.

2. **Compare L1 and L2 Cache**:
- **Consistent**: No changes needed.
- **Inconsistent**: Update L2 with L1 data.

3. **Remove Player Data**: Delete from L1 to maintain integrity.

### 🔄 Data Synchronization
Expand All @@ -76,6 +80,7 @@ Automates the management and synchronization of player data across multiple laye
- Ensure distributed synchronization.
- Update L2 cache directly.
- **L2 Cache Miss**: Update database.

2. **Process on Each Server**:
- **Online Player**: Sync updated data from L2 to L1.

Expand Down Expand Up @@ -110,6 +115,3 @@ In conclusion, this design maximizes data retrieval efficiency, ensures consiste
## 📄 License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.



0 comments on commit 199a228

Please sign in to comment.