Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor RollupService.handleRollups #1135

Open
andyjb opened this issue Jan 17, 2022 · 0 comments
Open

Refactor RollupService.handleRollups #1135

andyjb opened this issue Jan 17, 2022 · 0 comments

Comments

@andyjb
Copy link
Contributor

andyjb commented Jan 17, 2022

In order to prepare for providing an option to process rollups using CDC/Eventing, the logic around providing the data and mechanism for calculating the rollups needs to be adjusted.

CDC will provide different information rather than Trigger.oldMap and Trigger.newMap values. The handleRollups method needs to become a generic processor of known steps regardless of whether CDC is being used or not, which lends itself to a factory pattern.

The common operations across implementations need to be identified, and an abstract class created containing them. A concrete class for the current way needs to be created, extending the abstract class of course.

Decision logic should be added into RollupService to allow the selection of the correct implementation.

For now, there's no requirement to implement the CDC version, this will be created separately.

Ensure that all tests continue to pass as before.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Back to Roadmap
Development

No branches or pull requests

1 participant