a | b | c | d | e | f |
g | h | i | j | k | l |
m | n | o | p | q | r |
s | t | u | v | w | x |
y | z | 0 | 1 | 2 | 3 |
4 | 5 | 6 | 7 | 8 | 9 |
Tea Key-Value Store Write Ahead Log
I my previous post I introduced the Tea Key-Value Store. The store is designed for easy-to-use integration in existing processes without making any assumptions about the hosting process’ needs. In some cases, that is surely enough and gives developers just what they need to store semi-structured data with lookups through point queries.
However, one think I’ve wanted to implement for a while too was a write-ahead log (WAL) that can be use for recovery scenarios. The idea for a WAL is conceivably simple: before data is actually committed to persistent storage, a record describing that data is written to the WAL. The WAL itself is typically a pre-allocated file of some size that only ever gets appended to or deleted, but never overwritten. How much space needs to be pre-allocated depends on the usage as well as other factors like frequency of flushing data to disk or the size of typical records themselves. With the Tea Key-Value Store of course you can configure the size of the pre-allocated WAL should you select to use the WAL in the first place.
read more