lateefj / shylock

Better Distributed System Interfaces With Quality Of Service
BSD 2-Clause "Simplified" License
1 stars 1 forks source link

Fuse & Docker Interface for Message Queue & Key Value Store #31

Open lateefj opened 7 years ago

lateefj commented 7 years ago

The current POC uses fuse only. Docker has a volume plugin system. This boils down to implementing the Driver interface. For a message queue this translates into something closer to:

type MQ interface {
  Mount(config map[string]string) error
  Unmount() error
  List(path string) ([]string, error)
  Open() error
  Get() (header, body []byte, error)
  Put(header, body []byte) error
}

type KV interface {
  Mount(config map[string]string) error
  Unmount() error
  List(path string) ([]string, error)
  Get(path string) ([]byte, error)
  Put(path string, body []byte) error
}

As well there needs to be a Register function ex:

type FS interface {
  RegisterMQ(mountPoint, type, description string, config map[string]string, imp MQ) 
  RegisterKV(mountPoint, type, description string, config map[string]string, imp KV) 
}
lateefj commented 7 years ago

Vaultfs supports both fuse and docker volume: https://github.com/asteris-llc/vaultfs