Posts

Showing posts from September, 2021

CQRS and CockroachDB

Image
  Today, I would like to talk about Command Query Responsibility Segregation (CQRS), how CockroachDB (CRDB) fits into it, and the situations where the two don't make sense together.  I have had a number of customers approach me regarding the use of CQRS in their applications, and once we've looked at the drivers for it, the value wasn't there.  There are a number of very good reasons to adopt a CQRS pattern for your application, but several of those reasons no longer apply when you are using CRDB as your backend datastore… and you still have the additional complexities and downsides to a CQRS model.  I will not be covering all of the reasons to adopt the CQRS pattern, only a subset. So what is CQRS and what does it do? CQRS stands for Command Query Responsibility Segregation.  The idea is that between your presentation layer and your data layer, all the microservices that do reads of information (queries) from the data layer are on one side of things and do not ...

CockroachDB Backups, Exports, and Archives

Today I would like to talk about the differences between backups, exports, and archives as they relate to CockroachDB.  Let's start by deciding, in general, what these three ideas are supposed to accomplish. Backing up data is a concept that nearly everyone in the IT field has encountered at some point.  Many of us have had to work with various backup systems, differing capabilities, and various requirements.  Backups exist to satisfy the use case where we need to restore from some form of disaster or loss and get a system back to an operational state.  There can be various requirements in the form of encryption, retention, frequency, and so forth.  CockroachDB is highly performant in this situation as both backups and restores are executed in a parallel manner, with work spread through the cluster and there is the ability to backup the MVCC history as well.  The syntax for executing backups and restores can be found in the excellent CRDB documentation....