Giter Site home page Giter Site logo

PseudoKV about us HOT 8 OPEN

MeijeSibbel avatar MeijeSibbel commented on June 9, 2024 1
PseudoKV

from us.

Comments (8)

jkawamoto avatar jkawamoto commented on June 9, 2024 1

I think it'd be better to call this interface PseudoKVS instead of PseudoS3 because S3 API has more functionalities such as versioning and ACL. Using S3 sounds confusing.

from us.

lukechampine avatar lukechampine commented on June 9, 2024

To make this slightly more concrete, I was thinking along the lines of:

type PseudoS3 struct { ... }

func (PseudoS3) CreateBucket(name string) (*PseudoBucket, error)
func (PseudoS3) Bucket(name string) (*PseudoBucket, error)

type PseudoBucket struct { ... }

func (PseudoBucket) Put(key, val []byte) error
func (PseudoBucket) Get(key []byte) ([]byte, error)
func (PseudoBucket) Delete(key []byte) error
func (PseudoBucket) Sync() error

The main goal would be to aggregate Puts across the entire PseudoS3 instance, such that data is only flushed to hosts when a full sector's-worth of key-vals have been stored. However, I'm not familiar enough with S3 to flesh out a full API, and I don't have a good idea of what the local storage aspect would look like.

from us.

jkawamoto avatar jkawamoto commented on June 9, 2024

I think it also needs List function, too.

from us.

jkawamoto avatar jkawamoto commented on June 9, 2024

It also would be better if the type of val is io.Reader in both Put and Get instead of []byte. If it uses byte slices, we need to copy each object to heap, and thus we might not be able to store bigger objects.

from us.

MeijeSibbel avatar MeijeSibbel commented on June 9, 2024

PseudoKV has been integrated, moving new roadmap features to #126 for consistency.

from us.

jkawamoto avatar jkawamoto commented on June 9, 2024

I think PseudoKV isn't done yet.

There are still some missing functions:

// DeleteBlob implements MetaDB.
func (db *BoltMetaDB) DeleteBlob(key []byte) error {
return db.bdb.Update(func(tx *bolt.Tx) error {
// TODO: refcounts
return tx.Bucket(bucketBlobs).Delete(key)
})
}

func (db *BoltMetaDB) UnreferencedSectors() (map[hostdb.HostPublicKey][]crypto.Hash, error) {
return nil, nil // TODO
}

Also kv branch is not merged into master.

from us.

MeijeSibbel avatar MeijeSibbel commented on June 9, 2024

Thanks, reopened. I see this is also related to #102 correct?

from us.

jkawamoto avatar jkawamoto commented on June 9, 2024

Yes, it is. Especially, this problem #102 (comment).

from us.

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.