The 2mb file limit came from a restriction on message sizes that came from wasm, however we’ve worked around it by supporting chunking in DFX.
This is not entirely accurate: The 2MB restriction on message sizes is in “the replica”, i.e. the Internet Computer implementation. WebAssembly itself has no such restriction.
It seems that currently, the same limit applies to the size of update calls (user to canister, via consensus), query calls (user to canister, one node only) and inter-canister calls (canister to canister), both for the call and the response. One could imagine different limits (e.g. larger query responses), but it would at least break the uniformity of the messaging abstraction. In any case, there ought to be some limit, so this chunking in the HTTP Gateway is a great way to avoid issues here.
From what I can infer from what you said, a developer would, by design, not have direct access to the Replicas, only to the Canister that they are working within. The canister would simply forward the request to the replica, and funnel the response back into the canister.
Hmm, there might some terminology confusion here… are you confusing “canister” with “edge node/HTTP gateway”?
Developers create canisters (i.e. services). These run on a subnet, which is the same thing as saying that these run on many nodes/replicas simulatenously. Users can interact with the canisters; this interaction goes through the edge nodes (which route the request to a suitable node/replica that’s part of the right subnet for this canister).
I was mainly just wondering if it’s possible to interact with Replicas from the perspective of the developer in some theoretical case where you might need to run something on the “edge” of the network as Dfinity is doing here with the HTTP Gateway.
Ah, I see. Right now, user code (i.e. canisters) do not run on the edge nodes, but there is a vision that eventually, query calls (those that do not need to go through consensus and don’t change state) can be executed by the edge node directly, instead of by the node that takes part in a subnet. The Internet Computer is designed so that such an optimization can be introduced without the developers worrying about it, though.