Repository navigation
Replies: 4 comments
|
First of all, I really like PR #70. I think the Extensions system is an excellent step forward, especially the GitHub-based installation, catalogs, package preview, trust confirmation, and lifecycle management. After looking at the implementation, I'd like to suggest a possible next step that builds directly on top of it. I think there is an opportunity to evolve this system from managing external extensions into a foundation for a fully modular OpenStreamMS architecture. Extensions vs. First-Class Components I see an important distinction between two concepts: Extensions add functionality to an existing OpenStreamMS installation. First-Class Components provide the actual functionality of OpenStreamMS itself, but are developed and maintained independently. For example, imagine gradually separating these subsystems: Streaming Host Provider Network Management Device and Gamepad Management Virtual Display Audio Management Session Management Each could eventually have its own repository, maintainers, development cycle, and releases. The main OpenStreamMS repository would remain responsible for the Core: orchestration, dashboard, central API, configuration, and communication between components. Why not use Extensions for everything? The current extension model is a great starting point, but some internal subsystems need deeper integration than scripts can provide. For example, a Streaming Host Provider needs a well-defined interface for starting, stopping, configuring, and monitoring streaming instances. A Network Component needs to communicate with session management and expose network capabilities. A Device Component needs to integrate with device assignment and isolation. These should be first-class integration contracts rather than collections of installation scripts. A possible evolution I would suggest keeping the current Extensions system and gradually introducing a more formal component architecture alongside it. The existing Extension Manager could eventually become part of a broader Component Manager, responsible for both official components and community extensions. This would avoid throwing away the work already done in PR #70. The important distinction would be that official components can integrate deeply with the Core through stable APIs, while community extensions can continue using the existing extension capabilities. The long-term goal OpenStreamMS would no longer need to implement and maintain every subsystem inside one large repository. Developers could work on individual components independently, release improvements without rebuilding the entire application, and maintain alternative implementations. I think PR #70 provides a very good foundation for starting this evolution. Would you consider this distinction between Extensions and First-Class Components as a possible direction for the next architectural stage? |
|
Hi! Thanks for taking the time to write this up in so much detail. I really like the ideas, and the short answer is yes: in general, the direction is to make OpenStreamMS as modular as possible. I share the core vision. The Core should orchestrate and provide a consistent experience (dashboard, service, API, configuration and component management) without knowing the internals of every subsystem. The more each piece can evolve at its own pace, the better for everyone. I also think the distinction between extensions and first-class components is spot on. The extension system in #70 was designed to add things on top of an existing installation. You're right that pieces like a streaming host provider, per-session networking or device isolation need formal A few things I want to keep in mind along the way:
I agree with the gradual approach: define the boundary, design the API, extract one subsystem as a proof of concept, and validate the full lifecycle before moving on. The streaming host provider looks like a good first candidate to me, since the interface (start, stop, configure, monitor) is If you're up for it, it would be great if you could put together a first draft of that provider interface in a separate discussion or PR, and we can refine it from there. Thanks again for pushing in this direction! |
|
Thank you for the positive response to the modular architecture proposal. I'm glad we're aligned on the overall direction. As suggested, I'd like to start with a first draft of a Streaming Host Provider API. I think this is a good first step toward first-class modular components because streaming hosts are a clearly identifiable subsystem, and there are already several potential implementations: Sunshine, Apollo, and Vibepollo. The goal is not to force all streaming hosts to behave identically. Instead, the goal is to define a stable contract that allows OpenStreamMS Core to manage different providers without depending on their internal implementation details.
The proposed architecture would look something like this: The Core should communicate with a provider through a documented interface rather than directly managing host-specific processes, configuration files, ports, or internal APIs. Each provider would be responsible for translating the common contract into the operations required by its underlying streaming host. This separation should also make it possible to add future providers without modifying the Core every time.
OpenStreamMS Core The Core should own the common orchestration layer: Discover and register installed providers. Validate provider and Core API compatibility. Select the active provider. Pass configuration and lifecycle requests. Monitor provider health and availability. Collect diagnostics and report errors. Coordinate provider updates and activation. Expose a consistent management experience through the Dashboard and API. The Core should not need to know how a particular host stores its configuration, starts its processes, or implements its streaming functionality. Streaming Host Provider Each provider should implement the common contract and handle host-specific operations: Initialize and validate its environment. Start and stop the underlying host. Manage host-specific configuration. Report runtime status and health. Expose supported capabilities. Provide diagnostics. Handle host-specific errors and recovery where appropriate. A provider should not advertise functionality that its underlying host cannot actually support.
The following is a conceptual interface, not a final implementation proposal. public interface IStreamingHostProvider } The interface is intentionally small. Additional functionality should be introduced through capabilities or later API versions rather than making every provider implement features it does not support. ProviderInfo Describes the provider itself: Provider ID. Display name. Provider version. Supported Core API version range. Underlying host name and version. Publisher and package information. ProviderStatus Should distinguish between different runtime states, for example: NotInitialized Stopped Starting Running Stopping Unhealthy Error Importantly, Running should ideally mean that the host is actually ready to accept connections, not merely that its process exists. ProviderCapabilities A provider should explicitly declare what it supports. For example: { This is illustrative only. The actual capability names and definitions should be standardized. The Core can then enable or disable relevant features depending on the active provider. For example, a provider that supports only one host instance should not be treated as equivalent to a provider that can manage multiple independent streaming instances.
This is particularly important for OpenStreamMS. The current project has functionality that goes beyond simply starting a streaming server. It includes per-session instances, port management, pairing considerations, and integration with the session infrastructure. I would therefore suggest treating multi-session support as an explicit capability rather than assuming that every streaming host supports it. Eventually, the API could introduce an optional session-aware interface: public interface ISessionAwareStreamingHostProvider } Providers that do not support independent session instances would simply not implement this optional interface or advertise the corresponding capability. This would help preserve OpenStreamMS-specific functionality without forcing it into a generic single-instance host model.
Each provider should own its host-specific configuration. The Core should manage common settings and provide a consistent configuration experience, while provider-specific settings should remain under the provider's control. A possible separation: Core configuration: selected provider, lifecycle settings, common network preferences. Provider configuration: host-specific options, paths, ports, encoding settings, and other implementation details. Session configuration: settings associated with an individual session or host instance. This would reduce coupling and make switching providers less complicated.
Every provider should declare its compatibility with the Core API. For example: { The Component Manager should validate compatibility before activation. I would also separate two concepts: Provider lifecycle Install Initialize Start Stop Update Uninstall Host runtime lifecycle Start host Stop host Monitor host Apply host configuration This distinction matters because installing or updating a provider is not necessarily the same operation as starting or stopping its streaming host. For the first implementation, I would avoid requiring every provider to use the same execution model. Some could be managed .NET modules, while others might need an isolated process or a dedicated service. The management contract should remain consistent even if the implementation differs.
The API should provide structured errors instead of relying exclusively on log messages. Possible error categories: InitializationFailed CompatibilityError HostStartFailed HostStopFailed ConfigurationError DependencyMissing HostUnhealthy The Core should be able to distinguish between a provider failure and a failure in the underlying host. Health monitoring should also be independent of process monitoring. A process can be running while its streaming service is unavailable.
I suggest keeping the first implementation deliberately small. A possible sequence: Agree on the provider contract and capability model. Define the provider manifest and Core API compatibility rules. Extract one existing streaming host integration into a separate provider. Make the Core manage it through the new interface. Validate installation, initialization, start, stop, configuration, health monitoring, and recovery. Verify that existing OpenStreamMS functionality remains intact. Sunshine seems like a practical first candidate because it is already deeply integrated into OpenStreamMS. However, I would not assume that a standard Sunshine installation can replace the current modified Sunshine-Web-RTC implementation. Any OpenStreamMS-specific functionality required for multi-session operation must be preserved or explicitly accounted for in the provider contract. Once the first provider works, we can evaluate how well the same contract accommodates Apollo and Vibepollo.
Before moving toward implementation, I'd especially like to get your opinion on a few architectural decisions: Provider boundary: Should the provider API initially cover only streaming host lifecycle and configuration, or should it also own host-specific port allocation, pairing, and per-session instance management? Execution model: Would you prefer providers to run inside the Core process initially, or should we design the contract to support out-of-process providers from the beginning? Session management: Should multi-session functionality be an optional extension of the base provider API, as suggested above, or should it be part of the initial contract? Component Manager: Should the existing Extension Manager gradually evolve into the unified Component Manager, with extensions and first-class components using different capability and lifecycle contracts? First PoC: Would extracting the current Sunshine integration be the best first step, or would you prefer a smaller standalone provider implementation to validate the architecture? Final thoughts I see this as the first building block toward a more modular OpenStreamMS architecture, not an attempt to redesign the entire application at once. The main objective is to establish a stable boundary between the Core and its subsystems. If we get this boundary right, future components such as network adapters, device isolation, virtual displays, and session management could follow the same architectural direction while retaining their own implementation and release cycles. |
|
Thanks a lot for this, it's a really solid first draft. Splitting the provider lifecycle from the host runtime, Long term, I'm in: I'd like OpenStreamMS to end up as a Core plus independent components. But I want to be honest about what it buys us and what it costs today, so we pick the right first steps. What the Sunshine integration does todayThe contract has to cover more than start/stop:
Pros
Cons
Proposed pathStart with the pieces that pay off now and don't lock us in:
Your questions
If you'd like to take one of these, step 2 is a great first PR (interfaces and DTOs plus a Sunshine adapter wrapping the current code). I'm happy to review it and help with the parts that touch sessions and gamepads. |
Uh oh!
There was an error while loading. Please reload this page.
Hi!
Following our previous discussion about the Community Components Manager, I've been thinking about a broader architectural direction that could potentially benefit OpenStreamMS in the long term.
I'd like to share an idea that goes beyond simply allowing community-developed components.
The core idea
What if OpenStreamMS evolved into a modular platform where the main application acts as the central orchestrator, while individual subsystems are developed, maintained, released, and updated independently?
Instead of keeping most functionality inside one increasingly large repository, each major subsystem could have its own dedicated repository.
OpenStreamMS Core would remain responsible for bringing everything together and providing a consistent user experience.
In other words:
Core manages the platform.
Components provide specific functionality.
A standardized interface connects them.
A component manager handles their lifecycle.
Possible component structure
For example:
Streaming Host Providers — Sunshine, Apollo, Vibepollo, and future alternatives.
Network Management — virtual adapters, NAT, bridging, and per-session networking.
Device Management — USB assignment, HID, gamepad isolation.
Virtual Display — RemoteIdd and alternative display implementations.
Session Management — session orchestration and related functionality.
Audio Components — audio capture and routing.
Community Components — independently developed extensions.
These are examples of possible boundaries, not a proposal to immediately create all these repositories.
What would OpenStreamMS Core do?
The Core would provide:
Dashboard and user interface.
Central service and API.
Component discovery and management.
Communication between components.
Dependency and compatibility management.
Component installation, updates, and removal.
Version management and rollback.
Security and integrity verification.
The Core should not need to know the internal implementation details of every component. It should interact with them through documented and stable interfaces.
Why I think this matters
This architecture could make OpenStreamMS much easier to develop and maintain.
A developer working on network isolation would not need to modify the streaming subsystem.
Someone improving Apollo integration could release a new provider without requiring a complete OpenStreamMS release.
Community developers could create extensions without maintaining a fork of the entire project.
Users could install only the functionality they actually need.
Most importantly, individual components could evolve at different speeds without forcing the whole platform to move together.
A gradual transition
I'm not suggesting rewriting or splitting the entire project immediately.
A reasonable approach could be:
Define the Core/component boundary.
Design a stable Component API.
Introduce a basic Component Manager.
Extract one relatively independent subsystem as a proof of concept.
Validate independent development, installation, updates, and rollback.
Gradually apply the architecture to other subsystems.
I see this as an evolution of OpenStreamMS rather than a rewrite.
The main question I'd like to discuss is:
Would you consider evolving OpenStreamMS from a single application with integrated subsystems into a modular platform where independently maintained components work together through a common Core?
I believe this could become a very strong foundation for the project's future.
All reactions