
What to Expect in CockroachDB 1.0 - manigandham
https://www.cockroachlabs.com/blog/coming-soon-what-to-expect-in-cockroachdb-1-0/
======
DocSavage
The company decided to remove direct access to their transactional key-value
store and force interactions through the SQL layer. From this comment in the
FAQ, it looks like the overhead for some mutations is small:
[https://www.cockroachlabs.com/docs/frequently-asked-
question...](https://www.cockroachlabs.com/docs/frequently-asked-
questions.html#can-i-use-cockroachdb-as-a-key-value-store)

Do range queries on a simple table also translate to underlying key-value
range queries with minimal overhead?

~~~
knz42
Yes. (I work there too)

------
didip
Any newer Jepsen test since this one: [https://jepsen.io/analyses/cockroachdb-
beta-20160829](https://jepsen.io/analyses/cockroachdb-beta-20160829)

Also, how's the performance nowadays?

~~~
elvinyung
I noticed that the question on performance was ignored, but I think it's worth
noting that FoundationDB died on exactly the same beach. [1] I'm not extremely
familiar with the CockroachDB architecture (other than "it's kinda like the
F1/Spanner/Bigtable stack"), but I suspect that there are some commonalities.
For example, CockroachDB's Bigtable-style two-level range indexing means you
could run into exactly this problem:

> FDB-SQL stores metadata in the KV store itself. This is great from a
> distributed correctness point-of-view. It’s also great from a simplicity
> point-of-view. If I trust the underlying system to be safe and consistent,
> then my metadata is also safe and consistent. But now I need to do a ton of
> reads before I run my SQL to know how to run my SQL. Where’s my data, for
> example?

[1] [https://www.voltdb.com/blog/2015/04/01/foundationdbs-
lesson-...](https://www.voltdb.com/blog/2015/04/01/foundationdbs-lesson-fast-
key-value-store-not-enough/)

~~~
petermattis
(Cockroach Labs co-founder here)

CockroachDB also stores SQL metadata inside of the KV store, but that metadata
is also gossiped around the cluster (i.e. it is replicated to every node) so
that SQL execution almost never has to read it from the KV store. Handling
changes to this SQL metadata is challenging and required a design [1] that is
unable to take advantage of the easy correctness of simply doing reads from
the KV store on every operation.

[1]
[https://github.com/cockroachdb/cockroach/blob/master/docs/RF...](https://github.com/cockroachdb/cockroach/blob/master/docs/RFCS/table_descriptor_lease.md)

~~~
elvinyung
I see -- so how _is_ performance? I see that there are no published numbers
for e.g. TPC-C or YCSB.

(For the record -- in case I seem to be especially pessimistic -- I'm actually
extremely hopeful that CRDB will actually make scaling OLTP applications
significantly easier for everyone. It's just that this probably shouldn't be
FDB all over again.)

~~~
petermattis
Performance is "ok". CockroachDB 1.0 won't be winning benchmarks, but that was
never the goal. We have seen near linear scaling from 3-64 nodes on a
uniformly random write workload. And the new distributed SQL execution engine
has shown O(num-nodes-in-cluster) speedup on some queries. But none of this
has been wrapped up into published numbers, so take it with a grain of salt.

------
RyanZAG
CockroachDB supports the PostgreSQL wire protocol, but does it support JSONB
and GIN indexes?

~~~
knz42
Not yet. On the roadmap though.

------
manigandham
CockroachDB is an exciting development and we fit right into the underserved
use-case of multi-regional databases. If it had JSON columns we would put it
into production today.

Google's Spanner is pretty great too but also missing any json columns and too
locked into GCP. We're also looking at using a JanusGraph on top of ScyllaDB
to get better querying ability with strong multi-region access.

------
subsidd
I am a database newbie, what are it's pros and cons over postgres?

~~~
knz42
[https://www.cockroachlabs.com/docs/cockroachdb-in-
comparison...](https://www.cockroachlabs.com/docs/cockroachdb-in-
comparison.html)

~~~
subsidd
Thank you!

------
_jezell_
Best database name ever

------
elvinyung
What happened to the post?

------
throwasehasdwi
What a perfect time to rename it to something reasonable

~~~
DocSavage
Just about every news item on HN related to cockroachdb has had this comment
up at the top. We get it. (I do NOT work for the company.) Some people don't
like the name. I'm sure the company has heard it over and over. Yet they
haven't changed it.

At some point, these people who constantly protest the name should realize
they've been heard and let the discussion focus on something other than their
pet peeve that has nothing to do with the underlying tech. Yes, we realize you
have a problem with the name. We realized it a dozen news items ago. But since
this is HackerNews, you'd think other aspects -- distributed transactions and
the approach they took, the fact that this is in Go (!) and the benchmarks on
it, the single executable that incorporates the C++ RocksDB embedded leveldb,
etc, etc -- would take top billing.

~~~
ardit33
It gives a major insight on how the developers don't take community feedback
seriously, or at all.

This is an issue of basic hygiene of marketing. The name is obnoxious.

It is like being a great developer and showing up in a interview looking/
dressed like a homeless person. Yes, we get it, you can be all talented and
such, but people will have a visceral response to the lack of basic hygiene
and not want to associate with that person.

In this case it is yet another database.

~~~
DocSavage
It would be a sad day if creative people were forced to consider every person
who may find their work or title objectionable. The Pixar film "Ratatouille"
was a wonderful script but some people could not get over the fact that a rat
was a chef preparing food. The screenwriters had the option of changing a
fairly significant feature of their film to appease these critics or just say
that some people won't watch it. I'm glad they chose the latter. If you really
need a distributed database that supports transactions and don't evaluate
CockroachDB because of the name, I think that's more on you than on them.

------
si13
Is .net core a second class citizen? Why dont you care c# clients (npgsql)

~~~
BramG
.Net wasn't a priority due to our very limited resources. We will be expanding
the number of drivers and ORMs greatly over the next while.

That being said, I tested npgsql a few days ago and it worked perfectly.
Nothing too extensive, just created a db, 2 tables, inserted some data and did
a join. So please give it a shot and if it doesn't work, file issues and we'll
address them.

(disclosure: I work at cockroach labs)

~~~
si13
Thank you. Also this page needs an update
[https://www.cockroachlabs.com/docs/install-client-
drivers.ht...](https://www.cockroachlabs.com/docs/install-client-drivers.html)

