📜 ⬆️ ⬇️

Comparison of Windows Azure Blob Storage and Google Cloud Storage

Greetings to cloud computing enthusiasts.
I propose to look at the comparison of Windows Azure Blob Storage and Google Cloud Storage services (while the author does not forget to mention about Amazon AS3).

I thought it would be nice to write an article comparing the Google App Engine and Windows Azure storage. In this article, we will compare Windows Azure Blob Storage and Google Cloud Storage .

The first part of the cycle - Comparing Windows Azure Table Storage and Amazon DynamoDB
The second part of the cycle - Comparing Windows Azure Blob Storage and Amazon Simple Storage Service (S3) - Part I
Cycle Three - Comparing Windows Azure Blob Storage and Amazon Simple Storage Service (S3) - Part II, Summary
Abbreviations: Windows Azure Blob Storage - WABS and Google Cloud Storage - GCS, Amazon S3 - AS3 .

Conceptually, WABS and GCS provide similar functionality — to put it simply, both systems are cloud file systems that allow storing large amounts of unstructured data (usually in the form of files).
')
Both systems provide a REST API for working with files and folders and other high-level language libraries, which are usually REST API wrappers. Each API release has its own version, in WABS it has a date value, in GCS - numbers. At the time of this writing, the WABS version was 2011-08-18 , GCS is version 2.0 .

Similar functionality in two systems:



Concepts



Before we talk more about these two services, I find it important to clarify some concepts. If you are familiar with the basic concepts of WABS and GCS, you can skip this section.

Containers of blobs and baskets : If these services are file systems in the cloud, consider the WABS blob container and the GCS basket as a folder or directory. In a WABS storage account or a GCS account, you can have zero or more blob containers and baskets that can contain blobs or objects, respectively.

Comments:



Blobs and Objects : WABS blobs and GCS objects are files in your cloud file system located in blob containers and baskets.

Comments:



The two most important functions are upload and download, let's discuss them first, then compare the remaining functions.

Loading blobs and objects



Let's talk about loading blobs and objects into containers and baskets. There are two loading mechanisms - you can load a blob or an object entirely within a single request or divide them into pieces (blocks or WABS pages, in GCS they do not have any special name).

Loading in one request


If the download data is small and you have a good connection speed, you can download this data completely in one request. In WABS, Put Blob is used for this. In GCS- PUT Object or POST Object .

Loading chunks


You can share large data that is not efficiently loaded in a single query completely. Both systems allow you to split data into pieces (blocks or pages in WABS, in GCS they do not have any special name) and load gradually. In WABS, you need to use Put Block and Put Block List for block blobs and Put Page for page blobs. GCS uses the POST Object and Put Object functions for this.

There are many reasons why you can decide whether to load data in chunks:



Let's see how to load the data in chunks on each of the systems. For example, you want to download a 100 MB file with chunks.

WABS


Suppose each piece has a size of 1 MB (despite the fact that there is no need to have pieces of the same size) - you need to make a download of 100 pieces. We take a block blob, each of the blocks (pieces) of which has a unique identifier (BlockId). To load it, use the Put Block function. BlockId is a Base64 encrypted string, the maximum size of which is limited to 64 bytes. All BlockId (100 in our case) must be the same length. In this case, it does not matter in what order you will load the blocks - you can load them in parallel. After loading the block, WABS puts it somewhere in storage and stores it for 7 days. After loading all the blocks, we call Put Block List , commit (commit) these blocks. Until the call of this function, the blob cannot be accessed and, if you have not confirmed the blocks within 7 days, they will be deleted by the system. After calling the function based on the order of the BlockId list, WABS will recreate the blob and mark it as available. It makes no difference what values ​​BlockId will have (all of them can be GUIDs), but it is important in which order you send the BlockId when using the Put Block List.

Limitations:



GCS


In the case of GCS, uploading a large file in chunks is called “ Resumable Uploads ”. You must first inform GCS that you have started the loading process by calling the POST Object . Usually this function is used to upload a file using HTML forms, but in this case you do not define the file. You can define request headers with which to inform GCS that you have started the download process. After the upload is complete, GCS will return a response containing a Upload Id that uniquely identifies the upload process. This Id needs to be saved, as it will be needed when loading pieces. Next, you need to try to upload the file using the Put Object function and passing it the Upload Id and the contents of the object. If everything works out, GCS will respond with the HTTP code 200 Ok, but if the operation fails, you will have to request the number of bytes downloaded from GCS. GCS will return HTTP code 308 Resume Incomplete. Then you can continue loading data using Put Object.

Thoughts:



Download blobs and objects



Let's see how you can download blobs and objects. To do this, there are two mechanisms - either to download the whole blob or object in one request, or in chunks.

