Remote / foldkit-remote
Limits
RemoteRpc's schemas are the wire contract, carried by Effect RPC, by JSON overPOST(Remote.http), or over aMessagePort; the application supplies deployment layers.ReadBatchandLiveRequirementcarryREMOTE_PROTOCOL_VERSION, and a mismatched version fails withRemoteProtocolErrorrather than silently drifting.- One request may name at most
MAX_FIELDS_PER_REQUEST(256) fields of one entity and nest relations at mostMAX_RELATION_DEPTH(8) levels; the wire rejects larger inputs. A live stream carries at mostMAX_LIVE_QUERIES(32) lists, and amanyrelation read whole is bounded by the server's Source (maxCollectioninfoldkit-remote-drizzle). - The wire
LiveChangeunion carries entity patches/deletes and connection insert/remove/invalidate changes;RemoteServer.liveserves them as a stream. - Coalescing is scoped to one
RemoteClientlayer. Separate layers do not share batches. - Retention keeps what active Surfaces (and explicit retain entries) reach, and
what the Surfaces left reached while it fits the budget (
Remote.make({ budget }), entries of rows and lists). Past it, the Surface left longest ago loses its cache onRetentionChanged. The budget is a count of entries, not bytes: a row with a large field costs what a small one does. - Two applications with the same Model type are not distinguishable by TypeScript
alone;
Data.subscriptionsalso checks the Surface owner token at runtime. staleWhileRevalidate({ maxAge })ages rows and lists alike; a list's age is that of its last whole page; a later page or a live event does not date it; a row's is that of its oldest field, so a write of some fields can bring the row's refetch forward, never put it off.RemoteDatais a closed union.- A Selection must choose at least one field; an empty Selection would require
nothing and misleadingly read
Readyfor every id, so it is rejected.