Real-time Leaderboards: Get instant updates when scores change
Multiple Time Frames: Support for daily, weekly, monthly, and all-time leaderboards
Scalable Architecture: Built with Redis for real-time data and ScyllaDB for historical storage
WebSocket Support: Real-time notifications for leaderboard changes
Flexible Scoring: Support for different scoring strategies (highest, latest, cumulative)
Customizable Score Aggregation: Per-leaderboard mathematical formulas for score calculation
Advanced Math Operations: Integration with Math.js for complex statistical calculations
Custom Display IDs: Specify your own IDs when creating leaderboards, with per-owner uniqueness
Extensible Metadata System: Store custom configuration and UI settings with each leaderboard
Pagination: Efficient retrieval of large leaderboards
User History: Track a user's performance over time
Game-specific Leaderboards: Organize leaderboards by game
Comprehensive API: RESTful endpoints for all operations
User Management: Complete user management with authentication and authorization
Bulk Operations: Support for bulk creating leaderboards and adding entries
Robust Leaderboard Reset: Securely reset leaderboards with distributed locking to prevent race conditions
Historical Snapshots: Create snapshots before resetting leaderboards to preserve historical data
Role-Based Time Restrictions: Configurable time-based access controls based on user roles
Strategic Cache Invalidation: Sophisticated cache management to ensure data consistency
1.
Each leaderboard's scoring rule is stored in its metadata in ScyllaDB
2.
When a score is submitted, the rule is loaded and applied automatically
3.
Calculations occur server-side, ensuring consistent application of rules
4.
Optional metadata can track score history and calculation details
1.
Custom Identifiers: Specify your own IDs when creating leaderboards
2.
Per-Owner Uniqueness: Different owners can use the same display ID
3.
Public Access: Retrieve leaderboards by display ID without authentication
4.
No Schema Changes: Uses existing metadata field, avoiding migrations
Meaningful Identifiers: Use IDs that make sense for your application
Easier Integration: Simplify integration with other systems
User-Friendly URLs: Create cleaner, more readable URLs
Predictable References: Reference leaderboards with known IDs in your code
Custom JSON Storage: Store any valid JSON data as metadata with leaderboards and entries
Schema-Free Design: Add custom fields without requiring database schema changes
Intelligent Merging: New metadata merges with existing values, preserving critical data
Dual Redis/ScyllaDB Storage: Metadata is stored in both databases for performance and reliability
UI Customization: Store display preferences, color schemes, and formatting options
Game-Specific Data: Include game modes, seasons, levels, and other contextual information
Administrative Tags: Add searchable tags and categories for organization
Client Configuration: Store client-side rendering options and behavior settings
1.
Storage: Metadata is stored as a JSON string in both Redis and ScyllaDB
2.
Validation: All metadata is validated to ensure it's proper JSON before storage
3.
Merging: New metadata is intelligently merged with existing data
4.
Preservation: Important data like score aggregation rules are preserved during updates
5.
Cache Invalidation: Updates automatically invalidate Redis cache to ensure consistency
1.
Deal cards to players and dealer
2.
Players make decisions (hit/stand) based on basic strategy
3.
Dealer plays according to house rules (hit until 17+)
4.
Calculate outcomes (win/loss/push)
6.
Send results to leaderboard service
1.
Single Source of Truth: Statistics calculated in one place
2.
Consistency: Rules applied uniformly across all entries
3.
Reduced Client Complexity: Clients only need to send raw data
4.
Cheat Prevention: Clients can't manipulate statistics directly
5.
Extended Analytics: Complex metrics like winRate automatically calculated
6.
History Tracking: Score and statistic changes preserved over time