Steem + Steemit: full decentralization problem

in #steemdev7 years ago

Steem is a blockchain-based social media platform where anyone can earn rewards.

This is the definition on Steem as expressed in the homepage of steemit.com.
It uses two very imporant concepts that are quite popular nowadays: blockchain and social media.
The idea is to bring these two concepts together to make people able to create quality content (essentially posts) and be able to earn (via a virtual currency: Steem).
The Steem account's owners don't need to understand anything about what a blockchain is and how it works. They just go to steemit (or other frontends) to make posts, read other people's blogs, and earn both with author rewards and curation rewards.




As most of you know, Steem and Steemit are two different things! The first is the actual blockchain, the other is just a front end that makes the data on the blockchain easy to access


The most important reason why everthing is build on top of a blockchain is to be able to not have a centralized entity that owns the data produced by the users.
This is the main difference with Facebook or Twitter for instace.

However, in my opinion, the users are not helped in taking full advantage of the decentralization of Steem.
I will try to explain what I mean and how I plan to provide a solution, not only theoretically but also with the implementation of my idea that I'm already working on.

Similarities with Bitcoin

Bitcoin mantains a list of transactions, verified by network nodes, recorded in a public distributed ledger called a blockchain. Steem does the same, but not only it records the transactions of user's money, it also records the other operations the user's can do on the blockchain, such as changing profile informations, creating posts or comments, upvote/downvote other people's posts, and many more.

In summary, Bitcoin and Steem are blockchain that mantain the dynamic data of the networks in a secure and decentralized way, so that the data exists and are valid even if one or more of the nodes are attacked or shut down.
There is no need of trusting an external entity, as long as the majority of the blockchain nodes agree with the rules of the blockchain.

How do you use Bitcoin?

People use bitcoins via wallets, software that allowes them to create and sign transactions that moves money from one user to another user.
This is where some of the pure blockchain ideals start to fade away.
Most users don't connect directly to the blockchain to manage their wallet. They use third-party services, mostly websites, that have many benefits such as browser connection with an account (username and password, with sometimes other security options such as 2FA) and a beautiful interface.
Some example of servicies that provide this service are blockchain.info or coinbase.com.

The problem with this approach is that you loose the trustless nature of the blockchain, since you have to trust the service not to steal your money and hope that the service is not one day shut down by hackers or governments.

Of course, users that have too many bitcoins and don't want to risk, can and should use cold wallet, download a Bitcoin node on their computer (server GBs of data, that encreases every day and needs to constantly be synced with the network) and use that node to broadcast their transactions.

This is too complex for normal users.
Something in the middle exists, for instance Electrum.
Electrum allows you to manage your wallets on your computer (without giving your private keys to anyone) and connects to nodes to check your balance and transfer bitcoin with others.

How do you use Steem?

People can use Steem directly via a wallet (to send money from user to user) and they can use the Steem API to post, comment, upvote, and many other operation. This is of course the safest way of interacting with Steem. You create a Steem node on your computer, it syncs with the network, you interact with it, you create posts in some Markdown editor, you copy the text and build a request for the Steem API to broadcast your intent, and the posts is created, ...
Well, I think nobody (except bots) use Steem this way

This is too complex and boring. User's wants a nice interface, where they can explore and add content to the blockchain without even noticing it's a blockchain.

That's why people use steemit.com and other front-end websites (busy.org, ...).
You are trusting steemit, busy.org, ... not to steal your private keys and not to be attacked by hackers that infiltrate their malitious code in their servers.
And you need to hope that when you want to visit and interact with the blockchain, the website you use is not down!

You are loosing the most beautiful thing about a blockchain. Being able to use it always, even if people don't want you to, like hackers or governements, or if a company like Steemit Inc. goes bankrupt and closes (let's hope not)

Fortunatelly, many websites exist that allow you to access the Steem blockchain easily, so if at least one of them is not down, you can just switch to another website or download another app and you are in (always after you decide to trust that website or app!)

Unfortunatelly, a solution like Electrum doesn't exist for Steem. A solution where you have a beautiful interface, that runs completelly on your computer without the need of an external service at all, and relies only on nodes (maybe from some witness that provides that to you for free) to get and send data to the blockchain. Your private keys are not stored in any server, and don't even exit your computer, so you don't have to trust anyone!

Creating a server-less Steem front-end application

