Practice
Solution
Step 1: Identify the role of conflict resolution in collaborative editing
Concurrent edits from multiple users require a mechanism to merge changes without overwriting or losing data. Simple serialization or ordering is insufficient due to network delays and offline edits.Step 2: Understand why OT or CRDT is needed
Operational Transformation (OT) and Conflict-free Replicated Data Types (CRDTs) are designed to transform or merge concurrent operations in real-time, ensuring eventual consistency without central locking.Final Answer:
Option B -> Option BQuick Check:
OT/CRDT engines merge concurrent edits without locking or strict ordering [check]
Solution
Step 1: Understand OT engine's role at concurrent operation receipt
The OT engine must handle concurrent operations arriving out of order or simultaneously and merge them without losing user intent.Step 2: Recognize OT transformation process
OT transforms one operation against another to adjust positions and effects, preserving both users' intentions and maintaining consistency.Final Answer:
Option A -> Option AQuick Check:
OT transforms concurrent ops to preserve intention and order [check]
Solution
Step 1: Evaluate coordination and consistency trade-offs
Centralized locks (A) and linearizable transactions (C) impose coordination and reduce availability. Message queues with synchronous aggregation (D) add latency and bottlenecks.Step 2: Recognize sharded CRDT counters provide eventual consistency with no coordination
They allow concurrent increments and asynchronous merges, fitting minimal coordination and strong eventual consistency.Final Answer:
Option A -> Option AQuick Check:
Sharded CRDTs enable coordination-free eventual consistency [check]
Solution
Step 1: Analyze architecture trade-offs
Synchronous two-phase commit (Use a synchronous two-phase commit protocol across all services to guarantee atomicity) blocks and reduces throughput; centralized DB (Use a centralized relational database with serializable transactions for all payment states) limits scalability; client-side retries (Use client-side retries with unique request IDs and eventual consistency in backend) risk inconsistent states.Step 2: Evaluate event-driven approach
Kafka event sourcing with idempotent consumers supports high throughput, fault tolerance, and exactly-once processing semantics.Final Answer:
Option A -> Option AQuick Check:
Kafka event sourcing -> scalable, fault-tolerant, idempotent processing [check]
Solution
Step 1: Identify HTTP/3 transport and encryption
HTTP/3 uses QUIC over UDP with built-in TLS encryption per connection, increasing CPU load for handshake and encryption at scale.Step 2: Eliminate other bottlenecks
UDP packet loss is network-level, not server bottleneck; WebSockets are not natively supported by HTTP/3 but unrelated to scaling HTTP/3 itself; HTTP/3 does not use TCP.Final Answer:
Option B -> Option BQuick Check:
QUIC's per-connection TLS handshake CPU load limits HTTP/3 scale [check]
