How does a decentralized app get data from other user? e.g. the speech of others in a forum, I mean, a user is just supposed to see his own speech in a forum?

If user owns his own data, how can blockstack produce an app like Twitter?
I mean, the user could just store his own data, but if he wants to see others’ Twitter content, he may have to view others’ data, which is prohibitively forbidden by the rules of decentralization.

Have you checked out any of the tutorials by chance? I can’t remember which one it was, but there’s a rather helpful one where they explain that during the login process the user is giving rights for the app to read/write to their files. At any point the user could revoke this right and remove the data, while still maintaining control of it. The Dapp developer wouldn’t have access to it at this point because they aren’t hosting it themselves.

2 Likes

Thank you for your reply.
But I’m not talking about viewing my own data like the twitter I sent using my own account;
but rather, I am talking about viewing someone else’ twitter content, e.g. I want to view what Trump is saying using his own account. Trump of course owns his own data, but Twitter exists because it makes Trump’s speech public to everyone.

Blockstack gives apps a way to publish data readable for everyone. The data still belong to that user, but everyone can read them (as they are linked from your profile).

You can see an example of this at https://core.blockstack.org/v1/users/pbj.

[...]
    "apps": {
[...]
        "http://publik.ykliao.com": "https://gaia.blockstack.org/hub/144CbTgrNp3DwMNSnnxBbYHzWN1ycQDsuT/", 
        "http://www.stealthy.im": "https://gaia.blockstack.org/hub/1MWJT2TyLW69ePzM4aGuqJA8CRyNEmfQJP/", 
        "http://www.stealthy.im.s3-website-us-west-2.amazonaws.com": "https://gaia.blockstack.org/hub/1NkjvgLmBAJMn6L1htQEhw3Vsoy4qzpVZF/", 
        "http://www.test.stealthy.im": "https://gaia.blockstack.org/hub/1FQvdoTbfrKDoAZZ9CkCyfiskTpMUKWrWZ/", 
        "https://app.graphitedocs.com": "https://gaia.blockstack.org/hub/1P1ppDzxWzkEcUbFv4dHjjNjVaGCit831j/", 
[...]
      }
[...]

You can then retrieve files from these Gaia Hub URLs (if you know the file path).

3 Likes

thank you, that explaines how things work

Sorry to jump on an old thread, but I’ve only started looking at blockstack today.

Thinking about a Twitter app as an example, the biggest hurdle I think would be getting a list of users to follow. Is there a way to pull a list of all users that have signed up for an app or would the app need to centralise the user list?

Also, I can’t view the files linked above as they no longer exist, but are all files publicly viewable hence the ability to encrypt them if you want to make it private?

all the accounts exist in the blockchain, so you can easily get all the users using the dapp resolving the information on the chain. The dapp runs locally, you can put all the resolving logic locally or you can set up your own server resolving information on chain for you, still the server runs within the trust zone of yours.

As far as I know, gaia hub can make use of private s3 bucket, so the s3 storage service itself can provide the access control, the ability to encrypt is just to keep your data private from the cloud service provider.

1 Like

I built a search index for my auction platform. It starts with blockstack names and looks through the apps field of the users profile to match an app domain. The ‘searchable’ app data stored in users gaia buckets is then pulled and added to the index. So it fits your use case which is the similar to mine - i.e. search and discoverability of the other users artworks/auctions/blog posts etc.

I’ve open sourced this code (java spring microservice) and have been meaning to share with the community as its possible for any app dev team to clone/run this index or use it in shared hosting manner.

Details in my github: brightblock search

Hope this helps and welcome any feedback…

2 Likes

@mikecohen.id I was just looking for this. I think it might prove very useful for devs building something like a dating app where the users don’t have a connection yet.

Hi @yannisdc great - I see it as a potential collaboration. We are using this search service in our auction platform and its proven stable so far - albeit indexing small amounts of data.

If it were possible to standardise search index records between dapps then this would be a very cost effective solution for new dapps to get up and running with a lucene index and to replicate a stateless index across different regions etc.

I was also thinking if with some more work it could enable users to remove their own data from the index which would be great if it could be achieved.

Let me know if you need any help / explanation.

Would indeed be cool to create something like this (let’s call it Hometown).

Where a user’s location can be store and the location access to other apps can be managed.

I know the thread is old, but I dont want to ask the same question again. Unfortunately I dont know Java and therefore cannot make sense of the code mikecohen linked. Is my assumption correct, that when I want all users public/shared data for my dapp I would have to search through all blockstack users profiles and check if they have data for my dapp (hence they logged in to it once)? Or ist their some specific API to do this? I looked at the official docs but could not find something regarding this topic… The official blog dapp example also does not implement such a feed, if I understand correctly.

Any help, or just a guidance in the right direction would be much appreciated!

Cheers

Hi @ole our indexer is implemented in java but you don’t need java skills to use it - it has a simple rest api for search and indexing. It works by taking your app domain and then finding users who have entries in the ‘apps’ field of their profile. It then pulls their public indexable records and indexes them. You can build the index from scratch at any time but you can also index, re-index and remove records from the index on a per record basis.

It can be run by either sharing (co-hosted) my environment or run and deploy your own instance as a docker container. I’m using it in dbid.io for full text and just released faceted search over our taxonomy.

As things stand it requires a small upfront effort to setup the config and plugin in an indexer for your schema - as I said I’d hope we will eventually create shared/common schemas for this sort of thing - as is happening with development of collections etc. Am happy to help if you want to try it.

The only other solution I know of here is Radiks which you can talk to @hank about.

1 Like

I could get this running pretty quick - couple of days say to create an api call like…

/getNames?domain=d

to find everyone who has logged in to your d-app or vice versa.

Thank you very much for the quick reply! exactly what I needed :blush:. I will try your service and eventually try to spin up the container. Also radiks looks really interesting, thanks for the hint :+1:

1 Like