-
Notifications
You must be signed in to change notification settings - Fork 2
Socket Based Subscriptions #9
Description
The current architecture for communication between the client and server is a traditional request-response based model where the react client requests for any resource or action from the backend. Mechanisms similar to polling have been used implement a heartbeat route to check whether the backend is alive . However for obvious reasons, this is not the most optimal way to go about this.
A mechanism that enables real time communication would be a much better solution. Web Sockets seem to be a good fit for this task. I feel there are four important use cases of this architecture as of now :
1)Realtime wallet updates: This involves notifying the users when new funds are received.
2)Coinjoin updates: This would involve displaying the offers taker receives during a coinjoin. Adding an additional functionality of accepting or rejecting the offer directly from the client software would be another improvement.
3)Maker notifications : Alerting the user whenever a maker transaction succeeds from their wallets. This should display the transaction details and the amount.
4)Heartbeat Route: Upgrading the current heartbeat mechanism from polling to subscription based model.
Hence the idea of having a Publisher Subscriber Architecture seems to be a good idea.
Note: This would require updates in both the frontend and backend. Autobahn seems to be useful for developing such Pub-Sub based designs.