blockstack
  • About Stacks
  • Developers
  • Apps
  • Community
No Result
View All Result
stacks
No Result
View All Result
Home Stacks Technical

Introducing Radiks

Radiks is a framework for building complex and collaborative decentralized applications using Blockstack

by Hank Stoever
February 7, 2019
Introducing Radiks

This post was originally published on lettermesh.com.

Radiks is a framework for building complex and collaborative decentralized applications, using Blockstack infrastructure under the hood. It’s built to solve a few of the main problems I’ve found while building dapps on both Ethereum and Blockstack. It tries to solve the three main pain points that I think all dapps eventually run into: the ‘aggregation’, ‘modeling’, and ‘collaboration’ problems. Many dapps have created custom solutions to solve these problems, but I wanted to build a framework that would provide a generalized solution. After all, I want to see more great dapps out in the world.

The ‘Aggregation’ problem.

There are a variety of solutions when it comes to storing data in a decentralized way. Blockstack apps store user data on Gaia hubs, which can be hosted by any user, which allows them to store their data wherever they want. This provides a level of data ownership that is unmatched by other networks.

The hard part comes when you’re building an application that needs to aggregate and query data that is stored on Gaia. The fact that any user can use their own Gaia hub means that your application’s data can live on a bunch of different servers, so there is no way to filter or aggregate data across different users. Most decentralized applications end up building an ‘indexer’, which keeps track of decentralized data using a centralized database.

Radiks-server is a server-side library that you can drop into your application or deploy on its own. It provides APIs for saving, updating, validating, and querying data that is stored in Gaia. It keeps track of everything in a centralized database, but it’s built to make sure that the data in Gaia is the central source of truth. It has built in support for validating all writes, using signatures, so that you can verify that all data was actually signed by a specific user, and not tampered with.

The ‘modeling’ problem.

Gaia hubs are a simple key-value store. This makes them quite powerful, because the design allows Gaia hubs to remain stateless, and you can store anything from JSON to multimedia on a Gaia hub. Most Blockstack apps represent their app’s data with JSON files, and they roll their own solution for saving, fetching, and update their app state through JSON. Privacy-focused apps also need to take care of encrypting and decrypting data as it flows through their app.

Radiks provides a familiar API for creating models to represent your data. It looks and acts like ORMs you’re probably familiar with, like Mongoose or ActiveRecord. You can define schemas, methods, and relationships, and then easily query and filter models as you’d like.

Radiks is built to support privacy, while still being able to leverage the indexer when fetching data. You can define encryption support on a per-field basis, so that sensitive fields are encrypted, but indexable fields, which contain no sensitive information, are not encrypted. For example, consider a “todo” app. It has multiple projects, and each project has a bunch of tasks. The ‘Task’ model might have three fields – “title”, “projectId”, and “completed”. You’d want to encrypt the “title” field, because that’s private information. You don’t need to encrypt the “projectId”, and maybe not even the “completed” field, because they don’t provide very sensitive data on their own. By not encrypting it, you can query the indexer for all tasks that are incomplete in a specific project. This gives your app a big performance boost, because otherwise you’d have to keep everything in memory, and do your filtering in an unoptimized environment.

The ‘collaboration’ problem.

One of the most complex issues I’ve run into with decentralized apps is support for collaboration in a private, decentralized way. There are a bunch of tough problems with trying to support collaboration. When you have a bunch of users collaborating on private data, you need to keep track of a shared encryption key that everyone in the group has access to. You need to provide ways for users to invite and discover their collaborators. You need to rotate keys when a collaborator is removed from the group.

In centralized apps, this functionality is rather standard and easy to support. Doing it in a decentralized way, with maximum support for privacy, is much harder. Radiks takes care of all of this for you, so that you can write collaboration logic using friendly APIs.

Because collaborative apps often have the highest need for privacy, Radiks is built so that, if you’re not in a collaborative group, you have no knowledge of who is in the group. I think this is a big requirement, and further complicates things, but it’s worth it. For example, a privacy-focused decentralized messaging app should not disclose who is talking to whom, even if the message contents are encrypted. Radiks provides this guarantee.

