dburkart / fossil

Simple and expressive time-series database written in Go
BSD 2-Clause "Simplified" License
5 stars 0 forks source link

Proposal: Support for INSERT #16

Open dburkart opened 1 year ago

dburkart commented 1 year ago

In Fossil, APPEND takes a []byte, and appends it as a new piece of time-series data at the end of the database. This is highly efficient, since the semantics of APPEND guarantee that the data will always have the latest timestamp on addition to the database (since the user relies on the database to determine sequencing).

The INSERT operation, on the other hand, takes a (time.Time, []byte) pair, so could theoretically need to be inserted anywhere in the database. Because the overall design of the database is one of a giant unbounded array, the complexity of the operation increases the further back in time we go.

Are there any use-cases where this would be useful?

gideonw commented 1 year ago

There are definitely use cases where being able to send data attached to a time instant makes sense.