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
Currently we provide a very simple model, the HTTP request blocks until the operation is known to be safely finished, or error.
This means that REST requests that result in chain transactions will block until the transaction is mined and confirmed, which can take a little while.
Motivation
The above approach is fine for some use cases, however it lacks visibility on what is happening in Raiden node. To improve the visibility of the system the API has to move away from blocking for the complete operation, and return data more often to the API user.
For transactions that means that once a transaction is sent the tx_hash can be returned to the client, and once the transaction is mined the result of the operation can be returned.
There are two models we can use, one that pushes notifications through a socket, e.g. a websocket. Another model is to use long polling. Infrastructure wise both model should be very similar.
The text was updated successfully, but these errors were encountered:
An interim solution would be to keep the existing API, but provide an extra endpoint that could provide server-side events, or any other form of asynchronous server -> client communication.
This would allow the developers to make the changes piecemeal, or only for the points of interested for other consumers of the API.
Abstract
Currently we provide a very simple model, the HTTP request blocks until the operation is known to be safely finished, or error.
This means that REST requests that result in chain transactions will block until the transaction is mined and confirmed, which can take a little while.
Motivation
The above approach is fine for some use cases, however it lacks visibility on what is happening in Raiden node. To improve the visibility of the system the API has to move away from blocking for the complete operation, and return data more often to the API user.
For transactions that means that once a transaction is sent the
tx_hash
can be returned to the client, and once the transaction is mined the result of the operation can be returned.There are two models we can use, one that pushes notifications through a socket, e.g. a websocket. Another model is to use long polling. Infrastructure wise both model should be very similar.
The text was updated successfully, but these errors were encountered: