Saved in this browser - sign in to keep your review list.
How should your speech become text?
Listening… your words appear above as you speak - tap Stop when you're done.
Recording · cr - tap Stop & transcribe when you're done.
Transcribing with AI…
Voice:
Keep going - a few more words and AI can grade it.
Interview lens
How interviewers actually use this question
Likely follow-ups
When would you use server streaming instead of paging through results with repeated unary calls?Streaming sends rows as soon as they're ready. Paged unary calls are easier to retry, cache and resume after a failure. Say which one your case needs.
Give a real use case for client streaming. Why not just send one big request?Think chunked file uploads or batched sensor readings. The client sends pieces as they're ready, and a single message has a size limit.
How does a stream end, and how does the client learn it failed halfway through?The server closes with a status code in the trailers. Messages already received still count, so the client must handle a partial result or resume.
Which of the four method types can a browser call through gRPC-Web?Unary and server streaming work. Client and bidirectional streaming don't, so a chat feature in the browser needs another transport like WebSockets.
What you can say
gRPC has four method types, and the only difference is where the stream keyword goes in the .proto: on the request, the response, both, or neither.
Unary is the plain case, one request and one response, like GetUser returning a User, and it's what most methods should be.
Server streaming takes one request and sends back a stream, like ListUsers sending users one at a time instead of one giant list.
Client streaming flips that. The client sends a stream, like CreateUsers, and the server answers once with a single response.
Bidirectional streaming lets both sides send streams over the same call, each at its own pace, which fits something like chat.
Streaming has a cost. Long-lived calls are harder to load balance, retry and debug, so I default to unary and stream only when data arrives over time.
Weak answers to avoid
Lists 'unary, streaming, bidi' and stopsThat drops client streaming and hides the direction. Name all four by who sends many messages: the client, the server, both, or neither.
Treats streaming as the faster choiceLong-lived streams are harder to load balance, retry and debug. Say streaming fits data that arrives over time, and unary stays the default.
Describes bidi as request, reply, request, replyThe two streams are independent. Each side reads and writes at its own pace, and the server doesn't have to answer every message in turn.
Gives definitions with no use caseBare definitions sound memorized. Tie each type to a case: fetch one record, feed a long result list, upload chunks, run a chat.
Interview lens
Likely follow-ups, what you can say, and the weak answers to avoid.