[3/3] Cassandra: The Definitive Guide, 3rd edition (Category Architecture)
With this post, I’m finishing up my book about Cassandra. (previous posts: 1 and 2).
7. Designing Applications with Cassandra The authors analyze the design of the application for booking hotels and choose a microservice approach due to the encapsulation of logic within services, the availability of autonomy for deploying services, as well as independent scaling if necessary. For design, the authors suggest iteratively working on UX design, data modeling, architecture. In terms of design, the authors begin with the identification of bounded context, service identification, persistence design for microservices. Moreover, the authors advocate polglot persistence, where we can choose different bases for different scenarios. (RDBMS, Document-oriented, Wide-column, graph databases, ...). As a result, we have bounded contexts and query sets for obtaining data, which can be used to model data using Chebotko diagrams. At the same time, the authors talk about secondary indexes, each node should store its part. As well as materialized representations (materialized views), which allows you to store preconfigured view, which helps with queries that are based on one of the columns that are not included in the primary key.
8. Application Development with Drivers - a story about the possibility of a driver to work with Cassandra. Since the book was written a long time ago, I recommend reading the docks. last-driver Java from DataStax.
9. Writing and Reading Data The authors tell and show how to write and read in Cassandra with tunable consistency in mind. They explain what the write path and read path looks like, taking into account the deployment scheme of the cluster, as well as the operation of the storage engine. (Commit logs, Memtable, SSTable, LWT). The authors also tell how batch recording, read repair, range requests, sorting, filtering, pagering and deletion of records works.
10. Configuring and Deploying Cassandra The authors show how to seal your Cassandra cluster using ccm (Cassandra cluster management). If you have Cassandra as a service, then you should read this chapter carefully. (For those who have this service, you can read less carefully:) )
11. Monitoring This chapter is devoted to monitoring the cashier. The authors talk about the use of jmx, nodetool and virtual tables, which provide metadata about nodes and tables through standard CQL. This chapter also mentions Cassandra logging.
12. Maintenance This chapter makes it clear that supporting Cassandra is not a trivial task.) 13. Performance Tuning - the authors suggest using USE to analyze performance and then they talk about how to arrange stress testing of the cluster, and then about its tuning by caching, setting memtables, sstables, commit logs, hinted handoff, compaction, concurrency and threads, network and timeouts. And finally, the authors analyze the JVM settings that affect Cassandra’s perf.
14. Security The chapter begins with how authentication and authorization are arranged in Cassandra, for example, the authors talk about RBAC. Now is the time to discuss encryption. (certificates, node-to-node and client-to-node encryption) and security options that can be configured in JMX. Finally, the chapter talks about audit logging and how it can be configured.
15. Migrating and Integrating This chapter tells you how to move from RDBMS to Cassandra and the authors give you the following algorithm. Understand when it is time to migrate (Authors provide a list of triggers)
- Adapt the data model (entity, relationships)
- Adapt the application (Change the ways of accessing data, ways of maintaining consistency, get rid of storage (Authors talk about UDF in Cassandra)) Plan a deploit scheme and migrate data (offers a standard scheme without downtime with parallel work with a new / old base at the application level)
#Software #Architecture #DistributedSystems #SystemDesign