8 ms·
The SQL layer in CockroachDB
- wolf550e 9y agoTheir number 1 problem is the name.
- systems 9y agothey should have named it after a fruit ... like mangodb or something
- Rapzid 9y agoMango IS tasty. Much more tasty than cockroach IMHO. Still though, I doubt the name is much of an issue.
- user5994461 9y agoI just had a horrible vision of mango and cockroach together :( You guys are ruining my lunch time.
- bshimmin 9y agoSomebody already thought of that one! https://github.com/dcramer/mangodb https://github.com/dcramer/mangodb proprietary auto sharting algorithm makes me laugh every time.
- systems 9y agoit was a word play on mongodb and apple :) but i guess no one got the joke , because you know apple is like a famous tech company and mongodb is a popular nosql db so apple+mongodb = mangodb .. got it .. no .. :(
- ridwanmsharif 9y agowell personally I thought fleshing out a distributed key-value store atop thousands of raft groups whilst maintaining strong consistency guarantees would be their number one problem but I think we might have different definitions here.
- sheeshkebab 9y agoman, they are committed to spreading infestation... "Roaches on Open Water! CockroachDB on DigitalOcean" https://www.cockroachlabs.com/blog/roaches-on-open-water-cockroachdb-on-digitalocean/ https://www.cockroachlabs.com/blog/roaches-on-open-water-coc... Next up - Annual cockroachdb conference: roach motel.
- cocktailpeanuts 9y agoDon't know why downvoted. They can keep thinking the name is not a problem, or they can decide to grow up and change the name. Only naive engineers who know nothing about branding/marketing will think this is OK. It's fine if they're just doing their own thing, but it's a whole different story if they're operating a business
- anarazel 9y agoBecause it's unrelated to the post - which is about the architecture - and because it's brought up every single time?
- atomical 9y agoI have to think about cockroaches every time I see a post about this database. It is fair game.
- anarazel 9y agoSeriously? I reflexively think about specific, often negative, things when I read about a lot of topics. That doesn't mean those thoughts have to be shared. I think a good rough guideline is trying to only comment if that comment has a chance of advancing the discussion, answer somebody's questions, or asks for more information. Restating repeatedly made comments doesn't do that.
- sanderjd 9y agoYeah the constant obsession with the name is so weird that it really makes me wonder if there's some astroturfing campaign going on. I'm not usually a conspiracy theorist but I mean seriously, the name is not that weird and the tech seems very interesting. The first time I saw comments about it I thought, "huh, yeah I guess that is sort of a weird name now that you mention it". The second time u thought, "ok I've heard this before". The third time I thought, "hmm, this is pretty tedious". And this is the 7th or so time now and I just think, "wtf is going on here?".
- 9y ago
- farax91 9y agoI rarely comment on HN....but I just came to say that I effing love the name. Don't ever change it. Screw the VC's and middle managers.
- Quai 9y agoTell that to the MongoDB-gang.. "Mongo" is a norwegian/swedish(?) slang for a retarted person. It's derived from the word "mongoloid" which was an person with Downs or a similar syndrome. The latter word is not commonly used anymore.
- detaro 9y agoIn German as well.
- dawkins 9y agoAnd in Spanish
- user5994461 9y agoActually, mongoloid (and similar) is the word. "Mongo" alone is not that bad and it's a prefix to many words.
- pstuart 9y agocroachdb.com is available...
- sanderjd 9y agoI really don't get this meme. Who cares? Lots of projects have weird names. It's a database, not a consumer packaged good brand. Surely those who are evaluating the engineering tradeoffs in database technology aren't basing their decision making on a name.
- deleted 9y ago[deleted]
- user5994461 9y agoThere is an inner bias and emotion reactions to names. It always weights in in the decision. If you think you are not affected. Would you try a product named "octopussy"? Would you deploy it across your organization and gives presentation about it? P.S. Octopussy is a real tool that solves a hard problem I forgot about.
- bbcbasic 9y agoHow about git? I.e. mild British insult.
- oregontechninja 9y agoThe name isn't a problem, it's smart and memorable.
- shouldbworking 9y agoYes just keep shouting that from the rooftops. I'm still glad my parents didn't name me Quasimodo.
- atomical 9y agoI strongly disagree. It conjures up thoughts that are unpleasant. That isn't a good marketing strategy.
- Karunamon 9y agoMost of the bad things I can think up of about cockroaches are good in the context of databases. Replication, being hard to kill, being around for ages, collective decision-making.. As someone downthread said, it's not a consumer product and doesn't need to be marketed like one.
- JTenerife 9y agoIt is. Associations and images create emotions which can't be easily overuled by rational thinking. That's why names like HyperDB still work for most people despite being obviously silly. Look at the marketing industry. I'm posting this to urge the guys behind it to rename it. The name simply create unnecessary friction. (But don't name it UnicornDB either. :-))
- shouldbworking 9y agoMight as well name it after the most vile insect known to man, what could go wrong? I named my son gonorrheapenis after my struggles with fertility and nobody has respect for this, I don't understand why. This bacteria is very hard to stop and can make people sterile. I believed it was a good example of the power of my son and our database. If you don't think the name is hurting adoption you live in fairyland. A place where startups get extra karma for being edgy and mentally challenged.
- uncensored 9y agoFaunaDB is a weirder name than Cockroach. Cut off the head and the body keeps going. The name is apt for a distributed db.
- anarazel 9y agoA lot of that looks quite familiar from working on postgres. Partially that's because it's "just the right way" to do some things, but I also wonder if there's some more looking at pg than just reusing the wire protocol? PS: Should any cockroach contributors have opinions on limitations & evolution of the protocol: I'd be interested.
- mjibson 9y agoI work at CockroachDB on the implementation of the Postgres protocol, and I'm a maintainer of lib/pq, a Go client implementation of the protocol. Overall I think it is a very good protocol. I can't come up with any gripes I have with it, nor do I remember any "it would be nice if" moments when adding support for some of the various parts of it. There's certainly some difficulty in some of the more complicated parts, like managing all of the type hinting back and forth for prepared statements. But in general I found the documentation to be complete and well done. The one thing that we did have trouble with was figuring out the exact formats for all types when using the binary encoding format. We wrote some code to sniff real Postgres servers so we could figure out what was going on. It would have been easier, obviously, if it was documented, but this wasn't a huge deal since it is likely a rarely needed thing.
- anarazel 9y ago> I work at CockroachDB on the implementation of the Postgres protocol, and I'm a maintainer of lib/pq, a Go client implementation of the protocol. Thanks for replying! > Overall I think it is a very good protocol. I can't come up with any gripes I have with it, nor do I remember any "it would be nice if" moments when adding support for some of the various parts of it. There's certainly some difficulty in some of the more complicated parts, like managing all of the type hinting back and forth for prepared statements. But in general I found the documentation to be complete and well done. Cool. I've more complaints than you in that case :) Although drivers, especially libpq (no pipelining, no mixed binary/text results), are more frequently an issue. One thing I was wondering whether you might also be interested is something like 'commit identifiers' (WAL LSNs in pg's case) for slightly relaxed consistency models. That allows things like committing on one node, and when later doing queries on replicas specify that data needs to have replicated at least up to that identifier. > The one thing that we did have trouble with was figuring out the exact formats for all types when using the binary encoding format. We wrote some code to sniff real Postgres servers so we could figure out what was going on. It would have been easier, obviously, if it was documented, but this wasn't a huge deal since it is likely a rarely needed thing. Yea, I think that's a fair complaint. I wasn't around yet when the current binary format was devised (2003ish IIRC?), I don't know how we ended up deciding that code was the documentation for that.
- AdamJacobMuller 9y agoThis is awesome. I was looking at using/extracting their pgwire implementation to provide an SQL-like interface to the in-memory state of a particular application we use, this document will make it way way easier.
- threeseed 9y agoYou can also use Calcite if you're on the JVM: https://calcite.apache.org https://calcite.apache.org
- AdamJacobMuller 9y agoThat's much nicer than hacking stuff out, unfortunately/fortunately (not sure anymore) I am not a java programmer, this particular app is in go.
- jjirsa 9y agoDistributed DBs are hard; bringing new contributors up to speed is really hard. They'll be able to hire some, but finding random OSS contributors is HARD. Very hard.
- josephg 9y agoI've got a little transactional KV store in the wings and have been thinking about writing a Go frontend for it. I'd love full SQL support, but there's no way I'm going to implement my own query optimizer. How hard would it be to repurpose this layer to back onto a generic sorted KV store? It this deeply tied in to the rest of cockroachdb's architecture, or does it talk through a simple generic KV store interface?
- deleted 9y ago[deleted]
- irfansharif 9y agowhile there is an explicit delineation between the internal `kv` package[1] and the overarching `sql` one[2], your specific concern regarding a query optimizer is not strictly an isolated component at this moment in time. query optimizations, last I checked, was not an explicit pre-processing stage but rather done so when constructing the AST representation of the query with each node being an `iterator` as described in the Volcano Evaluation System paper[3]. there was some work underway to move towards an intermediate representation[4] to go through the standard query optimizations, no context into how far along this effort is. [1]: https://github.com/cockroachdb/cockroach/tree/master/pkg/kv https://github.com/cockroachdb/cockroach/tree/master/pkg/kv [2]: https://github.com/cockroachdb/cockroach/tree/master/pkg/sql https://github.com/cockroachdb/cockroach/tree/master/pkg/sql [3]: https://paperhub.s3.amazonaws.com/dace52a42c07f7f8348b08dc2b186061.pdf https://paperhub.s3.amazonaws.com/dace52a42c07f7f8348b08dc2b... [4]: https://github.com/cockroachdb/cockroach/pull/10055 https://github.com/cockroachdb/cockroach/pull/10055
- knz42 9y agoI wrote the rfc for this "effort": there will be an IR in CockroachDB, just not right now. It's a lot of work and we're not going to do this in one go.
- Steeeve 9y agoI always find that when building architecture documentation after the fact, you want to re-factor or at least re-engineer a lot of the code base to account for areas where lines are crossed or decisions were made that might be performant and functional but lead to poor maintainability or opacity to all but the most involved project participants. It would be great to see this document evolve into a guideline rather than a "this is how most of the code works today" document.