RepositoryC#
mehdihadeli

mehdihadeli/game-leaderboard-microservices

🎮 Implementation of an imaginary Game Leader Board application, based on Microservices Architecture, Event Driven Architecture, Vertical Slice Architecture, Event Sourcing with EventStoreDB, Redis SortedSet, Redis Pub/Sub, SignalR and .Net 9.

66sao
17fork
0issue
0lượt xem

Thành tựu nổi bật

Những danh hiệu mới nhất của dự án

1
TINIX TRENDING·Chủ đề: microservice-example

#1 Repository của tháng

1
TINIX TRENDING·Chủ đề: eventstoredb

#1 Repository của tháng

2
TINIX TRENDING·Chủ đề: masstransit

#2 Repository của tháng

🎮 Game LeaderBoard thời gian thực với Event Sourcing + Redis SortedSet

Xếp hạng người chơi được tính toán ngay lập tức nhờ Redis SortedSet, hỗ trợ lên tới 1 triệu yêu cầu mỗi giây.

game-leaderboard-microservices là dự án mẫu của Mehdi Hadeli, xây dựng trên nền tảng Microservices, Event Driven Architecture và Vertical Slice Architecture với .NET 9. Ứng dụng mô phỏng bảng xếp hạng game sử dụng EventStoreDB làm cơ sở dữ liệu chính, kết hợp Redis SortedSet để tính toán hạng ngay lập tức và SignalR để đẩy cập nhật theo thời gian thực tới client.

✨ Điểm nổi bật

  • Kiến trúc Vertical Slice: tách biệt rõ ràng theo tính năng, dễ mở rộng và bảo trì.
  • Event Driven Architecture: giao tiếp bất đồng bộ qua RabbitMQ và MassTransit.
  • Outbox & Inbox Pattern: đảm bảo giao hàng ít nhất một lần và xử lý trùng lặp ở phía nhận.
  • CQRS với MediatR: tách biệt lệnh và truy vấn, tối ưu hiệu năng.
  • Redis SortedSet: tính toán xếp hạng người chơi nhanh chóng, hỗ trợ hàng triệu yêu cầu/giây.
  • Redis Pub/Sub: hỗ trợ một số kênh truyền tin bất đồng bộ nhẹ.
  • EventStoreDB: lưu trữ sự kiện làm nguồn dữ liệu chính, hỗ trợ Event Sourcing.
  • Chiến lược cache đa dạng: Read-Through, Write-Through, Write-Behind và Cache-Aside trên Redis.

💡 Vì sao đáng chú ý

Không chỉ là demo cơ bản, dự án này kết hợp nhiều mẫu thiết kế nâng cao như Outbox/Inbox Pattern để đảm bảo độ tin cậy trong giao tiếp giữa các dịch vụ, đồng thời dùng Redis SortedSet để tính toán hạng một cách tối ưu — tránh tính toán lại toàn bộ danh sách mỗi khi có thay đổi. Đây là lựa chọn lý tưởng cho các hệ thống cần cập nhật xếp hạng thời gian thực với khối lượng truy cập lớn.


#GameLeaderboard #Microservices #EventSourcing #Redis #DotNet9 #TiniX

Dự án tương tự

Khám phá các dự án và mô hình AI khác có sự tương đồng.

RepositoryC#
mehdihadeli/food-delivery-microservices

🍔 A practical and cloud-native food delivery microservices, built with .Net Aspire, .Net 10, Wolverine, Domain-Driven Design, CQRS, Vertical Slice Architecture, Event-Driven Architecture, and the latest technologies.

1.0k
Oct 14, 2026
RepositoryJava
eugene-khyst/postgresql-event-sourcing

A reference implementation of an event-sourced system that uses PostgreSQL as an event store built with Spring Boot. Fork the repository and use it as a template for your projects. Or clone the repository and run end-to-end tests to see how everything works together.

1.4k
Mar 23, 2026
RepositoryC#
dotnet/aspnetcore

ASP.NET Core is a cross-platform .NET framework for building modern cloud-based web applications on Windows, Mac, or Linux.

38.6k
Nov 30, 2026
RepositoryC#
bitwarden/server

Bitwarden infrastructure/backend (API, database, Docker, etc).

20.8k
Dec 1, 2026
RepositoryC#
kgrzybek/modular-monolith-with-ddd

Full Modular Monolith application with Domain-Driven Design approach.

14.2k
Jun 4, 2024
RepositoryC#
aspnetboilerplate/aspnetboilerplate

ASP.NET Boilerplate - Web Application Framework

12.0k
Dec 1, 2026
RepositoryC#
nopSolutions/nopCommerce

ASP.NET Core eCommerce software. nopCommerce is a free and open-source shopping cart.

10.2k
Nov 27, 2026
RepositoryC#
kurrent-io/KurrentDB

KurrentDB is a database that's engineered for modern software applications and event-driven architectures. Its event-native design simplifies data modeling and preserves data integrity while the integrated streaming engine solves distributed messaging challenges and ensures data consistency.

5.9k
Nov 26, 2026
RepositoryC#
eventflow/EventFlow

Async/await first CQRS+ES and DDD framework for .NET

2.6k
Oct 4, 2026