Design of Blob Store
Learn to transform requirements into the design of the blob store.
High-level design
Let’s identify and connect the components of a blob store system. At a high level, the components are clients, front-end servers and storage disks.
The client’s requests are received at the front-end servers that process the request. The front-end servers store the client’s blob onto the storage disks attached to it.
API design
Let’s look into the API design of the blob store. All of the following functions can only be performed by a registered and authenticated user. For the sake of brevity, we do not include functionalities like registration and authentication of users.
Create container
The createContainer
operation creates a new container under the logged-in account from which this request is being generated.
createContainer(containerName)
containerName
is the name of the container, and it should be unique within a storage account
Upload blobs
The client’s data is stored in the form of bytes in the blob store. The data can be put into a container.
putBlob(containerPath, blobName, data)
containerPath
is the path of the container in which we are uploading the blob; it consists of theaccountID
andcontainerID
blobName
is the name of the blob, and it should be unique within a container otherwise our system will give the later uploaded blob a version numberdata
is any file the user wants to upload to the blob store
This API is just a logical way to spell out the needs. It might be a multi-step streaming call for actual implementation if the data size is very large.
Download blobs
Blobs are identified by their unique name or ID.
getBlob(blobPath)
blobPath
is the fully qualified path of the ...
Create a free account to access the full course.
By signing up, you agree to Educative's Terms of Service and Privacy Policy