As many of you may know, steemit.com is opensource, and the code is released with the name condenser on github: https://github.com/steemit/condenser
If you start looking at the code, you will notice that it is essentially a node js/express server with a react frontend. There are other two main components, tarantool (optional) and mysql that is needed for some functionalities.
All the queries to the Steem blockchain are done with the steem-js library (also open source), both server- and client-side.
If we could remove the database requirements, the application could run on anyone's computer without any configuration required... Therefore:

First step: remove mysql requirement and allows the server to run without it!
I tried, and after commenting a few line of code here and there in the condenser code, I'm today running my own condenser server on my computer and browsing steem with it!

Of course, not everyone wants/can/is able to do this. Some compact and easy solution needs to be found. After packing up the code of the server and create and executable that can run on the user's computer just by double-clicking it, it would be nice to also integrate a browser that loads the condenser local server and make it seems like a normal native app.

Next steps:

  • Make the server's code embeddable in an application.
    Electron can run the code directly, probably after a few changes on the code.
  • Build a UI that just load the local server web page and shows the same interface of steemit.com
    This is easily achievable on desktop thanks to Electron!

On mobile, this would be a bit more hard to do, since one will need to either include node into the application, or rewrite the server side in C, Java or other languages that can be used in iOS and Android.

If you are following me from some times now, you know that I developed a browser extension "Steemit More Info" and I'm working on a mobile app "SteemApp".
This project that I just started will also include the features provided in "Steemit More Info" and will probably (when ready) replace the mobile app and be released also as a desktop application.

Follow me for more info and update!

Thanks
Armando
🐾

Sort:  

Nice post and as a plus it would alleviate a lot of the frustration people have been having over the last couple of days with Steemit being very slow or unavailable. Probably even a modest number of people switching to their own local Steemit app would make a big difference to the load on the "public utility" Steemit.

I notice that condenser has a Dockerfile and Vagrant - I'm guessing the node image that is based on needs MySQL to be present externally. Using docker-compose could easily fix this although I admit deploying Docker Compose apps is far from turnkey for most users, only developers.

It would be so nice if docker (now available easily on MacOS and Windows) could be the basis of distributing apps, at least under some layer that makes that feasible. Alternatively it is becoming increasingly easy to run Android apps on the desktop via Chrome or other Google magic. If there was a really great Steemit app (not just an HTML based app with a wrapper) that ran on Android we could reduce the problem to "how do we make it easy to run Android everywhere". Except of course iPhone users would lose out there.

My hope is that one day companies like Google, Amazon and Microsoft will give everyone the ability to deploy reasonably sized apps "to the cloud" for free and access them - decentralized apps like Steem make that feasible. That solves the problem for people without a desktop or laptop, and who's phone is a closed system or otherwise limited in capabilities.

Google already has a completely free teir for their compute platform, Amazon has a time limited free tier (not sure about Azure) - how long can it be before as well as gigs of free data storage we get Ghz of free compute capability?

In the meantime much kudos to you for actually jumping in an trying to make Condenser desktop friendly pretty much as is. :clapping:

After reading this i know a bit more on steem ways aroundbut im still a normal user only that uses the apps only.
Nice info too.

Super good explanations about how this works!
If you dont mind I would like to us some quotes and link to this page for a Dutch blog site, if you are okay with that?

this is an amazing idea, oh @armandocat I notice "Steemit More Info" seems to only show 7 day and older mentions any reason why I cant get it to show or reload with more recent mentions?

thanks. absolutely great article. the different between blockchain and the application

Armando, I am new to Steem and Steemit and just learning about the program. Your article has helped me understand a bit more about how the whole process works and some of the good and bad. This is my first post ever on Steem and just wanted you to know how much I appreciate this type of information. Thank you!

Does steemit use ipfs?

Being able to browse Steem(it) locally would be huge for the people who want that capability. I was actually thinking the other day that it would be cool if someone built an Electron app for Steemit. I'm not skilled enough yet to do it, so I'll just stay tuned for yours for now.

Thanks for your topic
I have benefited a lot

Since it's JS based, I thought about making a Chrome web app, but they sadly won't be supported anymore :/

But extensions can have their own browser pages... maybe that could be an option.

Coin Marketplace

STEEM 0.19
TRX 0.18
JST 0.033
BTC 87739.92
ETH 3095.67
USDT 1.00
SBD 2.77