Each system has only one download function — Get Blob in WABS and GET Object in GCS.

Download in one request


If the data is small and you have a good connection speed, you can download the entire object using Get Blob in WABS and GET Object in GCS.


Download in chunks


If the object is large and you are not sure whether you can download it at one time, you can download the pieces using the same function with the addition of the Range header and defining the range of bytes needed for downloading.

Download process:

  1. Determine the size of the object. For example, it "weighs" 100 MB.
  2. Determine the size of the pieces. For example, you are comfortable to download pieces of 1 MB.
  3. Call Get Blob or Get Object and pass them the appropriate values ​​in the Range header. If you download consistently, your first request will have the value of this header “0 - ​​1048575” (0 - 1 Mb), the second request - “1048576 - 2097151” (1 - 2 Mb) and so on.
  4. After downloading put a piece somewhere.
  5. After downloading all the pieces, create an empty file of 100 MB in size and fill this file with the downloaded pieces.


Common moments between WABS, AS3 and GCS



All three systems have common moments, for example:



Common with AS3



When I first read about GCS, I found that there is much in common with GCS and AS3, for example:



Unique moments in GCS



When we started discussing the basic functionality of GCS, it might seem that GCS provides less functionality than WABS and AS3, but GCS has functions that are not found in any other platform. For example:



Pricing



When using both systems there are no “capital” costs. The pricing model is relatively simple and based on consumption. In both systems, billing is based on usage and it can consist of three components:

  1. Number of transactions : Payment is made according to the number of transactions made - roughly speaking, one transaction is one function call in the system. There is a significant difference between the two systems — in WABS, the transaction cost is fixed ($ 0.01 for 10,000 transactions), in GCS it varies depending on the type of transaction. If you perform PUT, COPY, POST, LIST operations, you pay a higher price per transaction ($ 0.01 per 1000 transactions), GET and others pay a lower price ($ 0.01 per 10 000 transactions). Deletion requests are not written, but I assume that they are free in GCS.
  2. Storage : You pay for the amount of data stored in each system.


  1. Traffic : You pay for the amount of data transferred to and from the system. At the time of writing the post, both systems provide free incoming traffic. It is not mentioned whether the cost of data transmission within one data center in GCS is paid.


A special pricing model is also available, and both systems provide different payment packages. Learn more about pricing at https://www.windowsazure.com/en-us/pricing/details/ for WABS and https://developers.google.com/storage/docs/pricingandterms for GCS.

Functions



The table summarizes the functions provided by WABS and GCS. It contains only functions supported by both systems.
WABS
GCS
Create Container / PUT Bucket
Yes
Yes
List Containers / GET Service
Yes
Yes
Delete Container / DELETE Bucket
Yes
Yes
List Blobs / GET Bucket (List Objects)
Yes
Yes
Set Container ACL / PUT Bucket (ACL or CORS)
Yes
Yes
Get Container ACL / Get Bucket (ACL or CORS)
Yes
Yes
Put Blob / PUT Object
Yes
Yes
POST Object
Not
Yes
Get Blob / GET Object
Yes
Yes
Delete Blob / DELETE Object
Yes
Yes
Copy Blob / PUT Object
Yes
Yes
Get Blob Properties / HEAD Object
Yes
Yes
Get Blob Metadata / HEAD Object
Yes
Yes

The following table lists the functions supported only in WABS.
WABS
GCS
Set Blob Service Properties
Yes
Not
Get Blob Service Properties
Yes
Not
Set container metadata
Yes
Not
Get Container Metadata
Yes
Not
Set Blob Properties
Yes
Not
Set blob metadata
Yes
Not
Snapshot blob
Yes
Not
Lease blob
Yes
Not
Put block
Yes
Not
Put block list
Yes
Not
Get Block List / List Parts
Yes
Not
Put page
Yes
Not
Get page ranges
Yes
Not

Let us consider these functions in more detail.
WABS
GCS
Create Container / PUT Bucket
Yes
Yes

This function creates a new blob container or basket.

An important point to remember is that the blob containers are limited to the storage account, while the GCS baskets are limited to the GCS project. When you create a WABS storage account, you determine its location (data center), and your blob containers are located in a specific data center in a specific geographic location. When you create a cart in GCS, you define the region in which this cart will be created, so you can distribute the cart to all data centers in the GCS if necessary. In order to do the same in WABS, you need to create a storage account in each data center where you want to place the containers.

There are several rules for naming blob containers and baskets; they are tabulated below.
WABS
GCS
Minimum / maximum length title
3/63
3/63
Case sensitivity
lower case
lower case
Allowed characters
Alphanumeric and hyphen (-)
Alphanumeric, hyphen (-) and period (.)

