Comments (5)
Hi @prateekgogia,
Yes, if a store backend supports most of the calls specified in the Store interface, it can be leveraged through libkv. For example we can think about adding a redis
driver. I'm currently working on implementing an additional driver for irmin
a git-like storage that implements most of this Store interface.
Any store that has Put
/Get
/List
/Watch
and CAS
can be used with docker by specifying --cluster-store
. A driver can still be implemented without full support for the Store interface but that does brake the abstraction and this means that you will not be able to use it seamlessly alongside consul
, etcd
or zookeeper
(you'll have to handle special cases, etc.).
We cannot point to any store though. Each store backend is supported through its own driver here in libkv (by calling their respective client library to communicate with the remote store).
from libkv.
@abronan Thanks for your reply.
What if I write a Http based store backend, and write a driver for it to be included in libkv. Now we could specify
DOCKER_OPTS="--cluster-store=httpstore://1.2.3.4:5000/...
and this backend store at 1.2.3.4 can be like a generic REST server running, which implements all the Store interface mentioned above.
Now, for each docker daemon I can specify this store and it accepts KV data over http through driver/client in libkv.
Do you think something of this sort will be accepted ?
from libkv.
Hi @abronan any comments on the request above ?
from libkv.
@prateekgogia Sorry for the long delay in the reply. The problem in using a generic approach is that we end with no consistency guarantees (whether weak or strong). Which makes the code way more complex on the application side, now I need to take care of all the edge cases where the data could be stale because I have no idea what's behind.
Of course this can be done but the goal of the abstraction is to make sure we register only the kind of store that make sense at the application level. So if we require strong consistency guarantees, we are going to register consul
, etcd
and zookeeper
together. If I don't need this guarantee I can hypothetically register a redis
or a simpleDB
driver (if those were implemented), etc.
Writing such a driver is definitely possible, but the problem lies in what's behind the REST API? What are the guarantees provided with the store, the calls supported? etc.
from libkv.
Closing this one, but feel free to jump in or open a new issue if you have any more questions or issues to report. Thanks!
from libkv.
Related Issues (20)
- do libkv support etcd v3? HOT 1
- bug in WatchTree for etcd
- Add function to list all the key-values in the boltdb store HOT 1
- add option to disable quorum for gets with etcd backend HOT 1
- Lock() of Locker interface should probably take a receive-only channel
- In etcd at least, waitLock() ignores an action HOT 1
- A race is possible in etcd's Lock() HOT 1
- Implement a Kubernetes driver
- Panic in older versions of consul
- Active again? HOT 2
- Optionally disable ZooKeeper logging
- Inconsistent reference to license for docs
- When multiple etcd stores are passed to the API. Which one is given preference? HOT 1
- can not get zookeeper path data, node cannot be discovery.
- panic in List() method with boltdb backend
- zookeeper GetW function seems has a atomic error
- possible data race in AddStore()
- implemented a etcd v3 api store HOT 1
- Travis-ci: AMD64 build is failing HOT 1
- Valkeyrie: a maintained fork created by the original author of libkv HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libkv.