Attendees
- Arron Schaar
- @aaron
- @jackzampolin
- @daniel
- @jay_hwang
- @patrick
- @ryan
- @muneeb
- @jude
- @jeremyrwelch
- Scott
- Logan
- @vsund
Review of single reader storage
The app specific key is used to sign all the data that you write.
Datastore record includes:
- drivers to use
- public key
- root directory
The signature is used so that you know the data you read was put by you.
Each logical file is stored as a separate header file and a payload file.
There are two separate files so that the payload can returned as an http url and used directly by browser and apps.
Problems
Key Discovery
To read other people’s data I need to know the public key of the person-device that wrote.
Speed/Consistency (Write performance)
Write performance is slow because we need to write 4 files for each file: A header and payload for the file and then a header and payload for the directory. If any of these fails, you end up in and inconsistent state.
Solutions
Key Discovery
Publish a key file that includes:
- profile
- a delegation object of public keys of all of your devices
- app keys
Resolution path: Name -> Zone File -> Key File -> Delegate object -> App keys
There’s a secure method to solve the key discovery
Speed/Consistency (Write performance)
This is more complicated to solve.
Questions?
What is the minimum underlying consistency model we can assume?
We’re trying to avoid a world where everyone has to have their own server.
Proposed solution
Each device maintains a write log, that is logically a history of what it does. Each entry is a put or delete.
What happens globally is a global log in your storage provider.
Eventually, there is one writer. At any time there can be more than one writer, but eventually only one will succeed.
Optimistic concurrency resolution.
We can take the last write wins, but the local logs can see that maybe one of the other devices won.
- Writes are now synchronously fast.
- Asynchronously append to the global log.
- Enables search by regex (aka “a poor man’s directory”)
Also enables use of Bittorrent and IPFS.
Mobile:
Core node (or a lighter Storage node) sitting in the cloud that’s receiving writes from the mobile device.
Where do reads come from
- Your file goes to the storage provider
- Append to local
- In background, your device will try to append it to global log
I do a write
A write returns the URL to the file it just wrote.
With collections, given a Blockstack name and a type of collection, you’ll be able to logically construct a URL without a Blockstack Core node.
You sign and encrypt data locally, but you’re trusting the remote node to write your data for you.
These storage nodes have to be multi-user and you could belong to multiple user nodes.
Action items
- Iron out iOS authenication
Future discussion:
- AWS key distribution service
- Core node that runs in the cloud