-
Notifications
You must be signed in to change notification settings - Fork 84
Description
It may be convenient to have a built-in or explicit abstraction for stores where the read and write paths are distinct. Currently you can have a readable store but the next level of abstractions are Stores which readable and writable. It may be convenient to have a wrapping store that delegates all reads to a read-only store and all writes to a write-only store. I'm not sure what you would call this but it could just be a wrapper for both sides which delegate on puts/gets
// a better name maybe???
class PartionedStore(readStore: Store[...], writeStore: Store[...]) {
override def get(k: K) = readStore.get(k)
override def put(kv: (k: K, v: Option[V]) = writeStore.put(kv)
// yada yada
}
Related, it may be convenient to define an explicit write/append only store for things like Stats and logs.
If this is not worth while, close this issue out.
For network service backed stores that wish to do this, they can always define interfaces for supplying two underlying clients for store operations: one configured for reading and one configured for writing.