This was basically a full system design session crammed into one prompt.
Start by clarifying requirements and constraints, then outline the API endpoints and data flow, and finally dive into the non-functional aspects like scalability, security, and reliability. Emphasize trade-offs and justify your design choices, especially around async processing, batching, and model versioning.
Pro tip: For NVIDIA, highlight GPU utilization and inference optimization—mention how batching and async processing can maximize throughput on GPU instances. Also, discuss how Grad-CAM heatmaps can be generated efficiently and stored securely.
Ask questions to understand expected load, latency requirements, image sizes, model types, and client constraints. Confirm whether synchronous or asynchronous processing is preferred for different use cases.
Define REST endpoints for image upload, job submission, status checking, result retrieval, and webhook registration. Specify request/response schemas, including class probabilities and heatmap URLs.
Incorporate authentication (OAuth2/JWT), rate limiting, pagination, versioning, and error handling. Discuss batching strategies, retries, circuit breakers, and how to handle large uploads (e.g., chunked uploads, presigned URLs).
Detail input validation, content-type enforcement, secure storage (encryption at rest/in transit), and access controls. Explain how to handle sensitive data and comply with regulations.
Describe versioning strategies for models and APIs, backward compatibility, and how to roll back without breaking clients. Mention canary deployments and A/B testing.
AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.