Featured Blog Texture

Blog

View all

CockroachDB-on-FreeBSD-1

Tutorials

Critters in a jar: Running CockroachDB in a FreeBSD jail

Note: this blog post was updated on September 21, 2017. Jails are FreeBSD’s native solution to contain and isolate server processes. They are an alternative to (and predate) Linux cgroups, Solaris zones, and other OS-level process isolation technologies (the technologies that underlie Docker, CoreOS and a few others) .

Raphael Kena Poss

July 7, 2016

time-travel-queries-art-JoeRoberts-1

System

Time-travel queries: SELECT witty_subtitle FROM THE FUTURE

In our most recent beta, we added a new feature: time-travel queries. These are `SELECT` queries where you can specify a timestamp, and the data returned will be the data as it was at that time. This has various uses including backups, undo, and historical reporting. The SQL:2011 standard describes this feature, and a few SQL databases (Oracle, MSSQL) have implemented it, in addition to various non-SQL DBs (Datomic). I’d like to introduce this feature: what it is, why we built it, and details about how it works for those interested in CockroachDB’s lower layers.

Matt Jibson

June 22, 2016

Testing-deps-blog-post-2

Outsmarting Go dependencies in testing code

Writing good tests is tricky when the system has a lot of moving parts. When using Go’s testing infrastructure, tests that involve multiple modules can cause dependency cycles which are not allowed by the compiler. In this post we will go over a technique we devised to break these dependency cycles.

Andrei Matei

June 16, 2016

System

Revisiting SQL typing in CockroachDB

Adopting a SQL interface for CockroachDB had an unexpected consequence; it forced us to dabble in language design. Most developers working with SQL have heard rumors of a SQL standard, pages upon pages of norms and requirements for all SQL compliant dialects to respect. Based on its existence, it’s natural to draw the conclusion that SQL is fully specified and straightforward to implement. A developer need only carefully follow each step laid out in the standard until they arrive at a working database. It’s a lot like building a couch from IKEA. However, in the months following our decision to create a SQL layer on top of our distributed consistent key-value store, we’ve come to realize that this is far from the truth.

Nathan VanBenschoten

June 9, 2016

Tutorials

Building an application with CockroachDB and SQLAlchemy

CockroachDB’s support for SQLAlchemy is currently in beta, but we’re actively developing new features to improve the integration. You can find the documentation here. One of the great things about CockroachDB’s support for SQL is the wide variety of frameworks and tools for working with SQL data. Today, we’ll demonstrate this by building a simple application in Python, using SQLAlchemy and Flask.

Ben Darnell

Ben Darnell

June 1, 2016

Community

Running CockroachDB on DC/OS

This week, Mesosphere Developer and Cloud Advocate Michael Hausenblas made it his mission to run CockroachDB on DC/OS. He covers the experience of using CockroachDB’s Docker image, ramping up a DC/OS cluster, and testing data ingestion and querying in a post on Medium. The TL;DR? “It’s awesome.”

Community

Handling NULL Values in CockroachDB

CockroachDB contributor Paul Steffensen (aka uptimeDBA) has analyzed CockroachDB’s handling of NULL values as compared to the SQL standard and other SQL implementations. He shares his analysis in his blog post “I’ve got nothing. NULL handing in CockroachDB.” You can read the full post here.

nestedtransactionsincockroachdb 2

System

Trust, but verify: How CockroachDB checks replication

We built survivability into the DNA of CockroachDB. And while we had a lot of fun doing so, and are confident that we have built a solution on a firm foundation, we felt a nagging concern: Does CockroachDB really survive? When data is written to the database, will a failure really not end up in data loss? So to assuage those concerns, we adopted a Russian maxim: “Dovorey, no provorey – Trust, but Verify.”

Vivek Menezes

May 19, 2016

crl-socialpost-default-2020-2

System

A tale of two ports | Cockroach Labs

CockroachDB is pretty easy to deploy. We’ve done our best to avoid the need for configuration files, mandatory environment variables, and copious command line flags, and it shows; we’ve already had testimonials from folks who were able to deploy a 20-node cluster in just half a day. That’s something to be proud of! However, there is still one wrinkle in the fabric, and that’s our use of network ports. As of this writing, CockroachDB requires two ports, but why, and can we do better?

Tamir Duberstein

May 11, 2016

Get started for Free

bg callout one