Upgrade HTTP request calls from `query` to `update` (upon canister's request)

(Copied from megathread)

I propose that my PR to upgrade HTTP request calls from query to update (upon canister’s request) be considered for merging, with some feedback about anything that may be blocking it.

7 Likes

Yes, I think that dominics main claim on twitter is that the internet-computer can serve web directly without the need for untrustworthy front-ends hosted on amazon servers, well making a http-request-call into the IC as a query call is the SAME THING AS HOSTING A FRONT-END ON AMAZON-SERVERS! How is the claim that this ic-blockchain can serve web true if the blockchain is not serving any web because query calls dont go through a blockchain.

Better let’s not get distracted by tweets here and rather discuss the technicalities of changing the actual status quo :slight_smile:

1 Like

:slightly_smiling_face: What are the technicalities? (Open question)

With the canister paying for itself, the more want there is for the update-calls the more the network grows.

2 Likes

@nomeata, what changes are required to the service worker?

I’ve been using the branch from the PR I linked above and hadn’t considered needing to change the service worker.

Just to confirm, this PR does not support streaming uploads, right?

For example, to upload an asset >2 MB in size.

@jzxchiang More than 2mb calls is a separate thing, this is giving a canister (or the writer of a canister somehow) the choice to make browser standard http_request calls into an update-call that goes through the full-consensus.

@jzxchiang my PR doesn’t change anything about streaming. If streaming uploads were/are implemented separately then this may work for those too.

Yeah, but there needs to be custom support for streaming uploads, just like there was custom support for streaming downloads.

In other words, the HttpRequest message probably needs to include a StreamingStrategy, so that icx-proxy can repeatedly call some callback method with new data that it receives via the stream from the client.

But yeah, as you said, that would be a different changelist.

It applies if you want to upload (or POST) a 10 MB file, for example. See my response above.

We (Fleek) would really appreciate this feature as well. We need it for several of our products.

6 Likes

@diegop hey can we get a word on this status? What is the thinking of the dfinity-team behind this restriction?

My pull request was approved this morning. I’m just waiting on some feedback on how to address the last remaining linter error.

7 Likes

Yes we reviewed yesterday and was merged in today.

But I think Paul beat me to the punch.

2 Likes

Not merged yet, but soon hopefully.

2 Likes

Will it be possible to do the same at the canister level?

Is this live?
(Scnr)

@diegop Awesome! Gratitude.
I will test this out.
Someone ping when this is live.

Following up: did this get merged, @paulyoung ? if not, let me know so i can follow up internally.

2 Likes