Skip to content

Create initial Meta stores #11

@christhekeele

Description

@christhekeele

Implementing functional composition for stores would be pretty cool.

The idea is a simple as creating a store that can be initialized with references to other stores, and implementing the core operations in such a way that the apply to constituent stores in different ways.

For example, a Mnemonix.Meta.MigrationStore might be initialized with a new and old store, and:

def fetch({old, new}, key) do
  if key in old do
    value = fetch old, key
    put new, key, value
    delete old, key
    value
  else
    fetch new, key
  end
end

Additional candidates for initial implementation would be a ReplicaStore that reads from one and writes to many, with some sort of way to fail over on crash, or a PoolStore that reads from first available one and writes to many. All of these would have some hard decisions to make on handling the features sets like expiration, transactions, and supervision.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions