Computer Networks · 免费预览
远程过程调用
客户端-服务器应用以请求和应答的模式思考,这种模式既不匹配数据报也不匹配字节流,因此远程过程调用让程序能够像调用本地过程一样调用另一台机器上的过程;客户端和服务器桩根据为每种语言编译的接口定义,将参数封装进消息并解封回来;底层传输层会重传请求,并将应答保留足够长的时间以应对重复请求;而最根本的问题是一次重试的调用可能被执行多少次——最多一次语义要求服务器按通道记录请求,零次或多次仅对幂等操作才可接受,在网络和服务器都可能失效的世界里,恰好一次是无法实现的。
1. The Request-Reply Pattern
The Request-Reply Pattern
2. Stubs and Interfaces
Stubs and Interfaces
3. Reliability Without a Stream
Reliability Without a Stream
4. How Many Times May It Run
How Many Times May It Run
5. The missing fit
Why do request-reply applications not simply use TCP for everything?
6. The stub's secret
What does a client stub procedure actually do when application code calls what looks like a local procedure?
7. The remembered reply
A server executes a request and its reply is lost. The client retransmits the request. What must the server do?
8. At-most-once pricing
What does at-most-once execution cost the server?
9. Idempotence
When is zero-or-more semantics acceptable for a remote call?
10. Exactly-once
Why is exactly-once execution unachievable in RPC?
11. The translator's name
What is the generated client-side placeholder called that presents a local procedure signature while packaging arguments for the wire?
12. The wire format step
What is the process called by which a stub packs arguments and results into the agreed network byte format?
13. The shared definition
Stubs for different languages are generated from a single shared description of procedures and types, written in what kind of language?
14. The harmless repeat
What adjective describes an operation that can be executed any number of times with the same effect as one execution?