concept object in category cloud

This is an excerpt from Manning's book Object Storage Across the Cloud.
Many smart people have produced wonderful and robust packages that make working with databases in Python easier. SQLAlchemy (www.sqlalchemy.org) is a widely used tool for not only interacting with databases, but abstracting data models via an object-relational mapping (ORM). An ORM allows you to treat database records as objects in languages like Python, without worrying much about the details of a database at all. The Django web framework also provides an ORM for writing data models.
Subclasses can override protected but also public methods— Subclasses gain access to protected properties and their data types, which have so far been internal information. In other words, a lot of the internals of the object are now exposed.

This is an excerpt from Manning's book Google Cloud Platform in Action.
Now look more closely at the file by using the ls -la command, as shown in the listing 8.16. The -l flag shows the “long” listing, which includes some extra information about the file, and the -a flag shows noncurrent (for example, archived) objects along with extra metadata about the object such as the generation and metageneration.
Listing 8.16. Listing objects with -la flags
$ gsutil ls -la gs://my-versioned-bucket 27 2016-06-21T13:29:38Z gs://my-versioned- bucket/file.txt#1466515778205000 metageneration=1 TOTAL: 1 objects, 27 bytes (27 B)As you can see, the metageneration (or the version of the metadata) is obvious (metageneration=1). The generation (or version) of the object isn’t as obvious, but it’s that long number after the # in the filename; in this example, 1466515778205000. As you learned earlier, when versioning is enabled on a bucket, new files of the same name archive the old version before replacing the file, so try that and then look again at what ends up in the bucket, as shown in the following listing.
Listing 8.17. Upload a new version of the file
$ echo "This is the second version."> file.txt $ gsutil cp file.txt gs://my-versioned-bucket/ Copying file://file.txt [Content-Type=text/plain]... Uploading gs://my-versioned-bucket/file.txt: 28 B/28 B $ gsutil ls -l gs://my-versioned-bucket 28 2016-06-21T13:39:11Z gs://my-versioned-bucket/file.txt TOTAL: 1 objects, 28 bytes (28 B) $ gsutil ls -la gs://my-versioned-bucket 27 2016-06-21T13:29:38Z gs://my-versioned- bucket/file.txt#1466515778205000 metageneration=1 28 2016-06-21T13:39:11Z gs://my-versioned- bucket/file.txt#1466516351939000 metageneration=1 TOTAL: 2 objects, 55 bytes (55 B)Notice how when listing objects without the -a flag you see only the latest generation, but when listing with it, you can see all generations. The total data stored in the first operation appears to be 28 bytes; however, when listing everything (with the -a) flag, the total data stored is 55 bytes. Finally, when you look at the latest version, it should appear to be the more recent file you uploaded:
Objects are the files that you put inside a bucket. They have a unique name inside the bucket, and as on typical file systems, slashes (/) are treated specially so that you can browse directories like on any traditional Linux system. Later we’ll discuss some other advanced features (for example, storing the generation of an object), but objects themselves are straightforward: named chunks of bytes that you can retrieve on demand.