Showing how Textile’s framework can help transmit meaningful data over IPFS
Today, I wanted to share a quick demo we put together to showcase how Textile’s Threads and Schemas can be combined to deliver structured data over the decentralized web. First, here is a link to the demo, go ahead and upload your own image file to see how Textile transforms, structures, and stores your data over IPFS.
Let’s just walk through the steps of what happens.
- A developer decides to use the Textile library to store and share data on a user’s behalf.
- In their app, the developer can define any number of Threads where data will be stored and read. Threads are similar to a decentralized table, giving the app a simple way to coordinate data across devices, services, or users with permission to access the Thread.
- For each app, the developer can define the Schema of the data being stored, including formats, re-sampling, encryption, validation, and other steps and variations.
- Each time the app adds data to that Thread, the data will be transformed and stored in a predictable way for all other devices, services, and users who have access to the Thread.
With those simple steps, an app is able to create valuable data to store for users while ensuring that the data is valuable in the app and potentially for other apps. The use of content addressing makes it so data existing in multiple Threads isn’t duplicating storage or transfer costs, and means that two different applications could even build on top of each others’ Threads.
We use these steps in Textile Photos to create many distinct Threads for users to post and share photos. Each Thread uses a regular schema that basically says,
- Save the raw image
- Extract the EXIF as a JSON file
- Save a few down sampled copies of the file
- Encrypt each file before adding it to IPFS
With that, every client or future interface can enter a Thread and know how to read the data coming out of the hose. What’s even more exciting is that a developer could piggy-back off Textile Photos to build any number of services or applications to add value to a user’s photo data. All they need to do is create an interface for users to grant permissions and manage access. Take a look at a couple fun demos:
- Publish and subscribe to real-time weather data over IPFS.
- Synchronize encrypted log data across trusted devices.
- Integrate (encrypted) Textile data feeds with external tools.
Take a look at the demo and let us know what you think! You can reach out over Twitter or Slack, or pull us aside the next time you see us at a conference or event. We’re happy to provide background on the demo, and where we’re headed next. In the mean time, don’t forget to check out our GitHub repos for code and PRs that showcase our latest APIs. We try to make sure all our development happens out in the open, so you can see things as they develop.