So here's a thought for a Go interface that would store data to memory or disk and sync it with other instances in an intermittently connected manner.
The store looks like this:
type Range struct {
Start []byte
End []byte
DB *Store
}
// Range would implement Ranger
type Ranger interface {
func First() (*Record, error)
func Last() (*Record, error)
func All() (chan *Record, error)
func AllReverse() (chan *Record, error)
}
Then you can do DB.RangeByPrefix("selected").First()
and get a record.
TODO: Writing
TODO: Syncing (but use a log)