Implement worker queue / cron system to chronologically process fleet missions #363
Labels
⚡️ enhancement
New feature or request
fleet dispatch system
Issues regarding the fleet dispatch system
Current Situation
PlanetService::updateFleetMissions()
.Problem
Inconsistent mission processing
The current system can lead to inconsistent mission processing:
This creates potential conflicts and unfair gameplay scenarios.
Large battle processing
Large battles with millions of units can take a relatively long time to process. PR #517 introduced the Rust Battle Engine which is up to 200x more performant than the PHP Battle Engine, which already saves a lot of time. However there are still usecases where even the Rust Battle Engine takes up too much time to process during a user request.
E.g. issue #503 mentioned a usecase where the defender player had 28M destroyer units on the planet. With a battle of 15M attacker units and 28M defender units the Rust Battle Engine takes up to 800MB of memory and 10+ seconds to process.
Moving over the fleet mission processing to the worker queue will prevent user requests from hanging for multiple seconds in case of very large battles.
Proposed Solution
Implement an independent worker queue / cron system for background fleet mission processing.
Requirements
Key Considerations
Next Steps
Additional Notes
The text was updated successfully, but these errors were encountered: