Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

What is it?

Go library for writing and reading append-only application logs storing events (event store), transactions (commit, redo, undo log) or any other entries.

Why it is needed?

Let's say you have a large data structure which is modified by some command. After such modificaton you can either:

  • save a whole snapshot of data to disk (simple to implement, but not efficient if data structure is big)
  • or store the actual change in a form of event, command or transaction (much more efficient, harder to implement)

Logstore is an API for storing and retrieving such entries.

Install

go get -u github.com/elgopher/logstore

Quick Start

See example/write/main.go. More examples in example directory.

Project Status

The library is under heavy development, not ready for production use yet.

Project Plan

MVP - minimal number of features, not optimized yet, final API proposal

  • API for writing and reading entries from a log
  • Use segments in order to implement efficient compaction
  • Add segment limits
  • Implement compaction (manual and goroutine)
  • Reader should allow reading entries starting from given time
  • Add higher level functions for reading and writing using structs (instead of byte slices)

To be done later

  • Add replication to other filesystems
  • Verify integrity using checksums
  • Improve performance of Write by using batch
  • Improve performance of Read with starting time option by using binary search
  • Decrease number of allocations in Write, Read and codec
  • CLI for listing entries and compaction
  • Metrics

About

Go library for writing and reading append-only application logs storing events (event store), transactions (commit, redo, undo log) or any other entries.

Topics

Resources

Stars

3 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages