BitCask

Content

BitcaskDeveloper(s)Basho TechnologiesStable release
2.1.0 / 7 May 2020; 2 years ago (7 May 2020)
Repository
github.com/basho/bitcask
Written inErlangOperating systemLinux, BSD, Mac OS X, SolarisPlatformIA-32, x86-64LicenseApache License 2.0Websitedocs.basho.com/riak/latest/ops/advanced/backends/bitcask/

O BitCask é um aplicativo Erlang que fornece uma API para armazenar e recuperar dados de chave/valor em uma tabela de hash estruturada por log. O design deve muito aos princípios encontrados nos sistemas de arquivos estruturados de log e se inspira em vários designs que envolvem a fusão de arquivos de log.

Forças

O BitCask tem várias vantagens devido ao seu formato de dados apenas no disco e no uso de um uso de uma mesa de hash da memória de chaves para pesquisas:

Low latency for read and write operations.High throughput, especially when writing an incoming stream of random items: Because the data being written doesn't need to be ordered on disk and because the log-structured design allows for minimal disk-head movement during writes, these operations generally saturate the I/O and disk bandwidth.Single seek to retrieve any value: Bitcask's in-memory hash-table of keys points directly to the locations on disk where the data resides. Bitcask never needs more than one disk-seek to read a value, and the operating system's file-system caching can obviate the need for disk-seeks entirely for some lookups.Predictable lookup and insert performance: Read operations as well as write operations have fixed, predictable behavior. Write operations require only a seek to the end of the current file that is open for writing and an append to that file.Fast, bounded crash recovery: Bitcask's disk format makes recovery straightforward. The only items that might be lost are partially written records at the tail of the file last opened for writes. Recovery need only review the last record or two written and verify checksums to ensure that the data is consistent.Easy backup: Bitcask's disk format means that any utility that archives or copies files in disk-block order will properly backup or copy a Bitcask database.

Fraqueza

Como o BitCask mantém todas as teclas na memória o tempo todo, o sistema deve ter memória suficiente para conter todo o espaço de chave, além de outros componentes operacionais e os buffers do sistema de arquivos do sistema operacional.