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

storage documentation / advice #248

alidcastano opened this Issue Aug 22, 2017 · 2 comments


None yet
2 participants
Copy link

alidcastano commented Aug 22, 2017

This is semi-related to #246 about stabilizing more file operations.

With only putFile and getFile right now, how should storage be handled when 1) you need to access user specific data and 2) you need to access data for all users?

I've tried to look at other open-source Blockstack apps. Beacon seems to be in its early development or at least its changes are not public. Guild seems to be saving all the data in one file and iterating to find that of the correct user data (see here for source), but, unless I'm misunderstanding how storage works, this doesn't seem like an approach that will scale well.

I'll hack together an approach in the meantime but would prefer to know the proper way of handling storage. Thanks!


This comment has been minimized.

Copy link

shea256 commented Aug 22, 2017

@alidcastano Hey thanks for starting this issue.

Can you explain what you mean by "access user specific data"? Do you mean that you have a central server and you want the locally stored data to be relayed back to your central server? Or do you mean that you have user A's data that needs to be seen by user B?

Regarding "access data for all users", can you elaborate on your use case? For fully decentralized apps this isn't possible because there is no central server or "mothership". That said, you can always include a call where user data is copied and synced to a central server. Highly depends on what you're trying to do.

Our ideal model for applications here is that we can eliminate the need for central servers at all. So apps like marketplaces and social networks need to be rethought. Very different approach and very different way of thinking.

Would love to know what app you're building. Happy to provide further guidance.


This comment has been minimized.

Copy link

alidcastano commented Aug 22, 2017

@shea256 Thanks for the quick response.

Based on your response, I likely need to rethink my approach which is anchored on a central server way of thinking about storage.

I'm experimenting with a social note-taking app. The closest equivalent would be Quizlet.

So the basic functionality would be:

  • User A can write and access their data (e.g. notebooks and notes).
  • User B can see user A's data.

And vice-versa.

What's the recommended way of handling this via only putFile and getFile?

Related question: so when you do puFile, user A's data is first being stored with all the other users' data in a decentralized fashion, then only user A's data is synced to a central location (e.g. his or hers Dropbox account)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment