Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data Store Implementation #111

Closed
wants to merge 6 commits into from
Closed

Conversation

SidHarder
Copy link
Member

No description provided.

@SidHarder SidHarder added the status/in-progress In progress label Dec 22, 2016
@SidHarder
Copy link
Member Author

SidHarder commented Dec 22, 2016

@diasdavid Does it make sense that I will need to create a js-level-pull-blob-store which implements interface-pull-blob-store? I see that js-idb-pull-blob-store already exists.

@daviddias
Copy link
Member

will need to create a js-level-pull-blob-store

Yes, it does. Here is the non pull version https://github.com/diasdavid/level-blob-store :)

@daviddias
Copy link
Member

@SidHarder I'm not sure if I dreamed, but I was pretty confident that I got an email from you asking a bunch of stuff and I just can't find it right now, could you confirm? Apologies to keep you in the way (if it was indeed not a dream)

@SidHarder
Copy link
Member Author

@diasdavid I haven't been able to spend much time in the last couple of weeks but I am back to work on this project now. I would be happy to help with other items if you need some help getting the current sprint completed.

@SidHarder
Copy link
Member Author

@diasdavid David I am stuck in the mud on this one. Would you have a few minutes to talk this week?

@dignifiedquire
Copy link
Member

@SidHarder I should be able to find some time to chat about this tomorrow. Not sure how available @diasdavid is this week

@kumavis
Copy link

kumavis commented Feb 14, 2017

@diasdavid whats datastore as opposed to blockstore ?

@SidHarder
Copy link
Member Author

SidHarder commented Feb 14, 2017 via email

@daviddias
Copy link
Member

@SidHarder so sorry for this delay, I've been flying all over the world and super heads down with the tasks at hand, didn't get to see this thread until now.

what's the difference between datastore vs blockstore

This is an excellent question that caused a lot of confusion to myself initially too.

datastore is a really old project that @jbenet started to create a unified DB interface for multiple storage engines: https://github.com/datastore/datastore. circa 2013. It is essentially a combination of LevelDB + blob-store, although blob-store was started way after, so in reality is a reduced datastore

In IPFS land, we have two folders where we store most of the data:

  • blockstore
  • datastore

Initially, every block was stored in datastore, which in go-ipfs uses the datastore interface in conjunction with a LevelDB driver. However, LevelDB proved to be inefficient and so a decision was made to create blockstore to store just the blocks, keeping datastore to store DHT records, pinset root hashes, mfs root hashes and so on. blockstore is implemented using a datastore interface, but with a fs driver.

Time passes and the js-ipfs development kicks off, since in the beginning we just needed blockstore to work and since we could reuse all of the work done by blob-store and its ecosystems of adapters, the decision was to 'go ahead and use blob-stores to implement datastore'. Today we departed from that ecosystem and created our own that uses pull-streams interface-pull-blob-store.

However, this is not enough and to move forward, we really need to implement the remaining API calls that datastore interface offers, and so, the #112 endeavor is born.

Lesson of the story: Naming things is hard, but it is even harder if you give the same name to everything

@daviddias daviddias added status/ready Ready to be worked and removed status/in-progress In progress labels Mar 13, 2017
@daviddias
Copy link
Member

The comment above should be captured for the README as documentation for the future.

As for the PR, @dignifiedquire pushed an entire refactor of the module that includes datastore here: #123

@SidHarder I'm sorry that you spent so much time on this PR. It was valuable to us to understand how pressing it was and to have the discussion to actually make up our minds in our we were going to fully achieve this. Thank you.

@daviddias daviddias mentioned this pull request Mar 17, 2017
9 tasks
@daviddias
Copy link
Member

Closing in favour of #123

@daviddias daviddias closed this Mar 21, 2017
@daviddias daviddias deleted the datastore-implementation branch March 21, 2017 06:12
@daviddias daviddias removed the status/ready Ready to be worked label Mar 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants