Currently there is only a single method on the MeshRestClient to create a websocket to connect to the eventbus. After that, there is no way for a developer to know what to send to the socket to register events or how to receive events. We need to discuss how these Methods could look like.
Example
One way to implement this would be RxJava2 Observables:
Observable<NodeUpdateEvent> nodeUpdate()
This would connect to the eventbus when the Observable is subscribed and disconnect when unsubscribed. One disadvantage is that some events require a response which cannot be implemented with a single observable.
Description
Currently there is only a single method on the MeshRestClient to create a websocket to connect to the eventbus. After that, there is no way for a developer to know what to send to the socket to register events or how to receive events. We need to discuss how these Methods could look like.
Example
One way to implement this would be RxJava2 Observables:
This would connect to the eventbus when the Observable is subscribed and disconnect when unsubscribed. One disadvantage is that some events require a response which cannot be implemented with a single observable.