This topic provides a side-by-side comparison of OSS with traditional file systems to help you better understand the concepts and differences
The following table compares OSS to traditional file systems in terms of data models and data retrieval methods.
|Comparison item||OSS||Traditional file system|
OSS is a distributed object storage service that stores data as key-value pairs.
A traditional file system uses a typical hierarchical structure for directory indexing.
|Data retrieval method||
Objects in OSS are retrieved based on their unique object names (also known as keys). Names do not carry any special meaning in OSS.
For example, an object named test1/test.jpg in OSS does not mean that the object is stored in a directory named test1. It simply means that the name of the object is test1/test.jpg, which is no different from an object named example.jpg. No additional overhead is required when you access objects that have different names.
To access a file named test1/test.jpg, you must first access the test1 directory and then obtain the test.jpg file from the directory.
OSS supports high-concurrency operations.
Traditional file systems support file-level modifications, including modifying or truncating the contents of a file. You can also modify directories, including renaming, deleting, and moving directories.
Objects stored in OSS cannot be modified. To modify an object, you must re-upload the entire object.
OSS can simulate hierarchical file system operations. However, these operations consume a large amount of resources. For example, when you rename a directory from test1 to test2, OSS creates a copy of all the objects whose names have the test1/ prefix and the copies are renamed to replace the prefix with test2/. Then, OSS deletes the original objects. Therefore, we recommend that you do not perform such operations in OSS.
The performance of the file system is limited to the performance of a single device. Accessing files in deeper directories consume more resources and require longer time.
We recommend that you do not map OSS to a file system. If you must map OSS to a file system, we recommend that you only perform read, write, and delete operations in the file system for efficiency. You can take advantage of OSS to process and store large amounts of unstructured data such as images, videos, and documents.
The following table describes the terminologies and operations in OSS and the corresponding ones used in file systems.
|GetService (ListBuckets)||Obtain the list of home directories|
|GetBucket (ListObjects)||Obtain the list of files|
|AppendObject||Append data to an existing file|
|None||Modify file content|
CopyObject (same source and destination objects)
|Modify file attributes|
CopyObject (different source and destination objects)
|Copy a file|
Was this helpful?