Jump to content

RocksDB: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Kamahen (talk | contribs)
Added SWI-Prolog binding
Isaac868 (talk | contribs)
LevelDB is developed by google, not facebook
Line 17: Line 17:
}}
}}


'''RocksDB''' is a high performance<ref>{{cite web |url=https://github.com/facebook/rocksdb/wiki/Performance-Benchmarks |title=Performance Benchmarks |accessdate=November 29, 2015}}</ref><ref>{{cite web |url=http://smalldatum.blogspot.com/2014/07/benchmarking-leveldb-family.html |title=Benchmarking the leveldb family |accessdate=March 10, 2016}}</ref><ref>{{cite web |url=http://smalldatum.blogspot.com/2015/04/comparing-leveldb-and-rocksdb-take-2.html |title=Comparing LevelDB and RocksDB, take 2 |accessdate=March 10, 2016}}</ref><ref>{{cite web |url=https://influxdata.com/blog/benchmarking-leveldb-vs-rocksdb-vs-hyperleveldb-vs-lmdb-performance-for-influxdb/ |title=Benchmarking LevelDB vs. RocksDB vs. HyperLevelDB vs. LMDB Performance for InfluxDB |accessdate=March 10, 2016}}</ref><ref>{{cite journal |journal=EuroSys '15 Proceedings of the Tenth European Conference on Computer Systems |title=Scaling Concurrent Log-Structured Data Stores |doi=10.1145/2741948.2741973 |first1=Guy |last1=Golan-Gueta |first2=Edward |last2=Bortnikov |first3=Eschar |last3=Hillel |first4=Idit |last4=Keidar |date=April 21, 2015}}</ref> [[embedded database]] for [[Key-value database|key-value]] data. It is a fork of [[LevelDB]] by Facebook optimized to exploit many [[central processing unit]] (CPU) cores, and make efficient use of fast storage, such as [[solid-state drive]]s (SSD), for [[input/output]] (I/O) bound workloads. It is based on a [[log-structured merge-tree]] (LSM tree) data structure. It is written in [[C++]] and provides official [[application programming interface]] (API) language bindings for C++, [[C (programming language)|C]], and [[Java (programming language)|Java]]; alongside many [[#Third-party_Language_Bindings|third-party language bindings]]. RocksDB is [[open-source software]], and was originally released under a [[BSD licenses|BSD 3-clause]] license<ref>{{cite web |url=https://gigaom.com/2013/11/21/facebooks-latest-open-source-effort-a-flash-powered-database-called-rocksdb/ |title=Facebook’s latest open source effort: a flash-powered database called RocksDB |accessdate=March 10, 2016}}</ref><ref>{{cite web |url=https://www.facebook.com/notes/facebook-engineering/under-the-hood-building-and-open-sourcing-rocksdb/10151822347683920/ |title=Under the Hood: Building and open-sourcing RocksDB |accessdate=March 10, 2016}}</ref><ref>{{cite web |url=http://www.i-programmer.info/news/84-database/6624-rocksdb-facebooks-database-now-open-source.html |title=RocksDB - Facebook's Database Now Open Source |accessdate=March 10, 2016}}</ref>. However, in July 2017 the project was migrated to a dual license of both Apache 2.0 and GPLv2 license<ref>{{cite web |url=https://github.com/facebook/rocksdb/tree/3c327ac2d0fd50bbd82fe1f1af5de909dad769e6/env |title=GitHub pull request |accessdate=July 20, 2017}}</ref>, possibly in response to the Apache Software Foundation's blacklist of the previous BSD+Patents license clause.<ref>{{cite web |url=https://www.theregister.co.uk/2017/07/17/apache_says_no_to_facebook_code_libraries/ |title=Apache says 'no' to Facebook code libraries
'''RocksDB''' is a high performance<ref>{{cite web |url=https://github.com/facebook/rocksdb/wiki/Performance-Benchmarks |title=Performance Benchmarks |accessdate=November 29, 2015}}</ref><ref>{{cite web |url=http://smalldatum.blogspot.com/2014/07/benchmarking-leveldb-family.html |title=Benchmarking the leveldb family |accessdate=March 10, 2016}}</ref><ref>{{cite web |url=http://smalldatum.blogspot.com/2015/04/comparing-leveldb-and-rocksdb-take-2.html |title=Comparing LevelDB and RocksDB, take 2 |accessdate=March 10, 2016}}</ref><ref>{{cite web |url=https://influxdata.com/blog/benchmarking-leveldb-vs-rocksdb-vs-hyperleveldb-vs-lmdb-performance-for-influxdb/ |title=Benchmarking LevelDB vs. RocksDB vs. HyperLevelDB vs. LMDB Performance for InfluxDB |accessdate=March 10, 2016}}</ref><ref>{{cite journal |journal=EuroSys '15 Proceedings of the Tenth European Conference on Computer Systems |title=Scaling Concurrent Log-Structured Data Stores |doi=10.1145/2741948.2741973 |first1=Guy |last1=Golan-Gueta |first2=Edward |last2=Bortnikov |first3=Eschar |last3=Hillel |first4=Idit |last4=Keidar |date=April 21, 2015}}</ref> [[embedded database]] for [[Key-value database|key-value]] data. It is a fork of [[LevelDB]] by Google optimized to exploit many [[central processing unit]] (CPU) cores, and make efficient use of fast storage, such as [[solid-state drive]]s (SSD), for [[input/output]] (I/O) bound workloads. It is based on a [[log-structured merge-tree]] (LSM tree) data structure. It is written in [[C++]] and provides official [[application programming interface]] (API) language bindings for C++, [[C (programming language)|C]], and [[Java (programming language)|Java]]; alongside many [[#Third-party_Language_Bindings|third-party language bindings]]. RocksDB is [[open-source software]], and was originally released under a [[BSD licenses|BSD 3-clause]] license<ref>{{cite web |url=https://gigaom.com/2013/11/21/facebooks-latest-open-source-effort-a-flash-powered-database-called-rocksdb/ |title=Facebook’s latest open source effort: a flash-powered database called RocksDB |accessdate=March 10, 2016}}</ref><ref>{{cite web |url=https://www.facebook.com/notes/facebook-engineering/under-the-hood-building-and-open-sourcing-rocksdb/10151822347683920/ |title=Under the Hood: Building and open-sourcing RocksDB |accessdate=March 10, 2016}}</ref><ref>{{cite web |url=http://www.i-programmer.info/news/84-database/6624-rocksdb-facebooks-database-now-open-source.html |title=RocksDB - Facebook's Database Now Open Source |accessdate=March 10, 2016}}</ref>. However, in July 2017 the project was migrated to a dual license of both Apache 2.0 and GPLv2 license<ref>{{cite web |url=https://github.com/facebook/rocksdb/tree/3c327ac2d0fd50bbd82fe1f1af5de909dad769e6/env |title=GitHub pull request |accessdate=July 20, 2017}}</ref>, possibly in response to the Apache Software Foundation's blacklist of the previous BSD+Patents license clause.<ref>{{cite web |url=https://www.theregister.co.uk/2017/07/17/apache_says_no_to_facebook_code_libraries/ |title=Apache says 'no' to Facebook code libraries
|accessdate=July 20, 2017}}</ref><ref>{{cite web |url=https://github.com/facebook/rocksdb/issues/2605 |title=GitHub issue |accessdate=July 20, 2017}}</ref>
|accessdate=July 20, 2017}}</ref><ref>{{cite web |url=https://github.com/facebook/rocksdb/issues/2605 |title=GitHub issue |accessdate=July 20, 2017}}</ref>



Revision as of 10:03, 7 April 2019

RocksDB
Developer(s)Facebook
Initial releaseMay 2012; 12 years ago (2012-05)
Stable release
5.17.2 / November 12, 2018; 5 years ago (2018-11-12)
Repository
Written inC++
Operating systemWindows, macOS, Linux, FreeBSD
TypeEmbedded database
LicenseApache 2.0 or GPL 2
Websiterocksdb.org

RocksDB is a high performance[1][2][3][4][5] embedded database for key-value data. It is a fork of LevelDB by Google optimized to exploit many central processing unit (CPU) cores, and make efficient use of fast storage, such as solid-state drives (SSD), for input/output (I/O) bound workloads. It is based on a log-structured merge-tree (LSM tree) data structure. It is written in C++ and provides official application programming interface (API) language bindings for C++, C, and Java; alongside many third-party language bindings. RocksDB is open-source software, and was originally released under a BSD 3-clause license[6][7][8]. However, in July 2017 the project was migrated to a dual license of both Apache 2.0 and GPLv2 license[9], possibly in response to the Apache Software Foundation's blacklist of the previous BSD+Patents license clause.[10][11]

RocksDB is used in production systems at various web-scale enterprises[12] including Facebook, Yahoo!,[13] and LinkedIn.[14]

Features

RocksDB, like LevelDB, stores keys and values in arbitrary byte arrays, and data is sorted byte-wise by key or by providing a custom comparator.

RocksDB provides all of the features of LevelDB, plus:

and others: List of RocksDB features that are not in LevelDB.

RocksDB is not an SQL database (although MyRocks combines RocksDB with MySQL). Like other NoSQL and dbm stores, it has no relational data model, and it does not support SQL queries. Also, it has no direct support for secondary indexes, however a user may build their own internally using Column Families or externally. Applications use RocksDB as a library, as it does not provide a server or command-line interface.

History

RocksDB was created at Facebook by Dhruba Borthakur[25][26] in April 2012, as a fork of LevelDB with the initial stated goal of improving performance for server workloads.[27][28]

Integration

As an embeddable database, RocksDB can be used as a storage engine within a larger database management system (DBMS). For example, CockroachDB uses RocksDB as its storage engine.[29]

Alternative backend

The following projects have been started to replace or offer an alternative storage engines for already-established database systems with RocksDB:

ArangoDB

ArangoDB has added RocksDB to its previous storage engine ("mmfiles")[30]. Starting with ArangoDB 3.4, RocksDB will be the default storage engine in ArangoDB[31].

MongoDB

The MongoRocks project provides a storage module for MongoDB where the storage engine is RocksDB.[32][33][34]

A related program is Rocks Strata, a tool written in Go, which allows managing incremental backups of MongoDB when RocksDB is used as the storage engine.[35]

MySQL

The MyRocks project creates a new RocksDB based storage engine for MySQL.[36][37] In-depth details about MyRocks were presented at Percona Live 2016.[38]

Cassandra

Cassandra on RocksDB can improve the performance of Apache Cassandra significantly (3-4 times faster in general, 100 times faster in some use-cases).[39] The Instagram team at Facebook developed and open-sourced their code, along with benchmarks of their performance results.[40]

Embedded

The following database systems and applications have chosen to use RocksDB as their embedded storage engine:

Ceph's BlueStore

The Ceph's BlueStore storage layer uses RocksDB for metadata management in OSD devices[41].

LogDevice LogsDB

LogDevice's LogsDB is built atop RocksDB[42].

Faktory

Facktory[43] the background job system uses RocksDB for storage[44].

SSDB

The ssdb-rocks[45] project uses RocksDB as the storage engine for the SSDB[46] NoSQL Database.

TiDB

The TiDB[47] project uses RocksDB as its storage engine[48].

Third-party language bindings

Third-party programming language bindings available for RocksDB include:

References

  1. ^ "Performance Benchmarks". Retrieved November 29, 2015.
  2. ^ "Benchmarking the leveldb family". Retrieved March 10, 2016.
  3. ^ "Comparing LevelDB and RocksDB, take 2". Retrieved March 10, 2016.
  4. ^ "Benchmarking LevelDB vs. RocksDB vs. HyperLevelDB vs. LMDB Performance for InfluxDB". Retrieved March 10, 2016.
  5. ^ Golan-Gueta, Guy; Bortnikov, Edward; Hillel, Eschar; Keidar, Idit (April 21, 2015). "Scaling Concurrent Log-Structured Data Stores". EuroSys '15 Proceedings of the Tenth European Conference on Computer Systems. doi:10.1145/2741948.2741973.
  6. ^ "Facebook's latest open source effort: a flash-powered database called RocksDB". Retrieved March 10, 2016.
  7. ^ "Under the Hood: Building and open-sourcing RocksDB". Retrieved March 10, 2016.
  8. ^ "RocksDB - Facebook's Database Now Open Source". Retrieved March 10, 2016.
  9. ^ "GitHub pull request". Retrieved July 20, 2017.
  10. ^ "Apache says 'no' to Facebook code libraries". Retrieved July 20, 2017.
  11. ^ "GitHub issue". Retrieved July 20, 2017.
  12. ^ "Users.md". Retrieved December 1, 2015.
  13. ^ "RocksDB on Steroids". Retrieved March 10, 2016.
  14. ^ "Benchmarking Apache Samza: 1.2 million messages per second on a single node". Retrieved March 10, 2016.
  15. ^ "RocksDB transactions". GitHub. Retrieved 2016-04-04.
  16. ^ "How to backup RocksDB?". Retrieved 2017-07-19.
  17. ^ "Checkpoints". Retrieved 2017-07-19.
  18. ^ "Column families in RocksDB". GitHub. Retrieved 2016-04-04.
  19. ^ "RocksDB bloom filters". GitHub. Retrieved 2016-04-04.
  20. ^ "RocksDB TTL support". GitHub. Retrieved 2016-04-04.
  21. ^ "Universal compaction". GitHub. Retrieved 2016-04-04.
  22. ^ "RocksDB merge operator". GitHub. Retrieved 2016-04-04.
  23. ^ "RocksDB perf context and IO stats context". GitHub. Retrieved 2016-04-04.
  24. ^ "Spatial indexing in RocksDB". rocksdb.org. Retrieved 2018-07-19.
  25. ^ "First commit where RocksDB diverges from LevelDB". May 10, 2012. Retrieved March 15, 2016.
  26. ^ "rocksdb README file". Nov 30, 2012. Retrieved March 15, 2016.
  27. ^ "The History of RocksDB". November 24, 2013. Retrieved March 10, 2016.
  28. ^ Borthakur, Dhruba (November 22, 2013). "RocksDB: A High Performance Embedded Key-Value Store for Flash Storage - Data@Scale". Retrieved March 10, 2016. ... The story of why we decided to do RocksDB ...
  29. ^ Edwards, Jessica (2015-10-29). "Hello World: Meet CockroachDB, the Resilient SQL Database". The New Stack. Retrieved 2016-07-08.
  30. ^ "Comparing new RocksDB and MMFiles storage engines".
  31. ^ "RC1 ArangoDB 3.4 - Whats new?".
  32. ^ "mongodb-partners/mongo-rocks".
  33. ^ "Integrating RocksDB with MongoDB". Retrieved July 19, 2018.
  34. ^ "MongoDB + RocksDB at Parse". Retrieved December 1, 2015.
  35. ^ "facebookgo/rocks-strata".
  36. ^ "facebook/mysql-5.6".
  37. ^ "MyRocks: MySQL on RocksDB" (PDF). Retrieved November 29, 2015.
  38. ^ "MyRocks Deep Dive". Retrieved May 9, 2016.
  39. ^ "Cassandra on RocksDB at Percona Live 2018".
  40. ^ "Open-sourcing a 10x reduction in Apache Cassandra tail latency".
  41. ^ "Storage Devices -- Ceph Documentation".
  42. ^ "LogDevice: a distributed data store for logs". Mark Marchukov, Facebook.
  43. ^ "contribsys/faktory".
  44. ^ "Introducing Faktory". Mike Perham.
  45. ^ "ideawu/ssdb-rocks".
  46. ^ https://ssdb.io
  47. ^ "ideawu/ssdb-rocks".
  48. ^ https://pingcap.github.io/blog/2017/07/11/tidbinternal1/#rocksdb
  49. ^ "warrenfalk/rocksdb-sharp".
  50. ^ "b1naryth1ef/rocksdb".
  51. ^ "urbint/rox".
  52. ^ "leo-project/erocksdb".
  53. ^ "barrel-db/erlang-rocksdb".
  54. ^ "tecbot/gorocksdb".
  55. ^ "rocksdb-haskell: Haskell bindings to RocksDB".
  56. ^ "RocksJava".
  57. ^ "rocksdb".
  58. ^ "iabudiab/ObjectiveRocks".
  59. ^ "OCaml bindings for RocksDB".
  60. ^ "An OCaml RocksDb binding using ocaml-ctypes".
  61. ^ "RocksDB - Perl extension for RocksDB - metacpan.org".
  62. ^ "Photonios/rocksdb-php".
  63. ^ "SWI-Prolog interface for RocksDB".
  64. ^ "stephan-hof/pyrocksdb".
  65. ^ "rocksdb-ruby - RubyGems.org - your community gem host".
  66. ^ "spacejam/rust-rocksdb".

External links