Multiple Choice Questions and Answers on RPC and REST

Summary

This document contains multiple choice questions and answers on Remote Procedure Calls (RPC) and REST architectural style, suitable for students studying computer science or software engineering.

Full Transcript

Add the following multiple choice questions and answers and explanations verbatim (DO NOT change the given wording). ========================================== New Question 1: What does the "clear contract" advantage of RPC refer to? Choice A: The use of standard HTTP methods. Choice B: The explici...

Add the following multiple choice questions and answers and explanations verbatim (DO NOT change the given wording). ========================================== New Question 1: What does the "clear contract" advantage of RPC refer to? Choice A: The use of standard HTTP methods. Choice B: The explicit definition of procedures between client and server. Choice C: The ability to handle multiple data formats. Choice D: The independence from server-side implementations. Correct answer: B Explanation: The "clear contract" in RPC means that the procedures or methods are explicitly defined between the client and server, outlining how they interact. ========================================== New Question 2: In what scenario is REST more appropriate than RPC according to the article? Choice A: When implementing tightly coupled server operations. Choice B: For internal microservices communication requiring high efficiency. Choice C: For public APIs requiring scalability and a uniform interface. Choice D: When requiring stateful interactions between client and server. Correct answer: C Explanation: REST is generally more suited for web services and public APIs where scalability, caching, and a uniform interface are important. ========================================== New Question 3: What distinguishes REST as an architectural style compared to RPC as a protocol? Choice A: REST uses binary data formats, while RPC uses text-based formats. Choice B: REST relies on standard HTTP methods, while RPC focuses on remote method execution. Choice C: REST is tightly coupled to server methods, while RPC is resource-oriented. Choice D: REST maintains client context between requests, while RPC is stateless. Correct answer: B Explanation: REST is an architectural style that uses standard HTTP methods to manipulate resources, whereas RPC is a protocol focused on executing remote methods. ========================================== New Question 4: Which data serialization format is specifically associated with enhancing RPC performance? Choice A: XML Choice B: JSON Choice C: Protocol Buffers Choice D: YAML Correct answer: C Explanation: Protocol Buffers, used in binary RPC implementations like gRPC, improve performance by being more efficient in data transfer. ==========================================

Use Quizgecko on...
Browser
Browser