You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since Owncast was built one piece at a time, with no overarching design upfront, the architecture reflects that. This needs to be resolved.
Things should be split up into dependencies that are injected into packages, top down. For example, the datastore should be injected to the user package instead of the package requesting GetDatastore().
A DI framework such as Dingo or fx may add structure around this, but it's not required.
Things like chat, activitypub and webhooks need to be treated differently. For example, chat is both a package that is currently treated as a standalone service, but chat is also used seen as a dependency for other services to reflect events that occur within Owncast. I think a middle-man service, something like an eventhub could be an answer. Where the eventhub, and only the eventhub, has a reference to the chat server, and all packages can have a reference to the eventhub injected. The eventhub then can do things like fire off chat, activitypub, webhook and plugin events as needed, without the packages knowing the specifics about these destinations
But experimentation and the determination of what pieces go where need to be done. I'll probably want to diagram this before writing any code.
The text was updated successfully, but these errors were encountered:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If this was a feature request that others have shown no interest in then it's likely to not get implemented due to lack of interest. If others also want to see this feature then now is the time to say something! Thank you for your contributions.
Since Owncast was built one piece at a time, with no overarching design upfront, the architecture reflects that. This needs to be resolved.
Things should be split up into dependencies that are injected into packages, top down. For example, the datastore should be injected to the
user
package instead of the package requestingGetDatastore()
.A DI framework such as Dingo or fx may add structure around this, but it's not required.
Things like chat, activitypub and webhooks need to be treated differently. For example, chat is both a package that is currently treated as a standalone service, but chat is also used seen as a dependency for other services to reflect events that occur within Owncast. I think a middle-man service, something like an
eventhub
could be an answer. Where the eventhub, and only the eventhub, has a reference to the chat server, and all packages can have a reference to the eventhub injected. The eventhub then can do things like fire off chat, activitypub, webhook and plugin events as needed, without the packages knowing the specifics about these destinationsBut experimentation and the determination of what pieces go where need to be done. I'll probably want to diagram this before writing any code.
The text was updated successfully, but these errors were encountered: