You are interviewing for a backend engineering role. Answer the following conceptual questions clearly and with concrete examples.
1) Synchronous vs asynchronous
-
Define
synchronous
and
asynchronous
execution.
-
Explain how this differs from
blocking vs non-blocking
I/O.
-
Give an example of each in a backend service (e.g., handling HTTP requests, calling downstream services).
2) Go: channels vs shared-memory concurrency
-
Explain Go’s concurrency model at a high level (goroutines, scheduler).
-
Compare
communicating via channels
vs
sharing memory with locks
.
-
When would you prefer each approach? Call out common pitfalls (deadlocks, data races, goroutine leaks).
3) SQL vs NoSQL
-
Compare relational databases and common NoSQL types (key-value, document, wide-column).
-
Discuss trade-offs across:
-
data modeling and query patterns
-
transactions and consistency guarantees
-
scaling (vertical vs horizontal)
-
operational complexity
-
Provide a couple of example use cases where you would strongly prefer SQL, and where you would strongly prefer NoSQL.