Reviewed by Aditya Kumar · Last reviewed 2026-03-24
**Why RMI Needs Proxies**: Clients invoke remote objects as if local; stubs/skeletons provide location transparency and serialization. **Stub (Client-side)**: Proxy for remote object; marshals arguments, sends over network, unmarshals return. Acts as local representative....
Why RMI Needs Proxies: Clients invoke remote objects as if local; stubs/skeletons provide location transparency and serialization.
Stub (Client-side): Proxy for remote object; marshals arguments, sends over network, unmarshals return. Acts as local representative.
Skeleton (Server-side): Receives calls, unmarshals args, invokes real object, marshals result. Modern Java RMI uses dynamic stub replacing skeleton.
Data Flow: Client -> stub (serialize) -> network -> skeleton (deserialize) -> server object.
Scalability: Each remote call incurs network latency; use for coarse-grained ops. At JP Morgan: consider serialization cost for large payloads.
Pro-Move: Note modern RMI uses single stub; mention serialization overhead and when to prefer REST/gRPC for distributed systems.
According to DataEngPrep.tech, this is one of the most frequently asked General/Other interview questions, reported at 1 company. DataEngPrep.tech maintains an editor-reviewed database of 1,863 data engineering interview questions across 7 categories.