RPC and Distributed Systems Review Questions
RPC and Distributed Systems Review Questions
Exactly-once semantics ensure that a remote procedure is invoked exactly one time without duplicates, providing transaction safety, but they can incur higher complexity with failure detection and recovery mechanisms . At-least-once semantics focus on executing the procedure at least once, potentially causing duplication but are simpler to implement. Considering financial transactions require high reliability and correctness, exactly-once semantics would be more suitable to ensure no duplicate transactions occur .
A startup should ensure that their logistics operations require high scalability, fault tolerance, and modular growth to justify adopting a distributed system. The benefits of distributed processing, such as parallel handling of multiple logistics processes and improved system reliability through redundancy, should outweigh the increased complexity and overhead . They must also have adequate resources and expertise to manage distributed system complexities .
RESTful APIs could be more appropriate for a distributed file storage system due to their stateless nature, scalability, and the use of standard HTTP methods that fit well with web standards and distributed environments. RESTful systems are typically easier to implement and integrate with existing web technologies. RPC might offer performance advantages in certain scenarios but could be more complex to implement and maintain, lacking the stateless operations REST provides .
RPC systems employ mechanisms like retries, acknowledgments, and error handling to ensure message delivery, which might not meet the stringent timing constraints required in real-time systems such as embedded control systems in aviation where low latency and predictable timing are critical . Real-time systems require deterministic fault tolerance mechanisms that guarantee timely task completion, which may not align with typical RPC mechanisms . Therefore, RPC's fault tolerance mechanisms might be insufficient for real-time requirements without significant enhancements .
A distributed operating system would be recommended for a smart city infrastructure project, as it offers crucial advantages like enhanced fault tolerance through redundancy and distributed resources, improved scalability by handling increased loads efficiently, and better responsiveness by localizing processing near users. Centralized systems might struggle with single points of failure and scaling issues as the city infrastructure grows .
Asynchronous RPC can improve system responsiveness and resource utilization by allowing requests to be processed concurrently without the sender waiting for the receiver's response, leading to better parallelism and reduced idle time. This can be especially beneficial in a microservices architecture where multiple services may need to interact simultaneously . Asynchronous RPC is often recommended in such contexts for improved efficiency and scalability, although it introduces complexity in handling responses and state management .
gRPC might be optimal for a distributed e-commerce platform due to its support for multiple languages, efficient binary serialization, and built-in load balancing and authentication, which are essential for scalability and security . Java RMI provides robust object-oriented communication but is tied to Java, limiting interoperability with other languages. CORBA supports language interoperability but is complex to use. gRPC balances modern requirements for scalability, language support, and ease of integration with existing environments .
Designers should aim for a balanced approach, prioritizing transparency to ensure ease of use and user-friendliness unless performance becomes a critical bottleneck . In scenarios where performance dictates user experience or cost efficiency, performance might need prioritization. A well-designed system should gradually reveal complexity and afford control over transparency when needed, catering to specific system requirements or constraints .
Dynamic binding is preferable for a highly scalable cloud-based service because it allows more flexibility in distributing components across the network and easier version updates or changes without stopping the service, which is crucial for scalability and service uptime . Static binding, although simpler, binds more rigidly to specific interfaces or resources, limiting flexibility and scalability .
Location transparency can become a liability when precise control over data location is needed, such as complying with data residency laws or optimizing performance with geo-local optimization. In such scenarios, hiding the data's physical location can lead to inefficiencies or regulatory challenges . Transparency assumes connectivity and performance are equivalent across locations, which might not always hold true, revealing potential pitfalls in performance and legal compliance .