I now have added a raw WebSocket endpoint that distributes the current SourceInfo to the client that initiated a connection. In the next step I will connect the client application with this endpoint and register a listener which updates all source related things in the client when a SourceInfo message is received on that endpoint.
When this is done, I will improve the backend so that every time when a Source or its status is changed the current SourceInfo of all sources will be distributed to each client currently listening on that endpoint.
After that I will remove the REST endpoint that currently is used for polling the current Source status.
The source code of the project can be found here:
https://gitlab.marvin-haagen.de/software/oskar
Alternativly you can also find the source code on my old gitlab.com account, where the projects main branch is being duplicated to:
https://gitlab.com/marvinh/oskar