Going NoSQL with ApsaraDB for MongoDb or Table Store

By Afzaal Ahmad Zeeshan, Alibaba Cloud Community Blog author and Alibaba Cloud MVP.

Introduction and Background

Understanding NoSQL Purposes

Fundamentally, this is a comparison guide for MongoDB and Table store but not for the sake of stating one better than the other, or recommending one over other, rather the crux is to list the strong insights of both of the solutions provided by Alibaba so you can be capable enough to take an educated decision for choosing the database service as per your project or enterprise need.

Table Store — Overview and Concepts

Table Store supports data organization in a way that we can break down our entities in the form of instances and tables (where a table is a set of rows and a row consists of the primary key and attributes), which can seamlessly scale up to cater small and large-scale business requirements using data portioning and load balancing techniques. Also, it provides a high-tolerance and reliable recovery mechanism which ensures instant availability of your database system. All this is managed by the ApsaraDb protocol that is provided by the Alibaba Cloud.

Table Store is a turn-key solution for NoSQL database on Alibaba Cloud, even more turn-key than other hosted solutions for MongoDb or relational databases. It is 2-dimensional and does have tables consisting of rows and columns; which can be added or remove, even modified anytime based on your requirements and that from the portal itself. Being NoSQL in nature, it does not require strict schema and relationships between rows and columns. Nonetheless, it provides flexible structure, easy-to-use functions and enables real-time concurrent queries from a massive amount of data. Consequently, we can design our database using multiple data types, such as integer, string, binary, double and bool. The overall benefit of Table Store is that it enables developers to deploy a complete database solution in less than 5 minutes, without having to worry about anything — like scalability, replication, failover or disaster recovery. In MongoDb clusters, although maximum elements are managed by the platform, yet you must plan for all these, scalability and high-availability being the most important factors in this.

Table Store Deployment

One thing to notice here is that you need to understand that these services are filtered out for the regions too. So, if you do not find the service in the list, try changing the region once.

Upon clicking the create resource button you will see the dialog that enables you to insert the values for the new service that you are going to deploy on the cloud platform.

Input these fields and within a few seconds your service will be up and running. You can also access the endpoints where this service has been deployed in the same dashboard for the service,

You can now directly use these endpoints in the SDK for Table Store and manage the tables and perform all sort of data related operations on them. You can get the SDKs for the Table Store for all the most widely used runtimes and frameworks here on Alibaba Cloud’s website.

ApsaraDB for MongoDB — Overview and Concepts

Architectural Configurations

Standalone Instance

Replica Set Instance

Sharded Cluster Instance

Competitive Benefits of ApsaraDB for MongoDB

In addition to continuous monitoring, multiple backups for transparent recovery, and quick access, the connective and management services are highly user-friendly, since your application is now highly-available and provides at least a good amount of (let’s not mention the overall percentage) availability to the clients or the endpoint devices that you have configured. One-click data backup, recovery and risk and traffic management are supported using properly visualized management tools, and ApsaraDb automatically configures and stores the backups for your database on their own clusters. Moreover, the management of data tables, nodes and clusters become possible using an efficient data management service (DMS). In fact, a more suitable way of defining the schema for the MongoDB is using other tools and services such as ORMs.

Unlike relational database management system, ApsaraDB for MongoDB does not restrict you to change or define a solid table structure; rather it gives you an ease to store structured data, business-level high-level datasets as well, while you do not need to worry about the schema and relational configurations. It supports spatial indexes which are two-dimensional and a lot suitable for location-based applications. Asynchronous data writing and processing, dynamic node scaling and sharding are some of its features which are most demanding for applications which require concurrent data reading and writing. These features are not (yet!) available in the Table Store, one of the reasons in that Table Store is a simple database deployment service by Alibaba Cloud.

So, in a nutshell, if you are considering a database service for your use-case, here are a quick tip:

  1. Do you require the application service to be deployed in a replicated or clustered fashion, closer to the customers?
  2. Do you require to manage the schema programmatically using your SDKs?
  3. Does your business require an industry-standard, enterprise-grade, battle-tested database engine that can cope with any number of transactions?
  4. Do you have a team of engineers who are good with database designs or structures (not just talking about database engineers or administrators)?
  5. Do you have enough budget to cope with extra infrastructure costs?

If you answered yes to most of these questions, then you should consider having ApsaraDB for MongoDB as the maintenance and management is still simple, easy and in-portal for most cases. With this investment, you get the best possible outcome. However, if most of the answers are negative or you are looking forward to trying out a simple application idea, and want a quick NoSQL solution, take my advice, go for Table Store and try it out, it does not cost much, and you will have a quick prototype developed and deployed in no time!

Original Source

Follow me to keep abreast with the latest technology news, industry insights, and developer trends.