System Architecture Newsflash

Getting a product market fit and ready for adoption is now vital for our project’s future. As such, speed of development and user experience have been prioritized.

Edited by Matthew Carano

From the community and how it is organized (or self-organized) to the way our dev team works — some parts are still centralized, or at least have the risk of becoming centralized. The path to full decentralization is the one we are creating ourselves.

Creating a blockchain based app that’s fast and responsive as a bee is hard. That’s why the Swarm City architecture consists of several layers that interoperate, to create an experience that enables a decentralized peer to peer sharing economy.

The protocol is the most important part; making sure layers can communicate by speaking the same language using the same grammatical rules. These layers are isolated so they can be changed without disabling the app.

One of these layers enables the communication between devices, the blockchain, and IPFS. Before data is stored on IPFS or the Ethereum blockchain, it needs to be available on every user’s device so it can interact with it. In the current live version, this part is played by Whisper. With the development and release of Boardwalk (June 2017) the dev team reached and pushed the limits of what you can use Whisper for today.

To create an awesome user experience, Boardwalk 2.0 will use Firebase to enable the communication layer. In the meantime our dev and lab teams keep working on optimizing the Whisper solution, and when ready, will swap out the components on this layer.

Firebase knows what’s going to be on IPFS before it’s there. But it needs to have the hash later on, so everyone can verify what is true.

IPFS stores all data — Firebase caches

There is a unique IPFS bridge constructed within Firebase, and its function is to listen to changes made to the Firebase database and storage. This bridge is a caching layer and hash index to the IPFS. All changes to Firebase will be saved to IPFS, and IPFS will generate a hash from the data, which in turn is saved back to Firebase updating the stored data with the IPFS hash.

Data is stored in the browser’s local storage via IndexedDB and Firebase database. This data is then synced to the IPFS. Firebase functions trigger updates to the Blockchain.

Public servers are used to interacting with geth, leaving the app completely infrastructure free with exception of the IPFS server.

But who will pay for it?

It’s like asking “Who will build the roads” when talking about voluntarism. A small percentage of the hashtag fee will go to making sure the infrastructure works. As we further decentralize the infrastructure by setting up a network of helper nodes (coming soon!) these fees will be distributed over a decentralized network. For now, this work is done by firebase, so they get paid from the hashtag fee. We happily hand this task over to the Biz hive lead Bernd Lapp.

The dev team and their advisors have made sure this solution does not break Swarm City’s technological decentralization principles. The ecosystem is censorship resistant because every centralized component may be swapped out with a decentralized one, now or later. And, it can operate and run in a total decentralized way by peer to peer connections and the Ethereum blockchain providing unstoppable computing power.

End of newsflash