Live data from Hacker News

HyperDex: A Searchable Distributed Key-Value Store

hyperdex.org

51–60 of 89 posts

Re: HyperDex: A Searchable Distributed Key-Value Store

#51
post #33

Did you compare the performance with (local) BerkeleyDB? Also, is there a locking mechanism? I'm the author of Torrus (torrus.org), and BerkeleyDB stability and non-network nature are quite painful. But I'm relying on its speed, concurrent locking, and some ways to acquire an exclusive lock on a table. It would be interesting to offer an alternative backend for torrus.

I'm not sure exactly what you're looking for, but Berkeley DB is embedded in your application on a single host, while HyperDex is distributed. It sounds like that's exactly what you want.

What do you use exclusive locks for?

Re: HyperDex: A Searchable Distributed Key-Value Store

#52

Interesting.. keep it coming. We need a unified nosql language.. Basically what SQL is.

What's wrong with SQL?

Nothing really. When people talk about the nosql movement, they're mostly referring to the 'non-relational database' movement. The fact that they all implement SQL as their dsl is after the fact.

Re: HyperDex: A Searchable Distributed Key-Value Store

#53

Interesting.. keep it coming. We need a unified nosql language.. Basically what SQL is.

What's wrong with SQL?

* COBOL-inspired syntax that is neither human or machine parseable (easily).

* Strange nested query rules

* Language encourages Cartesian products for virtually every non-trivial calculation. This makes join order crucial for reasoning about performance.

* Humans don't have the brain capacity to reason about these joins, forcing the logic onto the query planner.

* Humans don't have the brain capacity to reason about the query planner reasoning about the joins.

* End result: bizarro-english syntax that's supremely hacked-up to twerk the query planner to do your bidding.

Re: HyperDex: A Searchable Distributed Key-Value Store

#54
post #42

If you're building a distributed KV stores, you should benchmark against other distributed KV stores. Mongo and Cassandra aren't really. But Riak is. Plus, since its "distributed" here's the benchmark I'd like to see: 1. Set up a cluster of 8 nodes. Set data replication to 3. 2. Load 3TB of data into the cluster, across 1M documents (or some data set of that order) 3. Run your tests. Optimize each of the DBs for the…

Why would a competitor build this Riak benchmark? How are they supposed to know which Riak configuration performs best? That's the point of YCSB. Each vendor can submit the optimal configuration for their system, and they all run the same benchmark. At the end of the day, each vendor is going to publish benchmarks that show their system performing better than all others. It's your job, not theirs, to verify those ben…

If things haven't changed in the past year you are right about not being able to do replicated multiple DC support.

Re: HyperDex: A Searchable Distributed Key-Value Store

#56
post #51
post #33

Did you compare the performance with (local) BerkeleyDB? Also, is there a locking mechanism? I'm the author of Torrus (torrus.org), and BerkeleyDB stability and non-network nature are quite painful. But I'm relying on its speed, concurrent locking, and some ways to acquire an exclusive lock on a table. It would be interesting to offer an alternative backend for torrus.

I'm not sure exactly what you're looking for, but Berkeley DB is embedded in your application on a single host, while HyperDex is distributed. It sounds like that's exactly what you want. What do you use exclusive locks for?

I use exclusive locks where multiple processes concur for data access, and these locks guarantee the data consistency.

For example, the GUI engine may eventually start cleaning its old cache, and the exclusive lock prevents other GUI processes (which are mod_perl or fcgi processes) to do the same.

another example is when the database is big enough, and when multiple collector processes start at the same time, I use the exclusive lock to let them initialize and slurp the data sequentially: this prevents from excessive disk seeks.

but as you mentioned in another thread, your solution is locked to a single architecture, and I cannot afford that.

Re: HyperDex: A Searchable Distributed Key-Value Store

#57
post #51
post #33

Did you compare the performance with (local) BerkeleyDB? Also, is there a locking mechanism? I'm the author of Torrus (torrus.org), and BerkeleyDB stability and non-network nature are quite painful. But I'm relying on its speed, concurrent locking, and some ways to acquire an exclusive lock on a table. It would be interesting to offer an alternative backend for torrus.

I'm not sure exactly what you're looking for, but Berkeley DB is embedded in your application on a single host, while HyperDex is distributed. It sounds like that's exactly what you want. What do you use exclusive locks for?

and yes you're certainly right that BDB is embedded into the application process. Then any slight memory corruption may destroy the database and lockup the whole service. We've seen that, especially with graphics libraries.

But BDB offers tremendous speed, so it won't be easy to decouple the DB engine from the application process.

