Go Concurrency, Cross-Language Comparison, Database Trade-offs, and Storage Design
Part A — Concurrency in Go
-
Explain synchronous vs asynchronous execution in Go and how it differs from blocking vs non-blocking I/O.
-
Compare OS threads and goroutines, covering:
-
Scheduler model
-
Stack growth
-
Memory overhead
-
Context-switch cost
-
Communication patterns (channels vs shared memory)
-
Contrast Go's concurrency model with at least one other language (e.g., Java, Python, or C++). Discuss how threads, async/await, and the GIL (if applicable) affect throughput and latency.
Part B — Database Systems
Compare relational, document, columnar, and key–value stores in terms of:
-
Data modeling flexibility
-
Transactions (ACID vs BASE)
-
Indexing and joins
-
Scalability via sharding/replication
-
Typical use cases
Part C — System Design: Flight Booking Platform
Given a flight-booking platform that supports complex search and high write concurrency, propose an end-to-end storage design. Include:
-
Primary database choice and rationale
-
Schema or document design
-
Caching layer
-
Read and write paths
-
Justify trade-offs