Multiblog / todolist tutorials question

hi all,

super new to blockstack but have been developing for a long time.
a question or two on the tutorials, perhaps this will help me understand the architecture better.
I pulled down the todolist application and loaded that on my localhost:8080; added some todos. I also have my blockstack / blockchain running on a separate machine so when I started a todolist application on my localhost:8080, it had my todos already loaded from my previous machine. this is awesome!

I did notice; however, if I went to blockstack-todos.appartisan.com (the ‘official’ todo application in the blockstack browser, and logged in with my blockstack.id, it did not have my todos. I’m assuming then, these are separate applications? How was my localhost:8080 todo app able to pick up on my todos from my other machine?

Okay.

I also ran the multiblog app tutorial, and part of the feature is to be able to read other status updates – so, as a test, I loaded in my geekluv.id (works) but I also loaded the tutorial author (http://localhost:8080/yukan.id) and that worked too.

so I guess a couple questions
How is the localhost application pulling a storing data across applications so I can access my ‘todos’ across clients and I can access other users info and where is that different from the official ‘todo’ app?

Also, if I wanted to create a ‘journal’ application, how would I prevent it from being readable like the multiblog app was readable for other users?

thanks – like I said, I’m new at this architecture.

@geekluv Some good questions!

Your data in blockstack is in storage backed by cloud storage that you point to in your Zonefile. This association happens when you register your name. You can see that (in json format) in the explorer: https://explorer.blockstack.org/name/geekluv.id

If you curl the URL, you will see a bunch of JSON that includes some apps you have signed into that use Multi-Reader storage:

"apps": {
    "http://localhost:8080": "https://gaia.blockstack.org/hub/1GYHFgWETg21RLLLNPrNyPdGaU5hitrjJG/",
    "http://publik.ykliao.com": "https://gaia.blockstack.org/hub/15khTX2Jw9j1RperDe1ZBaa3fvYPv4SWzi/"
}

We use the URL as a unique identifier for each app and generate a key for it (appKey). That key determines where your data is stored in your hub. Right now, by default, names are registered against our Gaia hub. When you switch machines your browser looks for the data as determined by the appKey and if it finds it then it is displayed (as in the case of your todos). However when you try the public todo app it has a different domain and the data isn’t there. Also it doesn’t look like the multi-reader features are available on the deployed version.

There is an option to encrypt data being written to prevent it from being public.

2 Likes