jargon

Comparison

Remote proxyvsVirtual proxy

Remote proxy

the call looked like an ordinary method on an ordinary object and it went over the network and timed out.

A local object standing in for one in another process, turning method calls into requests. Every generated gRPC or SOAP client is one. The pattern's most important lesson is a negative one: making a remote call look identical to a local call hides latency, partial failure and serialisation cost, which is the whole argument of the fallacies of distributed computing.

Full entry →

Virtual proxy

you had an object with an id and nothing else, and touching any other property fired a query.

A proxy that stands in for an expensive object and creates or loads it on first real use. It is the mechanism behind ORM lazy loading and behind placeholder objects in graphics and document systems. Its characteristic problem is that the cost is invisible at the call site, which is precisely how the N+1 query gets written by someone who thought they were reading a field.

Full entry →

Related comparisons