Giter Club home page Giter Club logo

Comments (5)

abronan avatar abronan commented on July 20, 2024

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.

prateekgogia avatar prateekgogia commented on July 20, 2024

@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.

prateekgogia avatar prateekgogia commented on July 20, 2024

Hi @abronan any comments on the request above ?

from libkv.

abronan avatar abronan commented on July 20, 2024

@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.

abronan avatar abronan commented on July 20, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.