-
Notifications
You must be signed in to change notification settings - Fork 556
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
[POC]: Engine Abstraction #9602
Comments
Friday - 2022-06-24The first day of the POC just creating some issues and starting to look at the code. Notes:
|
Monday - 2022-06-27I continued looking at the code and found some more interesting facts. It feels a lot of coupling between StreamProcessor and Processors etc. Did several notes again today, I will post them here to free my brain and make it transparent what I'm doing. I will continue looking at the code and try to find out where to start. You can watch the branch for updates as well https://github.com/camunda/zeebe/tree/zell-poc-engine-abstraction Notes:
|
Tuesday - 2022-06-28Spent only half day on the POC Notes:
|
Wednesday - 2022-06-29Again only a half day to work on this topic. What I plan to investigate today:
As everyday I will update this comment during my progress. Notes:
|
Thursday - 2022-06-30Again half-day of POC. Plan for today, add error handling to the engine, and introduce the SchedulingService abstraction. Notes:
Next steps:
|
SummaryTL;DR;
DetailsIn the last week, I spent some time doing the POC and implementing Proposal #9601. I was able to implement most of it, of course, some of this is still a bit hacky, and it is not fully working nor complete. At some point, I stopped fixing tests, etc. Still, it gives a good idea of how it can look in the end, especially how it would improve our boundaries. Furthermore, I see a good possibility to completely split up the StreamPlatform from the engine into separate modules, which allows us also to better test each component. How it can look likeThe following order is not necessarily the order how to implement it. Overview:
DetailsWritersOne of the bigger parts is removing/replacing the writers in the engine and making it return something. During the POC I came to the conclusion that we can just rename the current writers since they are already an abstraction that we can reuse.
Processing
Error Handling
SchedulingService
Findings
|
|
Minor suggestions regarding the naming:
|
Thanks @saig0 and @npepinpe for your feedback and input I moved you comments to the related sub-topics. Feel free to discuss there further with the team. The following I think are currently out of scope.
Not sure whether I get the idea, and yes sounds a bit overengineered right now.
As mentioned earlier we will focus first on the StreamProcessing and Engine part and abstraction. We might be able to run the StreamProcessor later together with both the engine and exporter but this is not clear yet see #9725
Let's take a look at this after we did most of the needed changes. I will close with this the POC, we have a break down of the topic here #9600 |
9756: Hide scheduling behind interface r=pihme a=pihme ## Description In terms of the scope defined in #9730 this implements the following: - [x] Create a new interface for the ProcessingScheduleService (with narrowed scope) - [x] Possibily only two methods, runDelayed and runComplete take a look at the POC #9602 - [x] Implement the interface - [x] Before migrating to the new abstraction, migrate the ActorCOntrol#runAtFixedRate consumers to the #runDelayed usage, this means after each run the job needs to be scheduled again - [x] Migrate step by step the actorControl usage - [x] Remove the actor control from the ProcessingContext ## Related issues related to #9730 ## Review Hints * This is not the final form of the scheduling interface, instead the focus of this PR is to hide all the dependencies behind an interface first * The change is not a pure refactoring. So there is a residual risk that the behavior is different in subtle ways (which is why I would like to have a review by both of you) * The new code sometimes (indirectly) calls different methods on the `ActorControl`. Therefore there might be differences in the way tasks are scheduled (top of queue/bottom of queue; fast lane or not). The intention of the change was to simplify the interface that is available to the engine. In this regard some subtle changes are unavoidable * Part of the simplification is also that the engine does not have access to something like a `ScheduledTimer`. Therefore, the engine is unable to cancel tasks which have been scheduled * `RunAtFixedRate` has been replaced by tasks that reschedule themselves after they are called * There is a difference in the way exceptions are propagated. See commit message a406d3f for one such example * Other than that, the tests pass and I just started a QA run, so let's see 🤞 Co-authored-by: pihme <pihme@users.noreply.github.com>
Based on the proposal #9601 I will do a POC to verify the idea and maybe uncover some edge cases. I will use this issue to document my findings and certainties and uncertainties.
Part of #9600
The text was updated successfully, but these errors were encountered: