Serverless Enterprise Blockchain

Adarsh Naidu
Nov 25, 2018 · 8 min read
Enterprise Blockchain

There are many technical challenges with enterprise blockchain implementation. Whether is it writing and installing chaincode, managing and scaling the network, or cyber security, Question is whether infrastructure challenges can be solved from going to serverless technologies as all Blockchain platform depends heavily on containers based deployments.

The article below details each of these technical issues and provides a possible solution.

3 factor plays an important role in blockchain adoptions once we have finalized the process , i.e.-:

1. Network Scalability and Management

2. Ease of Deployment

3. Cost

Network Scalability and Management

Ask any blockchain architect the main challenge in blockchain projects will be network scalability. In a real world enterprise, blockchains will be managed by a governing body of a consortium or a larger organization in the ecosystem. When number of nodes increase, managing the nodes (i.e. scaling nodes) based on demand and supply is a mammoth challenge.

Imagine a scenario where there are 3 organizations in a network Org A, Org B and Org C.

A uses Amazon AWS
B uses Google cloud
C uses a Private Network

A uses 5 Nodes, B uses 2 nodes and C uses 1 node. Clearly A is big company in network , so number of transaction per node of A is much more than B and C. A is the biggest player in the consortium or network and in many cases will be guiding the Governance model in network. The challenge for an administrator in OrgA will be when the amount of nodes increases or decreases. OrgA also needs to guide the entire network with scaling solutions ,Certificates validations , Authorization and Authentication etc. Needless to say , Application crash because of resource unavailability will be the top priority in the network as network is running 24/7 365 days a year and is beyond the control of single organization.

What if nodes auto scaled based on number of transactions? What if you just need to pay for the number of smart contracts your organization is executing, instead of paying a per node cost?

Ease of Deployment

Ease of deployment is a critical consideration for companies evaluating a blockchain initiative. Currently, very few commercial blockchain solutions have been deployed and even fewer are producing at a meaningful scale. Deployment and maintenance is a cumbersome task for enterprise blockchain.

Cost

Although there are many benefits to blockchain, the cost can be prohibitively expensive, even if you are using a simple smart contract you still need to pay for the installation and maintenance across nodes.

Is there a solution? Yes.

Serverless Technology

· Lighter to run

· Pay only for what you use

· Quicker to scale

· Only use what you need

When planning to implement blockchain infrastructure, we need to know below answers:

1. How many servers/Nodes do I need?

2. How can I scale my servers/Nodes?

3. How can I increase server/Nodes utilization?

4. What is the right size of my server/Nodes for my business needs

To clarify, “serverless” doesn’t stand for “no servers” but that server configurations and scaling clients don’t need to worry about hosting their own server as a cloud provider will be taking care of it. In traditional cloud computing, enterprises pay fixed prices for running application on virtual servers, irrespective of whether the cloud services are being used. However, with serverless computing, enterprises will need to pay only for service usage with no charge for idle time. They would only pay for the functions they use.

Going serverless means networks will be replaced by API’s, Computing/logic will be replaced by FaaS(Function as a Service) and databases will be replaced by BaaS(Backend as a service).

Below are the advantages of serverless technology.

· No Severs to provision or manage

· Scales with usage

· Never pay when Ideal

· High availability

· Disaster recovery

· event-driven

· Less-Ops

Comparison of various server management technology

Blockchain can leverage serverless technology to avoid network hassle in terms of peer provisioning and scaling. There are multiple scenarios in which blockchain can leverage serverless technologies. Below, I will explain each one in detail.

Scenario 1-: Public blockchains like Bitcoin and Ethereum want to utilize serverless technology

Blockchain and serverless technology are very different. As blockchain works on Processing the same transaction on a concurrent basis, serverless works best when processing in single time. Blockchain is stateful and serverless is stateless, blockchain is trustless and serverless is trustworthy. Do these differences mean blockchain can’t use serverless technology?

No. Blockchain is able to use serverless technology, not for committing data onchain but for sidechains or offchain transaction processing. In serverless, any data that is supporting a transaction will need to be digitally preserved and linked as part of the transaction. An example of this is the physical paper contract whose execution is recorder on the blockchain, services are already being developed to perform this capability within several public blockchains.

OffChain/Side chain processing is not verified by nodes and therefore based on trust. Whereas onchain data gets added to the blockchain with trustless transactions verified by miners running complex algorithms.

For Example : A voting application that uses blockchain to verify eligibility of voters can access blockchain records for confirmation. Aside from registering a vote, the rest of its processing does not need to happen within a blockchain platform.

Scenario 2: Permissioned blockchain wants to utilize serverless technology

