Skip to content

Conversation

@notmandatory
Copy link
Contributor

This PR needs to be rebased after #40 , #41 and #42 are merged.

@notmandatory notmandatory changed the title WIP; Create ChainDB trait and add new rocksdb ChainDB implementation as alternative to Hammersbald WIP; Add new rocksdb ChainDB implementation as alternative to Hammersbald Sep 4, 2020
@prusnak
Copy link
Contributor

prusnak commented Oct 23, 2020

Can you please describe what are the advantages and disadvantages of hammersbald and rocksdb? That is I am interested in hearing 4 sides of the story (HB+, HB-, RDB+, RDB-).

@notmandatory
Copy link
Contributor Author

@prusnak my initial motivation for this change was that I ran into problems with hammersbald when I used it in a mobile (android) app and I wanted to see how a more common (for mobile) embedded DB would perform. My understanding is that hammersbald's primary advantages is better performance, which may be important for a multi-user server app but I believe is less so for a single user mobile app. In my (non-exhaustive) initial test both DBs had equivalent performance loading all headers (646k) from storage to memory cache. Both DBs are also similar in size and dependencies, but RDB is clearly the winner in terms of maturity.

Feature hammersbald rust-rocksdb Note
Maturity - + contrib/forks: HB 3/11, RDB 97/318
Dependencies + + HB 1 (hex) , RDB 2 (libc, rocksdb-sys)
Size + + HB 26.1 kb, RDB 79.6 kb
Multi-threaded + +
Performance + + quick test on macbook, both ~5-6 sec to load header cache

@notmandatory
Copy link
Contributor Author

I've put this on the back burner right now, but if others are interested I'm happy to get it ready for actual review and merging.

@notmandatory
Copy link
Contributor Author

I don't think I'll be getting back to this one so closing to get it off anyone's radar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants