Design Parsing Boundaries for Interdependent Message Types
Applied IntuitionSoftware Engineer · Technical ScreenLast updated
Design parsing and type-resolution boundaries for interdependent message definitions, clarifying schema versus encoded input, forward references, recursion, and validation.
A protocol-buffer-related parsing task includes dependencies on newly defined message types. Explain which input and output details you would clarify, and how you would separate parsing from type resolution so definitions can refer to one another.
Constraints & Assumptions
The source names parsing a protobuf with dependencies on new definitions, but supplies no grammar, encoded payload, or expected output. This is a bounded engineering discussion of those disclosed dependencies, not a claimed implementation of the full Protocol Buffers specification.
Clarifying Questions
Is the input a schema definition, encoded message bytes, or a set of generated descriptors? What must the parser return? Can types be referenced before their definition, imported, nested, or recursive? Which syntax and validation rules are in scope?
Follow-up questions
- Why can a one-pass “type must already exist” lookup reject a valid forward reference? When is a cycle a legitimate recursive type rather than an error? What additional information is needed to parse encoded values safely?
Solution walkthrough is for members
Get the full walkthrough with reference code and complexity analysis, plus Kitty Coach at 300 messages a day. Hints, the code runner and community answers stay free.