In this scenario, all parties have some level of trust making expanding the use cases for serverless tech. In this scenario we can create an event driven permissioned blockchain application, the perfect use case for serverless technology.

Nodes need to be created for transaction submission in a blockchain network, this can be managed by creating a cloud like traditional approach. This will ideally will work in a hybrid mode where serving data to the web interface will use a Serverless API and blockchain transactions will be residing in a high availability server with load balancing and auto scaling groups configured.

There are few companies who use a fully functional serverless blockchain, companies like Mainfold and Dragonchain. Mainfold uses AWS cloud to host using AWS Lambda serverless technology which gives 10,000 tps in comparison with Ethereum 25tps and Bitcoin 7 tps.

Dragonchain uses hybrid private/public blockchain platform that features easy integration, fixed 5-second blocks, currency agnosticism and multi-language smart contract interactivity. Dragonchain’s hybrid blockchain functions through a serverless architecture where smart contracts are executed in a traditional model and on a trusted node. This architecture enables nodes to handle the approval of transactions based upon five levels of network consensus, providing a flexible spectrum of trust to data consumers

For mainstream adoption to occur, the serverless path must be taken. However, there are a few concerns that must be addressed.

Public cloud

Running any service from a public cloud — including FaaS — leaves you at the whimsy of the vendor

Vendor lock-in

Vendor lock-in, data sovereignty, cost, support, documentation, and company viability are all issues to think about

Tooling and support

Serverless tooling needs improvement. Logging, introspection, and debugging can be difficult at present

Distributed computing

Working with distributed computing architectures can be complex and take time to get right

Natural limitations

Serverless functions may have natural limitations as some vendors have timeout functions. With serverless, there’s a limit to the amount of RAM you can have, and there’s no way to change out the CPU

For startups and even for mid-size enterprises, managing a blockchain project can be nightmare. Hyperledger, a widely used blockchain made for enterprise, they will need the following:

1: Blockchain Chaincode developer who has GoLang, NodeJS or composer expertise

2:Blockchain UI/UX developer who can write UI with blockchain API integration

3:Fabric Administrator who should know Docker, Kubernet, Kafka, Zookeeper, GitHub, Cloud platforms

4: Middleware developer who can manage REST API calls

5:Cryptography expert who can manage certificate and manage Participants, Nodes and Organization

Getting human capital can be difficult and costly for small and mid-size companies. Using Serverless technology can minimize infrastructure and devops resources by relying on the cloud network. Needless to say as organizations will be paying for infrastructure, they will only need to pay for what they actually use and not idle time. For example, I access my server once in the morning for 10 minutes and once more at 2pm for about 30 minutes to do a small backup. My charge use for that day would be exactly 40 minutes or 2,400,000 milliseconds, you only pay for what you use.

Features of a Serverless Blockchain

The Main goal of a serverless blockchain is to “code transaction execution without having dedicated server, this eliminates paying for idle time”.

Functions — Code functions in any native language

Data storage/ Distributed Data storage — Use any NoSQL DB to store transactions with immutable feature

API-Deploy API with endpoint and trigger as a function

Invoke functions/API/App-Application should charge based on function invocation

Below are few of the platform and tools in serverless technology stack

Business use cases:

· Operating serverless websites

· Log analysis on the fly

· Automated backups and everyday tasks

· Processing uploaded S3 objects

· Filtering and transforming data on the fly

· Security Updates

· Automated Backups

· File Conversion

· Serverless CRUD service

· Swift Document Conversion

· Processing Video

· Predictive Page Rendering

The evolution of blockchain is moving toward serverless technology, right now most companies are operating in version one or two of the blockchain with development teams building to reach version three.

Version 1 focused on simple ledger with distributed capability which solves double spending problem
Version 2 has all features of version 1 and includes smart contracts
Version 3 will include features like serverless tech, Interoperability, transaction speed and scaling abilities.

Blockchain 3.0 will need to utilize serverless technology to expand its reach to millions of small and medium scale enterprises.

About Author-:

Enterprise Product Architect with 12+ years of experience in IT industry . Working in American Express as a Enterprise Architect, managing US Disputes portfolio. Previously worked in Capgemini, Morgan Stanley and TMG Health.

Blockchain Expert in Hyperledger and Ethereum technologies with multiple projects execution experience for large enterprise.

Worked in the area of Blockchain, BPM and Devops including tools like Hyperledger, Ethereum, Pega PRPC, Docker, Terraform, Ansible, Kubernet, Jenkins,Python,Javascript,Machine Learning etc.

Adarsh Naidu

Written by

#Innovator#Product Architect#Blockchain expert

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade