-
Notifications
You must be signed in to change notification settings - Fork 5
Architecture documentation #117
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
Conversation
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.
Pull request overview
This PR introduces comprehensive architecture documentation for OpenRemote, focusing on the overall system architecture, event-driven mechanisms, and attribute event processing flows. The documentation provides a solid foundation for understanding the core components and their interactions within the OpenRemote manager.
Key Changes:
- New overall architecture documentation explaining the Container, services, and asset-based context broker model
- Detailed event-driven mechanism documentation with Mermaid class diagram showing key Event classes
- Comprehensive AttributeEvent ingress and processing flow documentation covering MQTT, REST API, and WebSocket entry points
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| The whole system is event driven. Different types of events can occur in the system, all inheriting from the root [Event](https://www.javadoc.io/doc/io.openremote/openremote-model/latest/org/openremote/model/event/Event.html) class. | ||
|
|
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.
Some history/context. SharedEvent is the super type of any Event that is shared between the backend and frontend and historically and still mostly refers to communication over the Websocket API.
Websocket doesn't have a topic concept so we use a string prefix with colon to indicate the message type e.g. EVENT:
| [AssetProcessingService.processAttributeEvent()](https://github.com/openremote/openremote/blob/151af17d0e502f0fa7a377cd34b8416350bc1794/manager/src/main/java/org/openremote/manager/asset/AssetProcessingService.java#L341) is really where all processing happens. | ||
|
|
||
| A lock is immediately taken on the asset (assetId based) and during this lock: | ||
| - [Asset](https://www.javadoc.io/doc/io.openremote/openremote-model/latest/org/openremote/model/asset/Asset.html) is retrieved from DB |
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.
This is a major bottleneck for event processing
This is really a first go at it, lots of information missing but:
An effort to clean-up / improve the javadoc and the REST API doc should also be done in //.