More naming rules:


Notes:


WABS
GCS
List Containers / GET Service
Yes
Yes


The function returns a list of all blob or basket containers that belong to the authenticated owner in the GCS.

Comments:


WABS
GCS
Delete Container / DELETE Bucket
Yes
Yes

The function removes the blob container or cart.

Comments:


WABS
GCS
List Blobs / GET Bucket (List Objects)
Yes
Yes

The function is used to get a list of blobs and objects in a container or basket. Functions in systems perform the same thing, given:



Differences:


WABS
GCS
Set Container ACL / PUT Bucket (ACL or CORS)
Yes
Yes

The function is used to specify ACLs for containers or baskets, and one or more access policies can also be specified in WABS. In GCS, you can also configure CORS (but you cannot configure CORS and ACLs in the same request).

For a blob container, the ACL values ​​can be:



For baskets, ACL values ​​can be equal to:



Convenient in GCS is that you can give users different sets of permissions, for example, user1 can have READ ACL, user2 - WRITE ACL, in WABS there is no such flexibility, permissions are placed only on the blob container.

Convenient in WABS is that, in addition to the ACL, you can set up to 5 container access policies that define a temporary set of permissions for this container. For example, you can create an access policy with permission to write to the blob container, which will only be valid for a day. Using policies allows you to generate a special URL with a signature and give it to users (flexible Shared Access Signatures functionality). Signatures allow you to issue access rights to containers and blobs at a more detailed level for a specific time.
WABS
GCS
Get Container ACL / GET Bucket (ACL or CORS)
Yes
Yes

The function is used to get the ACL for the blob container or the recycle bin, and in WABS this function also returns the access policies defined for the container.

To get the basket ACL, you need to call GET Bucket with the string parameter “ acl ”, to get the CORS, you must call with the string parameter “ cors”. If neither is specified, the list of objects in the basket is returned.

WABS
GCS
Put Blob / PUT Object
Yes
Yes

The function adds a blob to the blob container and an object to the basket. This function can be used to specify an ACL to an existing object in GCS or to copy an object from one basket to another.

Comments:



WABS
GCS
POST Object
Not
Yes

The function adds an object to the specified basket using an HTML form. POST is an alternative to PUT and allows the browser to load the object. Parameters transmitted by PUT using HTTP headers are transmitted from POST as the body of an encrypted multipart / form-data message.
WABS
GCS
Get Blob / GET Object
Yes
Yes

The function allows you to download blob from a container or basket.

Comments:


WABS
GCS
Delete Blob / DELETE Object
Yes
Yes

The function removes a blob or object from the repository.

Comments:



· WABS allows you to define preconditions that must be met in order to successfully complete this function ( If- Modified- Since , If- Unmodified- Since , If- Match , If- None- Match ).
WABS
GCS
Copy Blob / Put Object - Copy
Yes
Yes

The function copies the blob or object to somewhere from the original location.

Comments:

· Both systems allow you to define preconditions that must be met in order to successfully complete this function ( If- Modified- Since , If- Unmodified- Since , If- Match , If- None- Match ). These conditions can be defined both on the source and on the final copy in WABS and on the source in GCS.

· WABS allows you to copy objects from a container to a container only within one storage account. There is no such limitation in GCS. If the baskets between which the exchange occurs belong to the same project, the object will be copied. However, if you created an object using the API for loading in chunks, you cannot copy the object from region to region.

· Both systems allow you to copy existing metadata or specify metadata for the final copy.



Tips:


WABS
GCS
Get Blob Properties / HEAD Object
Yes
Yes

The function is used to get blob properties and object metadata, but does not return the contents of a blob or object.

Comments:


WABS
GCS
Get Blob Metadata/HEAD Object
Yes
Yes

The function returns user-defined metadata for a blob or object. This function can be used to get the properties of a particular version of a blob or object. To obtain this information, you must specify the date / time of the blob snapshot in WABS.

Summary



As we saw from the article, both systems provide a similar set of functions; however, some functions are present in one system, but not in the other. Despite this, you can not talk about a big difference in functionality.

Note from the translator
Reading this review, it didn’t leave the impression that Google rationally decided not to build Lisapedos, but to follow the well-trodden successful Amazon road - this is evidenced by the almost complete identity of some parameters. Given that Amazon launched its service in 2006, and Google in 2010, it may well be that it was so. However, Google has really great features that are lacking in other services - the same CORS, for example. In general, you can even try to declare that the pace of development of Google and Microsoft services in the time context is higher than Amazon.
Thank you for your attention, as soon as the next materials will be developed, I will definitely translate them and give them to your attention.

Source: https://habr.com/ru/post/145226/


All Articles