Formats of Cloud Storage and Introduction to AGC Cloud Storage

Enes Kocaman
Huawei Developers
Published in
7 min readSep 26, 2020

--

When mobile or web developers designing their applications from scratch, one of the most important thing is deciding what type of data storage to use beside database. The way to decide is to choose the one with optimum efficiency in the balance of cost and performance according to your application scenario. There are 3 types of Cloud Storage as File Storage, Block Storage and Object Storage. There are some points that separates each of these types. Today, my first aim will be introduce these different type of Cloud Storage, based on my research then it may help you to choose the most appropriate one. After then will develop a demo application using AGC Cloud Storage and explain the features that offers.

Agenda

▹ Brief introduction to Cloud Storage, What it offers?

▹ Types of Cloud Storage in base

  • File Storage
  • Block Storage
  • Object Storage

▹ Introduction of AGC Cloud Storage and demo application

▹ What is Cloud Storage and what it offers?

Cloud storage is the process of storing digital data in an online space that spans multiple servers and locations, and it is usually maintained by a hosting company.

It’s delivered on demand with just-in-time capacity and costs, and eliminates buying and managing your own data storage infrastructure. This gives you agility, global scale and durability, with “anytime, anywhere” data access. Cloud storage is purchased from a third party cloud vendor who owns and operates data storage capacity and delivers it over the Internet in a pay-as-you-go model. These cloud storage vendors manage capacity, security and durability to make data accessible to your applications all around the world.

▹ Types Of Cloud Storage

  • File Storage

File-based storage means, organizing data in a hierarchical, simple, and accessible platform. Data stored in files is organized and retrieved using a limited amount of metadata that tells the computer exactly where the file itself is kept. When you need access to data, your computer system needs to know the path to find it.

Actually we are using this type of storage mechanism for decades when we insert/update/delete a file in our computers. The data is stored in folders and sub-folders, forming a tree structure overall.

Limited amount of flash memory is aimed at serving frequently accessed data and metadata quickly. Caching mechanism is also a plus for File System but it can become complex to manage when capacity increases.

https://zachgoll.github.io/blog/2019/file-object-block-storage/
  • Block Storage

Block storage chops data into blocks and stores them as separate pieces. Each block of data is given a unique identifier, which allows a storage system to place the smaller pieces of data wherever is most convenient. That means that some data can be stored in a Linux environment and some can be stored in a Windows unit.[https://www.redhat.com/en/topics/data-storage/file-block-object-storage]

Because block storage doesn’t rely on a single path to data — like file storage— it can be retrieved quickly. Each block lives on its own and can be partitioned so it can be accessed in a different operating system, which gives the user complete freedom to configure their data. It’s an efficient and reliable way to store data and is easy to use and manage.

Each partition runs a filesystem within it. In one sentence we can say that Block Storage is a type of Cloud Storage that data files divided into blocks.

This type of storage is very good for databases thanks to very high speed, virtual machines and more general for all those workloads that require low-latency.

Very high cost per giga-byte

https://zachgoll.github.io/blog/2019/file-object-block-storage/

Object Storage

While the volume of data to be stored has grown continuously(exponentially) the limits of the file system have gradually appeared and this is where the need for Object storage is felt. Object-based storage is deployed to solve for unstructured data (videos, photos, audio, collaborative files, etc.). Contrary to File Storage, objects are stored in flat namespace and can be retrieved by searching metadata or knowing the unique key(ID). . Every object has 3 components;

  1. ID (Unique Identifier)
  2. Metadata(age, privacies/securities, etc.)
  3. Data
https://www.womeninbigdata.org/2018/05/31/how-object-storage-can-improve-hadoop-performance/

Object-based storage essentially bundles the data itself along with metadata tags and a unique identifier. Object storage requires a simple HTTP application programming interface (API), which is used by most clients in all languages.

It is good at storage of large sets unstructured data. However latency is not consistent at all.

Overall Summary

http://tanejagroup.com/profiles-reports/request/is-object-storage-right-for-your-organization#
Comparison between Storage types

▹ Introduction of AGC Cloud Storage and Demo Application

Currently, AGC Cloud Storage supports only File Storage model.

It is scalable and maintenance-free. Allows you to store high volumes of data such as images, audios, and videos generated by your users securely and economically with direct device access. Since AGC Cloud Storage is currently in beta version, you need to apply by sending email to agconnect@huawei.com. For more details please refer to guide whcih tells how to apply the service.

Basic Architecture Of AGC Cloud Storage

There are 4 major features of AGC Cloud Storage Service. These are;

  1. Stability
  2. Reliability and Security
  3. Auto-scaling
  4. Cost Effectiveness
  • Stability: Cloud Storage offers stable file upload and download speeds, by using edge node, resumable transfer, and network acceleration technologies.
  • Reliability and Security: By working with AGC Auth Service and using the declarative security model, Cloud Storage ensures secure and convenient authentication and permission services.
  • Auto-scaling: When traffic surges, Cloud Storage can detect traffic changes in real time and quickly scale storage resources to maintain app services for Exabyte data storage.
  • Cost Effectiveness: Cloud Storage offers you to decrease your cost and saves your money. All developers get a free quota, and once that’s up, you’ll be charged for extra usage.

You can follow-up your usage and current quota from Cloud Storage window under your developer console as represented in below.

Usage Statistics

Development Steps

In this step, we will develop a demo application using AGC Auth and Cloud Storage services with MVVM design pattern in Kotlin programming language.

Before you start you need to have a Huawei developer account. You can refer to following link to do that;

  1. Enable services(AGC Auth + AGC Cloud Storage)
  2. Integrate the SDK
  3. Develop the Demo App
  4. Manage Objects
Service Enablement
Download agconnect-json.file

You should add certificate fingerprint and necessary dependencies into your Android project. You can follow following link to complete this steps.

Download agconnect-services.json file first and insert it to App folder of your Android project. Add Auth service and Cloud Storage dependencies under your App Level build.gradle file. However, there is an crucial point after you add agconnect-services.json file that is you must add “default_storage” name on the storage_url parameter, otherwise you can not reach to your storage area.

default_storage name

Configurations has been done. We can focus on the application scenario. Firstly, i want to show what our application offers to users.

  1. Users will sig-in to application anonymously. (With the help of anonymous sign-in method of Auth service)
  2. Users can upload an image from Media Storage of their mobile phone to Storage.
  3. Users can download the latest image from Storage if there is.
  4. Users can delete latest item from Storage if there is. (Be careful! because this operation is irreversible. Once you performed this operation, the file will be physically deleted and cannot be retrieved.)
Upload File
Upload File from device to Storage
Delete File
Delete File From Storage
Download File from Storage to Device

References

  1. https://www.redhat.com/en/topics/data-storage/file-block-object-storage
  2. https://www.openio.io/blog/comparing-blocks-files-and-objects
  3. https://aws.amazon.com/what-is-cloud-storage/
  4. https://zachgoll.github.io/blog/2019/file-object-block-storage/
  5. https://gomindsight.com/insights/blog/types-of-cloud-storage/
  6. https://developer.huawei.com/consumer/en/doc/development/AppGallery-connect-Guides/agc-cloudstorage-introduction

--

--