Re: HyperDex: A Searchable Distributed Key-Value Store

#58
post #35

Earlier quoted context omitted.

This sounds like a CP system to me. There's nothing wrong with that btw, I don't know why people are so reluctant to admit this. AP systems have some useful properties, but they're also (typically) more difficult to reason about. The "hiccups" you describe are periods of unavailability. The increased latency is caused by an element of the system waiting for the data to become available again, a totally valid strategy…

To be precise, I would argue this is actually a CA system. "C" because there are consistency guarantees, which are upheld even in the face of failures / partition. "A" because the system will continue making progress even after a node failure. What I called a "hiccup" can be made arbitrarily short, in principle at least. The system can work around failed nodes, it does not need to wait for them to be repaired. Not "P…

There is no CA.

You cannot guarantee consistency and availability simultaneously in the face of network partitions. Once the line of communications is cut or overloaded (slow enough = a partition), you have to pick one or the other. It's basic physics.

If two entities can't communicate, they can't synchronize state, so one (or both) of them have to quit acting like they have a consistent view of the data.

Re: HyperDex: A Searchable Distributed Key-Value Store

#59
post #39
post #32

Earlier quoted context omitted.

The comparison with Redis is a bit strange at a first glance, what I mean is, if in Redis I replace the actual fetching of data with "return 'foo'" at every query it still returns 150k/requests per second for every operation. The same will do memcached per single core . So either in your code there is some good trick to improve speed in the networking layer, or you are comparing multiple cores/nodes to single core/no…

Both systems were single process per host. I agree that Redis does not have good support for "E", so anyone looking at the results should look at A-D,F. Both systems performed entirely out of main memory to avoid touching disk. The Redis benchmark results only came in last night. We'll be writing up the methodology soon. We used the YCSB Redis binding from branch master. I'd be interested in your opinion on how well…

Redis uses a single thread, not just a single process, so if Hyperdex is multi-threaded you are comparing single core vs multiple cores. As you can see with memcached that instead is able to use multiple cores (a feature that Redis is going to implement soon) this leads to a big performance improvement in this kind of benchmarks.

EDIT: (I checked that Hyperdex actually uses threads and multiple cores) If you want a fair comparison you should run Hyperdex on a single core as well, or you can run N instances of Redis (one per number of core) and write the benchmark so that it uses all the instances.

I'll check the YCSB Redis bindings, I never looked at them before. Thanks for the reply.

EDIT2: there are also problems with the YCSB Redis bindings:

1) It basically forces an object-store data model on Redis, so only uses hashes to store objects, and every time an object is stored or deleted, a sorted set is updated as well. This is a possible use case of Redis but not a very idiomatic / representative one.

2) Even for benchmarks not involving searching, the sorted set is anyway updated.

3) There is no pipelining used to alter the object and store the sorted set. Every operation pays 2x the Round Trip Time in the Redis bindings.

4) Even worse, there is no pipelining in the "search" operation, so you may the RTT a lot of times when you do a scan operation with this bindings.

The minimal change to the YCSB bindings is to modify the bindings to use pipelining when possible (almost always, actually). Still I think that an intermediate layer to turn Redis into an automatically-indexing object store does not make sense. Another big problem is that you are comparing multi-cores vs single-core.

So if you really are interested in a comparison between HyperDex and Redis you should pick an use case and model it accordingly with the best tools of both the databases.

What I would recommend is to use the following use cases.

1) Populate the two DBs with 10 millions of hashes, then write a benchmark where 50 clients simultaneously get and set specific fields.

2) Like "1" but increment a field by 10 at every write query.

3) Simulate a leader board where 50 clients simultaneously update the scores of the different "players" in one operation, and ask the top 10 users in the leader bord with another operation.

4) Simulate a capped collection where you always add the latest news in a web site, and you can get the top-10 to show in the home page. Every of the 50 clients should write a single item and fetch top-10 items.

And so forth. Always use 10 million objects and mixed reads and writes with 50 clients at the same time. Write the best code for both the DBs (I can help with Redis).

This time you are truly comparing the two DBs in a real world scenario.

Re: HyperDex: A Searchable Distributed Key-Value Store

#60
I'm looking for a good paper or a book detailing patterns or strategies of storing complex data structures and relations, or designing complex schemas on top of key/value stores, possibly with real-world use cases / success stories. A bonus would be the same on top of key/value/range(search) stores, just like HyperDex is. Any suggestions HN?

Technically, it should be even possible to implement SQL on top of a store like HyperDex (there's the Tenzing paper from Google). But I'm not looking specifically at SQL, but at more general scope.

Post reply on HN