Comparing CQL and the DynamoDB API
Blog post from ScyllaDB
ScyllaDB was developed as an open-source distributed database to improve on Apache Cassandra's performance, retaining compatibility with its APIs and file formats while achieving higher throughput and scalability. It initially adopted Cassandra's CQL API but later introduced Project Alternator, enabling support for the DynamoDB API, which is inspired by Cassandra and Amazon's previous Dynamo work. This blog post compares the CQL and DynamoDB APIs, highlighting differences in their transport protocols, data models, and handling of write operations. CQL uses a binary protocol and requires client libraries to be aware of the cluster's topology, allowing for reduced latency and cost by minimizing network hops. In contrast, DynamoDB uses JSON over HTTP, which is simpler for client libraries but incurs higher latency and costs due to extra network hops and the need for more connections. The post also discusses each API's approach to schema management and write operations, noting that CQL distinguishes between write-only and read-modify-write updates, allowing for optimization of the former. Despite their similarities, ScyllaDB recommends using the CQL interface for most use cases due to its performance advantages, except for migrations from DynamoDB.