NASA-AMMOS / NASA-AMMOS/plandev
Reconsider the activity validation event process flow
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 128
- Forks
- 33
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 12
Description
The event trigger activity parameter validation change that we reverted causes the system to become bogged down when many activities are added to a plan. Large batches of activities can be added to a plan via after a scheduling run completes or via a mutation on the API. Currently a single event is fired for each changed activity. Additionally, the mission model associated with each activity is loaded and unloaded for each activity check. For example, I added 20K activities to a plan via the API, and it took Aerie ~2 hrs to work through all the activity validations. We will likely need to rethink the way we implement this capability.
Some initial thoughts: batch up/debounce changes against a mission model and validate all activities in a batch with a single mission model load and unload.
Depending on our solution options, if we are unable to resolve this burden on the system we'll need to roll back the change until we have a solution we are happy with.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing reverted pull request #370 and tracing the event-trigger validation flow for API mutations and post-scheduling activity batches. Compare the per-activity event and mission-model load behavior described here with possible batching or debouncing approaches. Done means the validation burden for large activity batches is resolved without requiring a rollback.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend, performance
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100