Speed, Scalability, and Simplicity are some of the vital aspects of mobile app development. With an exponential growth and penetration of mobile devices and users, these aspects have become more important than ever before. A small agile team of developers building mobile applications that can reach 1 M users in a short span of time can understand these aspects in a better context.
Amazon’s DynamoDB considers such teams and users in mind and sets up and scales databases so that they can focus on building the app right and not worry about the infrastructure issues.
Mobile application development is more than just a production code. It includes integration tests and supports different environments for making more complex tests. AWS DynamoDB is a managed NOSQL service with strong consistency and predictable performance. This results in shielding the user from complexities of a manual setup. Some of the key features of DynamoDB which makes it reliable are:
- Amazon DynaoDB is a managed, NOSQL database service:
Through DynamoDB, AWS runs the complete infrastructure for you. Some of the features include:
- Automatic Data Replication
- Infinitely scalable read-write I/O
- Data backed up to S3
- Integrated with other AWS services
- Security and access control can be applied using Amazon’s IAM service
- Designed for massive scalability
Amazon DynamoDB is extremely scalable. As data volume grows, with their portioning model, DynamoDB invisibly spreads the data across partitions and raises throughput without any intervention from the users.
- Supported DataTypes
DynamoDB supports following data types:
- Scalar – Number, String, Binary, Boolean, and Null.
- Multi-valued – String Set, Number Set, and Binary Set.
- Document – List and Map.
- Data Model
Three basic data models are used by DynamoDB: Tables, Items, and Attributes. Attributes are the basic element of database. Tables in DynamoDB don’t have fixed schemas associated with them. Items in DynamoDB require a primary key which needs to be unique. DynamoDB supports following two kinds of primary keys:
- Hash Type: An attribute is considered as Primary if it is identified as an item. DynamoDB builds a mandatory hash index on the attribute to facilitate the uniqueness.
- Hash and Range Type: This type of Primary Key is built upon the hashed key and the range key in the table: a hashed index on the hash primary key attribute, and a range sort index on the range primary key attribute. This type of primary key allows for AWS’s rich query capabilities
- DynamoDB Indexes and Partitions
DynamoDB offers two types of indexes: Local Secondary Index (LSI) and a Global Secondary Index (GSI).
In LSI, the range is mandatory on the other hand is GSI either a hash key or a hash+range key is required. GSIs can be placed in separate tables as they span multiple partitions.
In DynamoDB, data is portioned automatically by the hash key. Hence, it is mandatory to select the hash key carefully in GSI. This partition logic depends on the table size and throughput.
- Predictable Performance
AWS claims for a highly predictable performance of DynamoDB. One can control the quality of the service by choosing between Strong Consistency (Read-after-Write) or Eventual Consistency. Simple API calls can enable the user to increase or decrease the Read/Write throughput. Provisioned Capacity offered by DynamoDB can let you ‘bank’ up to five minutes of the unused capacity- acting like an emergency fund.
Built initially for their own operations by Amazon, DynamoDB comes with complete reliability, durability, and fast service making it a trusted data store. With stronger ecosystem to support, AWS DynamoDB should certainly be considered while building your next mobile application.