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
{{ message }}
This repository has been archived by the owner on Apr 23, 2024. It is now read-only.
The open, payment, and close functionality introduced for #217 (pr #221) is not consistent about whether it is synchronous or asynchronous. For example, the open is asynchronous, the payment is asynchronous, but the close is synchronous. This is confusing.
There are arguments both ways for synchronous or asynchronous. And synchronous behavior can always be made asynchronous, and asynchronous behavior can always be made synchronous. Typically the former is easier, however there is no guarantee that replies from remote participants are instantaneous, which leads me to think we should develop asynchronous functionality, even if it is a little more complex.
Therefore, I think all the functions should probably be asynchronous, except when submitting txs to the network since Horizon limits us to synchronous submission until something like stellar/go#3564 is implemented.
Open() should return immediately after sending the remote participant the open proposal and the result of the open should be returned to the application through an event handler.
Payment() should continue to be asynchronous as it is today.
Close() should return immediately sending the remote participant the close proposal after getting a successful declaration tx submission to network.
The text was updated successfully, but these errors were encountered:
The open, payment, and close functionality introduced for #217 (pr #221) is not consistent about whether it is synchronous or asynchronous. For example, the open is asynchronous, the payment is asynchronous, but the close is synchronous. This is confusing.
There are arguments both ways for synchronous or asynchronous. And synchronous behavior can always be made asynchronous, and asynchronous behavior can always be made synchronous. Typically the former is easier, however there is no guarantee that replies from remote participants are instantaneous, which leads me to think we should develop asynchronous functionality, even if it is a little more complex.
Therefore, I think all the functions should probably be asynchronous, except when submitting txs to the network since Horizon limits us to synchronous submission until something like stellar/go#3564 is implemented.
Open()
should return immediately after sending the remote participant the open proposal and the result of the open should be returned to the application through an event handler.Payment()
should continue to be asynchronous as it is today.Close()
should return immediately sending the remote participant the close proposal after getting a successful declaration tx submission to network.The text was updated successfully, but these errors were encountered: