Transition to the Component-Based Model #2336
Draft
DmitryAstafyev wants to merge 121 commits intomasterfrom
Draft
Transition to the Component-Based Model #2336DmitryAstafyev wants to merge 121 commits intomasterfrom
DmitryAstafyev wants to merge 121 commits intomasterfrom
Conversation
6f48c4f to
9115ff6
Compare
marcmo
reviewed
Jul 9, 2025
| /// - Component instances are created on demand and immediately passed upwards for further use; they | ||
| /// are not retained by `Components`. | ||
| /// | ||
| pub struct Components<S, P> { |
Member
There was a problem hiding this comment.
then please also name it Registry, not Components
marcmo
reviewed
Jul 9, 2025
Comment on lines
59
to
60
| components: HashMap<Uuid, Entry<S, P>>, | ||
| } |
Member
There was a problem hiding this comment.
if we distinguish between Parsers and Sources (as we should do) it makes no sense to introduce an Entry type.
just store it it
parserssources
in 2 different hashmaps
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
These changes involve a fundamental shift in the application's architecture regarding embedded parsers and data sources.
Problem Statement
Currently, every parser or source is represented as a variant in a common enum. As a result, all related types (such as settings, options, etc.) become part of the core application and propagate to higher layers. This significantly reduces flexibility. For example, adding or removing a parser/source requires modifying dozens of modules across the application.
Solution (Basic Description)
Outcome
Chipmunk as a service
One more important motivation point is: this refactoring will allow delivery
chipmunkas a tiny service in a way - "only necessary coverage". In other words, if we need DLT tracking service, we can easily remove all unrelated stuff (serial, commands, SomeIp, etc.) and deliverydlt-chipmunkservice as well.Of course, that's also a huge cleanup of the API, which is very important from a service perspective. Stability of API (non-sensitive to supported components) will allow us to wrap the core into an executable service without pain.
Upgrade / refactoring roadmap
Design
Core
LogRecordWriterto keepMessageProducercancel-safe as welltailfeatureSDEchannelLogRecordWriterwith databasesElectron layer (
ts-binding,electron,platform)ObserveobjectClient
Observeobjecthistorymodule (stored recent action information)Tests
Observeobject related tests