August 9th, 2017
Posted by pftq

Decentralized Chat Box on Blockchain

For those who miss @Poloniex's #trollbox, I put together a chat that runs entirely off blockchain over at The World Exchange.  This one will never go down.  Any message you post will be up forever, and everyone can read it as long as they have a copy of the webpage to access the blockchain.  It's like a free notarized chat service, with every statement there being indisputable proof of what was said.  If you need to make a statement and have proof of record, you could just say it there and no one could ever dispute it. Tongue

How does it work?
There is no back-end; it's entirely HTML/javascript with nothing hosted on my servers.  Everything is saved directly and only on the Ripple ledger / blockchain.  It was actually easier than I expected.  The blockchain behind any cryptocurrency is essentially a database that runs 24/7 without anyone having to maintain it.  So all you have to do is read and write to it.  Most people just read and write transactions as trades to hold money, but those transactions can also hold text.  What I essentially did was make a page that saved transactions with virtually zero money value but with whatever text you wanted to save as chat.  These would all be sent to an account we designate as the chatroom, so the chat history is essentially us reading the transaction history of that account and parsing all the text at attached to each transaction, who sent the transaction as the poster, what time, etc.  You can do this with most any existing cryptocurrency, even though some developers seem to think you need a newly designed blockchain specifically for data storage.

The big idea is you can do any sort of site or data entry you'd normally need a database for, but now that database is public via blockchain with 100% uptime and zero maintenance.  You could generalize from this to store any sort of data on the network - blogs, news articles, audit records, archives, proof of identity, entire websites, etc.  Heck, you could rebuild Twitter and Facebook entirely on the blockchain, so no one actually controls the data or server anymore.  It would basically eliminate their business model because no one actually needs to go to Twitter or Facebook to see the content (anyone can just put together an HTML page or software to post/view the content directly without Twitter or Facebook's permission, as it's 100% public).  Even Wikipedia can become fully free + non-profit and no longer need to pay for servers by just uploading all their content and user-admin onto this public database.  In addition, that's a way to make sure its information truly remains online forever and public for anyone to access.
1108 unique view(s)


Ricardo says...

Hi Pftq,

I have visited your website here and really got curious as to how one could get started in building a simple website using Ripple blockchain as you mentioned on the link above.

I have an intermediate background in web development and I'd appreciate it a lot if you could show me how to get started. Thanks very much and hoping for your assistance. Have a good day!

pftq says...

The chat box in the example is open-source and can be downloaded from Github.  You'd need to be familiar with Javascript, as that is what the Ripple API is coded in.

Leave a Comment

Name: (Have an account? Login or Register)
Email: (Won't be published)
Website: (Optional)
Enter the code from image: