Blockchain as a Service: Running Cloud Foundry Apps on Ethereum

by Carlo GutierrezJuly 13, 2017
Smart contracts are not the only things you can store on a blockchain such as Ethereum. Distributed Cloud Foundry apps themselves could also be put there.

Blockchain as a service

Previously, we’ve written about the basics of blockchain, how the technology is able to reliably secure data, and what industries are being digitally transformed by it.

At Cloud Foundry Summit 2017, the concept of “blockchain-as-a-service” was also tackled by Gary White Jr., a software engineer at DELL EMC. “This is an adopted theory by the Ethereum Foundation and some of the alternate blockchain implementations,” explained Gary.

The idea builds on using blockchain for storing data to putting applications on a blockchain.

CF Summit 2017 Silicon Valley Blockchain as a service decentralized applications dapps Gary White JrGary White Jr. at the Cloud Foundry Summit 2017 (Photo credit: Altoros)

“(We) basically put bytecode inside transactions and say this bytecode does this application. When it gets mined, you can just call this bytecode and execute functionality within any node in the blockchain.” —Gary White Jr., Dell EMC

 

Applications on a blockchain

We already know that blockchains are used to store data. Usually, this data is just simple information, such as a person’s name or how much money they have.

CF Summit 2017 Silicon Valley Blockchain as a service decentralized applications dapps blocks v1Typical data on a blockchain (Source)

What if applications themselves are stored in a blockchain as decentralized or distributed applications (DApps)?

CF Summit 2017 Silicon Valley Blockchain as a service decentralized applications dapps blocks v2Applications now stored on a blockchain (Source)

According to Gary, this has the added benefit of security and reliability. “You can use the distributed security that comes from blockchains,” he explained, “to ensure that there is integrity within the data.”

CF Summit 2017 Silicon Valley Blockchain as a service decentralized applications dapps Gary White Jr v2

“If you put your apps in here and you have app data sitting within the blockchain, then that data has integrity even if there’s a point that there’s a breach. You can always roll back to the state that the application had full control of all the data within it.” —Gary White Jr.

 

What is a DApp?

The idea behind DApps has floated around for at least a few years already. There’s a comprehensive white paper by David Johnston, investigating the theory behind DApps. According to the guide, an application can be considered a DApp if it meets the following criteria:

  • It must be completely open-source.
  • Application data has to be stored in a public, decentralized blockchain.
  • Cryptographic tokens must be used both for access to the application and as payment to contributing nodes.
  • Cryptographic tokens must be generated according to a proof-of-work or a similar algorithm.
  • No single entity has control of the application’s tokens.

CF Summit 2017 Silicon Valley Blockchain as a service decentralized applications dapps architectureAn architecture of a sample DApp (Source)

As Gary explained, developers will be able to charge users with transaction fees by putting applications on a blockchain. “Every time they use a certain functionality in your application, you can make sure that they’ve committed the resources they’re able to pay for whatever functionality they want to invoke, and that’s the value you don’t get out of a distributed database.”

CF Summit 2017 Silicon Valley Blockchain as a service decentralized applications dapps Gary White Jr v3

Aside from monetization, we can think of a few other reasons to build DApps:

  • Reliability. Applications will benefit from the distributed nature of blockchain, since there is no central point of failure.
  • Speed. Applications will be able to transfer data faster by having multiple nodes instead of just one central server.

The DApp development is already picking up steam. There are already 500+ DApps designed using Ethereum alone.

 

Cloud Foundry DApps

According to Gary, the DApp concept can also extend to applications made with Cloud Foundry. In this case, the DApps based on Cloud Foundry are exposed to users through a web UI. By using the CF Service Broker API, Cloud Foundry containers are able to verify data with a BOSH virtual machine.

“We leverage the CF Service Broker API to make sure that the containers running in clouds can all get access to the same blockchain and the same version of truth as they communicate through their activities of application functionality.” —Gary White Jr., Dell EMC

CF Summit 2017 Silicon Valley Blockchain as a service decentralized applications dapps ethereum cloud foundry architectureAn architecture of a sample Cloud Foundry DApp (Source)

This configuration could also run on a private blockchain. “If you wanted to, you could make this a private blockchain just by running a bootnote at the back,” explained Gary. “That’s Ethereum’s version of just saying this is the server that you want to run into to make sure that you’re talking to the same blockchain.”

Gary also emphasized that using a bootnode would be secure. “As long as nobody knows where this bootnode is or doesn’t know the credentials to get into it, they they can’t compromise your system.”

CF Summit 2017 Silicon Valley Blockchain as a service decentralized applications dapps ethereum cloud foundry architecture v2A completely decentralized architecture (Source)

To get to a fully decentralized system, even the BOSH virtual machine running in the background can be omitted. “You may not even have the piece at the back,” said Gary. “You can just leverage the transactions that are happening through these distributed applications that you’ve published on a public blockchain.”

CF Summit 2017 Silicon Valley Blockchain as a service decentralized applications dapps Gary White Jr v4

“Your users can interact directly with the blockchain, so you may be able to use this model where you have a public blockchain that already exists for you. You don’t have to maintain the infrastructure and you’ve leveraged it with distributed applications and frameworks that are built by an open-source community.” —Gary White Jr., Dell EMC

 

Growing blockchain adoption

With Dell EMC’s initiative, we can see that blockchain technologies—Ethereum and Hyperledger, in particular—are steadily penetrating the Cloud Foundry ecosystem. Other prominent examples include IBM working on blockchain as a service within their Bluemix distribution. (E.g., the Royal Bank of Canada and Everledger are securing their services using blockchain and Bluemix.) Meanwhile, SAP is developing the TrueRec app to verify employee qualifications.

Those who want to learn more about the technical side, refer to Pivotal’s tutorial on creating a simplified demo blockchain that can be run directly from a CLI. The most recent update from their team is a repository that provides an example of a private Ethereum cluster running on Cloud Foundry.

Furthermore, Pivotal believes that the combination of Cloud Foundry and blockchain could be used to ensure security of deployments via digital signatures. For instance, this may include signing buildpacks and verifying their authenticity at runtime, signing apps from approved build pipelines to ensure only verified apps can be pushed to Cloud Foundry, and signing BOSH manifests and Operations Manager Tiles to control and verify the system state.

We at Altoros are also strongly commited to both Cloud Foundry and blockchain. We believe this combination will only get wider adoption quite soon—spreading across multiple industries far beyond finance.

 

Want details? Watch the video!

Table of contents
  1. What is a blockchain? (1:35)
  2. How is it different to distributed databases? (4:20)
  3. How can blockchain data be trusted? (9:10)
  4. What is a block made of? (11:10)
  5. How are blockchain transactions validated? (12:30)
  6. How do blockchains resolve conflict? (21:05)
  7. How can applications be placed on a blockchain? (23:20)
  8. What does Cloud Foundry applications on Ethereum look like? (26:40)
  9. Q&A. Where would nodes be placed in a Cloud Foundy/Ethereum setup? (31:00)
  10. Q&A. How can applications be accessed? (34:00)

 
You can also check out a session from the Cloud Foundry Summit 2016—in this case, IBM uses Hyperledger-based blockchains on Cloud Foundry instead of Ethereum.

 

Further reading

 

About the expert

Gary White Jr, Dell EMC bio
Gary White Jr. is a software developer for Dell EMC. He is a member of the Dojo team in Cambridge, Massachusetts. Since the beginning of the team, Gary has been working on such open-source projects as the BOSH RackHD CPI. He has also worked with Persistence in Cloud Foundry in 2016. One of Gary’s most recent projects as part of the Dojo team was a proof of concept for storing data in a blockchain using Cloud Foundry.