RDKEMW-9355: Add Support to run app widgets in different contexts wit…#90
Conversation
8d02025 to
f5caf6e
Compare
LCOV - code coverage report
|
There was a problem hiding this comment.
Pull request overview
This PR adds support for running application widgets in different contexts within a single process by introducing a client/server architecture for container namespace management. The changes enable the runtime to launch HTML-based applications in external containers while maintaining JavaScript applications in the main process, allowing for better resource isolation and multi-context support.
Key Changes:
- Introduced
IExternalApplicationHandlerinterface and container namespace utilities for managing applications across different execution contexts - Enhanced
JSRuntimeServerto route HTML applications to external handlers while keeping JavaScript apps in the main renderer - Changed WebSocket server port from 9112 to 5000
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 17 comments.
Show a summary per file
| File | Description |
|---|---|
| include/JSRuntimeServer.h | Added IExternalApplicationHandler member and updated initialize method signature to accept external handler |
| include/JSRuntimeContainer.h | New header defining container namespace management utilities (network, mount, IPC namespaces) and WebSocket client functions |
| src/jsruntime.cpp | Updated server initialization call to pass nullptr for external handler parameter |
| src/JSRuntimeServer.cpp | Added runExternalApplication RPC method, HTML detection logic in launchApplication, fixed if-else chain, and external handler integration |
| src/JSRuntimeContainer.cpp | New implementation providing namespace entry, container PID discovery, IP address retrieval, WebSocket client, and app config parsing |
| src/JSRuntimeClientContainer.cpp | New client executable demonstrating container-based application launching |
| CMakeLists.txt | Changed WebSocket port to 5000, fixed JSRuntimeServer.cpp inclusion, added container library and executable build targets |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
madanagopalt
left a comment
There was a problem hiding this comment.
please look at one minor comment
…hin a single process Reason for change: Changes related to client/server Test Procedure: build should be successful. Risks: low Priority: P2
f5caf6e to
f2fbbe9
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 33 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…hin a single process
Reason for change: Changes related to client/server
Test Procedure: build should be successful.
Risks: low
Priority: P2