gorse
gorse copied to clipboard
implement queue in data storage
Background
In Gorse v0.4.x, neighbors, and models are not updated until the next round of full dataset loading. In practice, it would be better to update neighbors or models once a new user, item, or feedback is inserted. A queue is required to achieve this goal.
Design
type Database interface {
// Enqueue put the value to the back of a named queue.
Enqueue(name, value string) error
// Dequeue remove the front value of a named queue and return this value.
// If no value in the queue, return io.EOF.
Dequeue(name string) (value string, err error)
}