elgopher/logstore

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

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.

go get -u .com/elgopher/logstore

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

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

  • 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)
  • 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

License

Stars

Watchers

Forks

Packages

No packages published