What Are Microservices and Why Are They Important?


Recently, we introduced a few new Microservices on the Sapien platform. We’re excited by the potential for these services to improve the experience on Sapien.

One fundamental trade-off in blockchain technologies is between scalability and decentralization. As of right now, it is difficult to improve network scalability while maintaining a fully-decentralized network.

While certain blockchain protocols claim to bring dApp scalability, most simplify the blockchain validation process (DPoS) at the cost of decentralization. Protocols like Ethereum run multiple validators, distributing the risks and responsibilities across the entire network and minimizing the risk of a single point of failure. This insulates network integrity from individual hardware outages or manipulation, but increases the amount of time required to validate transactions.

We created several microservices to help address these challenges and preserve Sapien’s decentralization without hindering the platform’s ability to scale.

What are Microservices?

Microservices are self contained and relatively simple programs that, when combined, can be used to build highly complex applications. Our first four focus on Rewards distribution, user onboarding, and Staking, but it is very possible we will build more in the future.

Why Are Microservices Important? Scalability and Decentralization

In order to run a program on Ethereum, a programmer creates a smart contract that becomes immutable when it is deployed to the network. In order for a user to run this smart contract, the program must be executed by every miner on the blockchain, consuming gas in the process. The gas is given to the miners as transaction fees to provide incentive to mine and secure the blockchain.

This validation process is inefficient compared to the traditional model of execution, where a program is run by one central computer or a server cluster like AWS. However, in such model, a user has to trust that the centralized provider is executing programs correctly and delivering the desired result. In today’s social media environment, centralized authority can be flawed and exploitative.

With blockchain, the user does not need to trust any single entity. As long as a signed message is broadcasted to the network, the code will be executed. While it would be ideal to run every computation on the blockchain, it’s currently infeasible due to the high cost of computation. This highlights the core trade-off between decentralization and scalability in the blockchain ecosystem.

For blockchain products to scale and achieve widespread adoption, complex solutions must be implemented. Ethereum can handle roughly fifteen transactions per second. For context, Visa’s card rails handle thousands per second. Ethereum’s developers believe their platform will be able to handle millions of transactions in the future, but for now, we need immediate and tangible scaling solutions.

Fortunately, our microservices are up to the challenge. Ethereum’s scalability issue can be remedied with “layer one” solutions (direct changes to the blockchain), such as sharding, or “layer two” solutions (supplemental programs built on top of the blockchain like state channels).

Many blockchain scalability solutions rely on off-chain computation which, when completed, delivers the results back to the blockchain. Our new microservices are a form of off-chain computation that allow us to access and manipulate data from the blockchain in a scalable manner and deliver the results back to the blockchain, ensuring their validity. This innovation should help Sapien build a robust and reliable network that is auditable on the blockchain while ensuring a high quality user experience.

In regards to upcoming enhancements/features of the Sapien platform, there is a project plan and timeline; however, as with any project plan timelines can and do change, and planned enhancements/features may be altered, changed, and/or not be developed. Also, there may be a shift in direction, strategy and/or user/community requests for different features which may require a shift in planned development and timeline. Currently, development and releases are scheduled, but this is subject to change and is not to be relied upon. The Sapien team will provide updates to this schedule, so platform users will remain informed in a timely manner.