-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
asynchronous POST to the message API #28
Comments
@onthebreeze's comment in #14 means that we should POST a list of messages (not an individual message), and receive a list of receipts in response. |
Note also: if the message TX API returns a receipt (which is a reference number, generated by the node that writes to the ledger), then there will be a difference with the message RX API. message TX API:
message RX API
Because we are creating messages with status=pending, we need something that updates the status with something like The blockchain observer component (channel specific) could be responsible for patching the message to update the status ( |
also - message TX API definitely needs to be asynchronous, but I'm not sure that message RX API needs to be. |
In the doc, (section "Message API") you state:
I don't think that's quite right.
201
(created), not 200 (OK)Written vs. not-written is a bit nuanced in DLT. It's a slightly arbitrary decision, how many blocks on top of the last block do you consider successfully written? In other words, how deeply might a fork run before it's resolved? That question is technology specific, so should be answered by a technology specific component, not the generic interface.
Suggest an alternative that
POST {message} /{message api}/
should return 201 and some sender reference (receipt), and subsequent calls toGET /{message api}/{receipt}
should return a status ofpending
,accepted
orrejected
. That way, the technology specific apparatus of the channel can make a decision about the status of the message asynchronously.The text was updated successfully, but these errors were encountered: