liveBook · Manning

Object store

As explained in Grokking Software Architecture

An object store is a persistent storage system that manages data as individually addressable objects with associated metadata.

An object store keeps data as individually addressable objects with metadata. In cloud applications, it provides persistent storage outside disposable servers, so uploaded data survives if a server disappears. section 9.3.3

Listing 9.1 Stateful Design vs. Stateless Design
# Wrong (Stateful): Saves user upload to the fragile local filesystem
with open('profile.jpg', 'wb') as f:
    f.write(user_upload)
 
# Right (Stateless): Saves user upload directly to an external S3 Bucket
import boto3
boto3.client('s3').put_object(Bucket='mybucket', Key='profile.jpg', 
Body=user_upload)

Compare saving an upload to a fragile local filesystem with sending it directly to an S3 bucket. section 9.3.3

How Grokking Software Architecture covers it

How deep it goes
Contrasts local and S3 upload code, without detailing object-store internals.
Examples
Uses Python and boto3 to upload profile.jpg to an S3 bucket instead of saving it locally.
What you can do after
Apply it via boto3 to store uploads outside the application server.
How it connects
Connects object storage to stateless architecture, cloud computing, databases, scalability, and reliability.

Also explained in

Compare how 7 books explain object store →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Grokking Software Architecture. The section links point to the parts of the book it draws on.