Design comments and async image generation
BobyardSoftware Engineer · Technical ScreenLast updated
This question evaluates full-stack system-design competencies, including CRUD API and data-model design for sortable queries with persisted user preferences, frontend-backend synchronization, and asynchronous long-running job orchestration, status/result APIs, and UI ordering for image generation; it falls under the System Design category and tests a mix of conceptual architectural reasoning and practical application design. It is commonly asked because it probes the ability to balance scalability, consistency, user experience, and fault-tolerant asynchronous processing when designing end-to-end systems that must handle persistence, ordering guarantees, and long-running background work.
The system design portion combined two prompts:
- Design a full-stack comment system with frontend, backend, and database support for create, read, update, and delete operations. The system should support sorting comments by
timestamporuserIdin ascending or descending order, and the user's sort preference should persist across page refreshes. - Design a service that generates images, where image generation can take much longer than a normal HTTP request timeout. Explain how you would accept requests, process long-running jobs asynchronously, expose status and results to users, and preserve a well-defined ordering of generated items in the user interface.
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.