-
Notifications
You must be signed in to change notification settings - Fork 38
Transition to the Component-Based Model #2336
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
base: master
Are you sure you want to change the base?
Conversation
6f48c4f to
9115ff6
Compare
| /// - Component instances are created on demand and immediately passed upwards for further use; they | ||
| /// are not retained by `Components`. | ||
| /// | ||
| pub struct Components<S, P> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
then please also name it Registry, not Components
| components: HashMap<Uuid, Entry<S, P>>, | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
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