penberg / ycsb-rs

A Rust port of Yahoo! Cloud Serving Benchmark (YCSB)
Apache License 2.0
29 stars 13 forks source link

Move to library, to allow external DBs to link into the YCSB framework instead of having to implement their DBs in-tree #6

Open bsdinis opened 2 years ago

bsdinis commented 2 years ago

Summary

Refactors the codebase so that it's a library exposing two functions:

This allows users to include ycsb-rs as a dependency, implement the DB trait and run YCSB. Previously, one would have to contribute to the repo to add their DB, which is inflexible.

Now, the repo is structured as a lib and an examples dir, with the only DB which was implemented before (sqlite).

General Comments

This is still WIP. At this stage I'd like some feedback on the overall design, but I feel there is still a lot to improve.

I also have a more general question about the direction of the repo as a whole. Looking through the code this seems much greener than I originally thought. A lot of things are yet to be implemented, and there hasn't been much movement on the repo recently to change that. @penberg has the momentum on this died down? I'm happy to take over, if you're interested.

Rusqlite

I moved the implementation of the sqlite example to use rusqlite. This was somewhat arbitrary, but my reasoning was the following:

  1. Since it's an example, the actual implementation is less important
  2. The previous implementation was not complete, and having more experience with rusqlite made me gravitate towards that small reimplementation.

Issues

This follows from the discussion on Issue #4

penberg commented 2 years ago

@bsdinis Looks nice! We can definitely put sqlite in examples now, but I think we could also have an "official" ycsb-rs-sqlite crate in the source tree that uses the library.

There's definitely bunch of things to do in the project. I started it because I needed to benchmark https://github.com/chiselstrike/chiselstore, found it very hard to integrate with YCSB (the Java version). I do have some more work in the pipeline around this, so I have not abandoned the project, just didn't have anything that needed to be worked on.

I can add you as a collaborator to this repository if you're interested @bsdinis?