Git Product home page Git Product logo

chainstore's People

Contributors

hedayet avatar l3pp4rd avatar montanaflynn avatar ryanfowler avatar vojtechvitek avatar xiam avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

chainstore's Issues

Chain: Underlying Store fails on PUT - what to do?

Let's say I have 3 stores: Memstore, BoltDB (async) and s3 (async).

given chain.Put(ctx, key, data)

  • Memstore succeeds
  • BoltDB fails
  • s3 succeeds

What should we do? Should we automatically re-try storing the value into the BoltDB again? What if the DB is down for a bit? Should we have a retry queue per Store?

Or since we have LRU, should we have something like PUT down ON DELETE functionality on chain?

Is travis working?

The repo has a .travis.yml file but it seems like it's not working. Maybe we can create a main test using boltdb and mockstore, just like the example, except without s3 and update this travis file to run it.

LRU manager by number of key (as opposed to current sum of values)

Should be able to support both.. current interface is: New(capacity int64, *anotherStore chainstore.Store) .. maybe we should make it New("500MB", store) or New("500 items", store) .. using a simple string?

or multiple .New() methods would do it as well.. .NewValueCapacity() and default .New() is to manage capacity by number of keys

undefined: cancel error

I think PR #22 broke the build and now chainstore can't be installed.

go get -u github.com/pressly/chainstore
# github.com/pressly/chainstore
../../pressly/chainstore/timeout.go:25:7: undefined: cancel
../../pressly/chainstore/timeout.go:26:8: undefined: cancel
../../pressly/chainstore/timeout.go:31:7: undefined: cancel
../../pressly/chainstore/timeout.go:32:8: undefined: cancel
../../pressly/chainstore/timeout.go:37:7: undefined: cancel
../../pressly/chainstore/timeout.go:38:8: undefined: cancel

Config structure

I really like this Idea from the TODO section, and think it's pretty important.

So I wanted to get the ball rolling and open up discussion as to how it might be implemented.

Refactor chainstore to be based on context.Context

Each chainstore action should be based on a context.Context request context. The benefit here is a request chain can be cancelled with a timeout or cancel function. I've found in imgry that this can be useful in case some requests take to long to complete and instead the goroutine never finishes.

It will make for a much more robust store.

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.