fission-codes / fission

Fission CLI & server
https://runfission.com/docs
119 stars 14 forks source link

Callback option for IPFS upload or pin #110

Closed expede closed 3 years ago

expede commented 5 years ago

NB: Feature requests will only be considered if they solve a pain

Summary

Problem

Large files will hold the client's connection for a long time, now that we're configured the server to have a long timeout

Impact

If someone is on a single-threaded system (e.g. Ruby), it may block their application.

Solution

Provide a callback option to make a request to when the pin succeeds or fails. Something like this:

POST /ipfs/QmMyAwesomeCID?wait=false&callback_url=foo.com/isdone

In which case, if they don't specify the callback_url, we make a request to a standard endpoint along the lines of

<CALLER_URL_FROM_REQUEST_INFO>/fission/complete/<CID>

(We don't need a response ID, since it can be inferred from the CID)

expede commented 3 years ago

No longer relevant, as is solved at fission-suite/webnative