wr
hn
Top
New
Best
Ask
Show
Jobs
Back
g
garethalpha
Joined 7 years ago
Karma
3
Submissions
2
Member since
Oct 31
View on Hacker News
Recent submissions
Comment · 2 years ago
Those APIs (i.e. fetch) are regular async/promise based. And in this synthetic scenario you can't construct your response-to-caller without something in that respond payload. I don't see a way to solve this all with magic.
Comment · 2 years ago
They don't mention how the Output Gates interact with things other than the HTTP response. So it seems entirely possible that you could write some data, notify some other system with a POST message, and then try to respond OK to your caller... only to lose the write. Caller doesn't get his OK, but the other system DOES receive a POSTed message. Could be a different channel, e.g. websocket. Could be a write to D1, or KV. Many ways this leads to inconsistent state.