Low-level design
We will now cover the low-level design of several microservices that, together, form our service. Let us begin by evaluating the design of the document service.
Designing the document service
The Document Service is a critical component of the file-sharing system, responsible for handling document-related operations such as creation, retrieval, update, and deletion. It manages document metadata and interacts with the storage system to persist and retrieve document content. Let’s dive into the low-level design of the Document Service. Let us first look at the API endpoints exposed by the service.
The Document Service exposes the following API endpoints:
POST
/documents
: Create a new documentRequest body
: Document metadata (title, owner, etc.) and initial contentResponse
: Created document object with assigned document ID
GET
/documents
/{documentId
}: Retrieve a document by its IDResponse
: Document object with metadata and content
PUT
/documents...