Skip to content

Commit

Permalink
Merge pull request steemit#2200 from nafest/master
Browse files Browse the repository at this point in the history
Fix typos in chainbase README.md
  • Loading branch information
Michael Vandeberg authored Mar 22, 2018
2 parents 67dd4bf + 667d095 commit f27b491
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions libraries/chainbase/README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# ChainBase - a fast version controlled, transactional database

ChainBase is designed to meet the demanding requirments of blockchain applications, but is suitable for use
in any application that requires a robust transactional database with the ability have near-infinate levels of undo
history.
ChainBase is designed to meet the demanding requirements of blockchain applications, but is suitable for use
in any application that requires a robust transactional database with the ability to have near-infinite
levels of undo history.

While chainbase was designed for blockchain applications, it is suitable for any program that needs to
persist complex application state with the ability to undo.

## Features

- Supports multiple objects (tables) with multiple indicies (based upon boost::multi_index_container)
- State is persistant and sharable among multiple processes
- Supports multiple objects (tables) with multiple indices (based upon boost::multi_index_container)
- State is persistent and sharable among multiple processes
- Nested Transactional Writes with ability to undo changes

## Dependencies
Expand Down Expand Up @@ -117,18 +117,18 @@ By default ChainBase provides no synchronization and has the same concurrency re
boost::multi_index_container. This means that two or more threads may read the database at the
same time, but all writes must be protected by a mutex.
Multiple processes may open the same database if care is taken to use interpocess locking on the
database.
Multiple processes may open the same database if care is taken to use interprocess locking on
the database.
## Persistance
## Persistence
By default data is only flushed to disk upon request or when the program exits. So long as the program
does not crash in the middle of a call to db.modify(), or db.create() the content of the
database should remain in a consistant state. This means that you should minimize the complexity of the
does not crash in the middle of a call to db.modify(), or db.create() the contents of the
database should remain in a consistent state. This means that you should minimize the complexity of the
lambdas used to create and/or modify state.
If the operating system crashes or the computer loses power, then the database will be left in an undefined
state depending upon which memory pages that operating system was able to sync to disk.
state depending upon which memory pages the operating system was able to sync to disk.
ChainBase was designed to be used with blockchain applications where an append-only log of blocks is used
to secure state in the event of power loss. This block log can be replayed to regenerate the full database
Expand All @@ -145,13 +145,13 @@ If portability is desired, the developer will have to export the database to a s
## Background
Blockchain applications depend upon a high performance database capable of millions of read/write
operations per second. Additionally blockchains operate on the basis of "eventually consistant" which
operations per second. Additionally blockchains operate on the basis of "eventually consistent" which
means that any changes made to the database are potentially reversible for an unknown amount of time depending
upon the consenus protocol used.
upon the consensus protocol used.
Existing database such as [libbitcoin Database](https://github.com/libbitcoin/libbitcoin-database) achieve high
peformance using similar techniques (memory mapped files), but they are heavily specialised and do not implement
the logic necessary for multiple indicies or undo history.
Existing databases such as [libbitcoin Database](https://github.com/libbitcoin/libbitcoin-database) achieve high
performance using similar techniques (memory mapped files), but they are heavily specialised and do not implement
the logic necessary for multiple indices or undo history.
Databases such as LevelDB provide a simple Key/Value database, but suffer from poor performance relative to
memory mapped file implementations.
Expand Down

0 comments on commit f27b491

Please sign in to comment.