I hope this post helps outline some of the reasons for why I built Radiks, and how it may be interesting to you. If you want to start digging in, here are some good resources:

  • Github repo for radiks and radiks-server.
  • LetterMesh, a blogging platform, which is the first app built on Radiks. It’s also on github.
  • Blockstack, a network for building apps with decentralized identity and storage. Radiks is built on top of Blockstack.

At the time of writing, Radiks is still in early stages. Please reach out or open a Github issue if you have any questions, comments, or concerns. I’d love to help you out if you’re thinking about building an app with Radiks.


This article was written in Graphite Docs, a private and decentralized document management application. View this document in Graphite. 

Tags: aggregationcollaborationmodelingradiks
Previous Post

New Dapps: February 6th, 2019

Next Post

Virtual Workshop: Zero-to-Dapp

Hank Stoever

Hank Stoever

Hank is an engineer at Blockstack, working on developer tools and consumer-facing products. He previously worked as an engineer for a variety of startups, including as lead developer for Startup Digest.

Next Post
Virtual Workshop: Zero-to-Dapp

Virtual Workshop: Zero-to-Dapp

Recent Posts

Stacks Cryptocurrency No Longer Treated as a US Security by Blockstack PBC

January 21, 2021

See the Stacks.co Blog for latest Stacks Ecosystem Updates!

January 11, 2021

Hiro: Dedicated To The Builders of A Better Internet on Bitcoin

December 22, 2020

Categories

---
  • App Mining (17)
  • Asia (6)
  • Blockchain (31)
  • Bounties (4)
  • Censorship (2)
  • Community (10)
  • Dapps (23)
  • Digital Rights (10)
  • Events (31)
  • Exclude (9)
  • Featured (6)
  • Funding (6)
  • Governance (6)
  • Guest Author (4)
  • Hackathon Winners (8)
  • News (7)
  • Partners (16)
  • Privacy (2)
  • Smart Contracts (14)
  • Society (13)
  • Stacks (38)
  • Stacks token (36)
  • Technical (29)

A better internet, built on Bitcoin

Learn About Stacks

Developers

Documentation

Github

Testnet

Papers

Community

Events

Discord

Blog

Forum

Shop

Kakao Talk (한국)

Ecosystem

Discover apps

Stacks Token

Stacks Wallet

Stacks Explorer

Chrome extension

Firefox extension

About

Blockstack PBC

Careers

Roadmap

Patent pledge

Terms & Privacy

Stay up to date

GitHub

Twitter

Discord

Newsletter

This blog will no longer receive new posts and will be available only as an archive. Hiro PBC plans to have a developer-focused blog at hiro.so. Readers looking for Stacks related news and announcements can go to the Stacks ecosystem blog at blog.stacks.co to find updates about the project from various entities and individuals across the decentralized ecosystem.

Hiro PBC (formerly Blockstack PBC) is not registered, licensed, or supervised as a broker-dealer or investment adviser by the Securities and Exchange Commission (SEC), the Financial Industry Regulatory Authority (FINRA), or any other financial regulatory authority or licensed to provide any financial advice or services.

Close
No Result
View All Result
  • Home
  • Home 2
  • Home 3
  • Home 4
  • Home 5
  • Sample Page

Get Started

---
  • Tutorials
  • Install browser
  • Live apps

Technology

---
  • Tutorials
  • Documentation
  • Github
  • White Papers

Community

---
  • Forum
  • Slack
  • Meetup
  • Blog
  • YouTube
  • Videos
  • Signature Fund
  • Telegram (English)
  • Telegram (中文群)

Blockstack

---
  • About
  • What is Blockstack
  • FAQ
  • Roadmap
  • Careers
  • Press
  • Swag
  • Branding
  • Privacy
  • Terms of Use
  • Disclaimers

© 2023 JNews - Premium WordPress news & magazine theme by Jegtheme.

This blog is now an archive. Find content from Hiro here and Stacks news and announcements here.