Skip to content
This repository has been archived by the owner on Sep 9, 2021. It is now read-only.

feat: next level of the datastore #2

Merged
merged 11 commits into from
Mar 15, 2017
Merged

feat: next level of the datastore #2

merged 11 commits into from
Mar 15, 2017

Conversation

dignifiedquire
Copy link
Member

No description provided.

README.md Outdated

## License

MIT
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The README needs a reference to https://github.com/ipfs/go-datastore and also, list out all the methods that are not implemented, if any.

}
declare module 'pull-stream/util/tester.js' {
declare module.exports: $Exports<'pull-stream/util/tester'>;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will every module that uses flow have to generate this? Should there be a flow-pull-stream package instead?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should crate a definition and pr it to the flow-typed repo if we start using flow regularly yes, for now this is just a generated stub

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, we can do that right now. pull-stream is part of the entire npm ecosystem, someone else will find it useful and it will save us space and time for when we decide to use it in other places.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have the time right now to do it, we can create an issue for it

package.json Outdated
"description": "datastore",
"main": "index.js",
"name": "interface-datastore",
"version": "1.0.0",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's keep at 0.1.0 until we have it all merged

package.json Outdated
],
"author": "Juan Benet <juan@benet.ai> (http://juan.benet.ai/)",
"author": "Friedel Ziegelmayer <dignifiedquire@gmail.com>",
Copy link
Member

@daviddias daviddias Mar 13, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, Juan kind of created the whole thing.

Mind adding yourself as contributor?

Note, I don't think these things should be important.


export type Order<Value> = (QueryResult<Value>, Callback<QueryResult<Value>>) => void

*/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can all of this flow stuff be declared in a separate file?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd rather not, otherwise I have to change the type imports everywhere

* - `new Key('/Comedy/MontyPython/Sketch:CheeseShop')`
* - `new Key('/Comedy/MontyPython/Sketch:CheeseShop/Character:Mousebender')`
*
*/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to go into the README

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is jsdoc, will go into the generated api docs, as we do with other api docs

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I meant, the README needs to have more info about its API :)

with 'SC' being the last-to-next two characters and the 'B' at the
beginning of the CIDv1 string is the multibase prefix that is not
stored in the filename.
`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is the readme a module?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because it needs to be included in the code. it's written into the directories that use sharding

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting

Copy link
Member

@daviddias daviddias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This module still has the different implementations inside it. But you also extracted some of them, let's extract all of them, making this module as light as possible.

@dignifiedquire
Copy link
Member Author

This module still has the different implementations inside it. But you also extracted some of them, can we just start off by extracting all of them?

I extracted all backing implementations, I don't think it makes sense to put all these wrapping implementations into their own repos right now, it just makes things even more complex :(

@dignifiedquire
Copy link
Member Author

Ref: ipfs/js-ipfs#787

@daviddias
Copy link
Member

I extracted all backing implementations, I don't think it makes sense to put all these wrapping implementations into their own repos right now, it just makes things even more complex :(

Understood, that is because datastore has a lot of functionality, more than just using some storage backend. It seems that to make this clear we need

  • interface-datastore - interface definition and tests
  • js-datastore - implementation that has all of the functionalities
  • js-datastore-fs and js-datastore-level - the storage drivers that js-datastore can mount

@dignifiedquire
Copy link
Member Author

Given that datastore is not available on npm, I would suggest js-datastore-core for the implementations, as datastore-core is available.

@daviddias
Copy link
Member

@dignifiedquire go for it :)

@dignifiedquire
Copy link
Member Author

@diasdavid extraction is done

@dignifiedquire
Copy link
Member Author

@diasdavid updated readme to have more examples and api docs.

Copy link
Member

@daviddias daviddias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The README is using flow notations, need to use our standard way of presenting the different types.

Other than that. LGTM

@daviddias daviddias merged commit cf3b179 into master Mar 15, 2017
@daviddias daviddias deleted the next branch March 15, 2017 11:20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants