Computer >> Hướng Dẫn Máy Tính >  >> Lập Trình >> Cơ Sở Dữ Liệu

MongoDB 2.8 Ra mắt Pluggable Storage Engines cho Performance Linh hoạt, Full-Feature

Tại MongoDB World tháng trước, founder và CTO Eliot Horowitz công bố support pluggable storage engines scheduled cho release 2.8. Điều này exciting vì mongo users giờ chọn storage engine best suit workload, với API planned full support All MongoDB features, không phải give up current functionality. Không chỉ vậy, nodes trong same replica set sẽ dùng different storage engines, enable interesting configurations cho varying needs.

Great thing về MongoDB fully open source: không phải wait until 2.8 released để play với experimental features. Toàn bộ source code clone từ GitHub và compile include experimental features đang worked on.

Ví dụ dưới show cách build mongo với rocksdb example storage engine presented at MongoDB World.

Từ freshly installed CentOS 6.5 cloud instance, grab basic dependencies:

$ yum groupinstall 'Development Tools'
$ yum install git glibc-devel scons`

Tiếp get MongoDB source code từ GitHub:

$ git clone https://github.com/mongodb/mongo.git

Compile source với RocksDB support enabled:

$ scons --rocksdb=ROCKSDB mongo mongod

Hoặc speed up dùng -j option specify parallel jobs, nếu dedicate system compile, good indicator là cores +1, của tôi:

$ scons -j 17 --rocksdb=ROCKSDB mongo mongod

Lưu ý: pluggable storage engine support và RocksDB engine hoàn toàn experimental lúc này, good chance encounter errors unable compile from master, expected at this stage. Muốn track progress, MongoDB dev mailing list good place start.

Sau compile finished, start mongod process với new --storageEngine parameter:

$ ./mongod --storageEngine rocksExperiment

Cuối cùng test everything bằng connect và insert simple document, dùng db.stats(). Nên thấy RocksDB statistics piped back nếu everything gone as planned.

Như bạn thấy, fairly simple get up and running với experimental features enabled. Tôi very excited thấy pluggable storage engine code progress và more new engines announced khi closer to 2.8 release.