1. 程式人生 > >Apps without privacy issues: Creating a blockchain wellness app on the cloud

Apps without privacy issues: Creating a blockchain wellness app on the cloud

Are you heading to DockerCon next week? We are and we’re bringing back our popular blockchain on Kubernetes app, Kubecoin. Hopefully we see you there, but in the meantime I thought I’d explain why we made Kubecoin in the first place.

Excitement about blockchain has been growing in banks, legal firms, and beyond in the past few years. References to it seem to appear everywhere these days and yet there’s still confusion about it. To clarify, blockchain is the technology behind

Bitcoin, which uses distributed computing to authenticate transactions.

As a designer and developer who has lived through many tech hype cycles (like now with blockchain), my approach to learning about new technology is not just to trust articles about it, but to design and build with it.

Earlier this year, my IBM Cloud Patterns content team collaborated on a side project with our sister Emerging Technology Patterns team to create a blockchain concept app. We wanted to invite others to try it out, document how we built it, and talk about what we’ve learned from it.

The blockchain revolution

I didn’t really know a lot about blockchain at first, so I read the book “Blockchain Revolution,” which offers an interesting angle on how blockchain technology could ‘revolutionize’ software solutions socially by empowering the participants of services with more control over their own data.

One of the introductory paragraphs in the book describes a blockchain as a ‘peer-to-peer exchange of value,’ and I really liked the simplicity of that description. The emphasis is on value and not on money. Blockchain offers a way of thinking about the value of our own data, and what we’re willing to exchange that for.

In today’s model, we exchange the value of our data for free Internet search, social networking, and more. Yet there still seems to be an imbalance with that, because big corporations are becoming disproportionately wealthy and powerful by leveraging our data. We’re even hearing stories of our data being exploited for political gain.

Depending on implementation choices, blockchain provides fresh approaches to honest, considerate, accountable, and transparent services. When I finished reading “Blockchain Revolution,” I set up a Google alert about blockchain. Now I get news alerts everyday on how some government, community, or corporations are experimenting in new ways with it.

I’m not going to write a lot about how blockchain achieves that in this blog post, because I want to focus on our app concept. But it is an important thing to note and I encourage everyone to read more about blockchain on Wikipedia. I also valued explanations from Anders Brownworth and his neat interactive demo, which inspired some of the visualization on our Kubecoin leaderboard above.

An accountable wellness app

Insurance companies, employers, and even governments have always been interested in keeping us healthy. But in recent years, they introduced incentives and wearable apps to encourage us to participate in health programs.

As an example, where I live in Ottawa, we had a bike-to-work month. Funded by the municipality, we could claim prizes based on how much we cycled to work during that month. More widely in Canada, there is a wellness app that is collaboratively funded by some provincial governments and the federal government called Carrot Rewards.

As a self-proclaimed health conscious geek, I really like the approach of Carrot Rewards. It is used to both educate me and reward my activity with air miles.

Though these initiatives are positive, there is an underlying concern that insurance companies, employers, and governments can access very personal information. There’s worry, if not a genuine possibility, that it may later influence a participant’s relationship with them.

Thus the inspiration for creating a wellness concept app that is considerate, accountable, and private is possible by using blockchain.

Our wellness app, Kubecoin, works to respect the data of the participant.

Kubecoin

Initially, the motivation for Kubecoin was to create an online simulation of a person’s footsteps converting into a ‘cryptocurrency’ called kubecoins (because we are showcasing blockchain on Kubernetes).

However, a neat opportunity to experiment in real life became apparent by inviting conference attendees to try out a mobile app—essentially putting a blockchain in their hands.

The idea is that attendees walk around the conference and convert their footsteps into ‘kubecoins,’ which could later be traded for conference swag. 100 footsteps = 1 kubecoin and even the conference swag is inventory that is controlled on a blockchain.

Good blockchains restrict the opportunity for human interference. Kubecoin takes fitness data directly from the phone health kit and places transactions on the ‘Kubechain.’ The app works anonymously, it assigns a made-up identity to you, along with a randomly generated avatar. Your data can’t be traced to you, but you’ll be able to see where your assigned avatar ranks on our leaderboard.

We ran an initial version of the app as part of ‘The Secret Map’ at IBM’s Think conference, where almost 200 participants tried it out. We also released a subsequent version at KubeCon where another 100 people tried the app.

Kubecoin was, without a doubt, highly popular. In fact, it was so popular that several organizations asked us about reusing our open source code to experiment with internal and external versions of it for themselves.

Cloud technology

Kubecoin runs on IBM Cloud. It is mostly deployed on the IBM Cloud Kubernetes Service following an IBM Code pattern, although it benefits a little from IBM Cloud Functions, too. The dashboard is a simple Node.js app, which we quickly deployed as a Cloud Foundry app for convenience.

High-level deployment architecture of Kubecoin

Kubecoin not only works in open source, but allows participants to immerse in the technology and feel how quickly and reliably IBM Cloud delivers the experience. They can study it on their own screen, in their own time and point out problems to us if they exist.

In our current state of affairs, development teams just need to become familiar with blockchain. We set out to explain how effortless it can be to incorporate blockchain into your code with our Code Patterns—they’re a great approach for developers who want to experiment with the tech in a contained way.

Android or iOS?

Whether you choose Android or iOS, we have both! Here is the iPhone App code, both of which are coded in open source. The Android repo has a more detailed architecture diagram that you can read about, plus you can see how we’re building with other services like Redis, MongoDB, and RabbitMQ.

Detailed architecture of Kubecoin system

This is a real system that was built by a team of five developers as a side project earlier this year. The team documented everything about our approach and even stress-tested it.

Tenets of cloud development

When we first suggested the idea of running Kubecoin at KubeCon, the feedback we received was that it needed to demonstrate five tenets of cloud development that the IBM Cloud team cares about. So we added a booklet to link to IBM Code Patterns, blog posts, and repos that showcased these considerations in the context of Kubecoin.

Kubecoin showing 5 tenets of cloud development

Kubecoin itself is very Cloud Native. It is secure in that it uses blockchain, it is modern and extensible (we have some machine learning additions coming later this year). You can see from the diagram above how it is broken into microservices, and we used continuous integration and frequent deployment and testing to make this run with zero crashes at two events—all done fluidly despite the accelerated development across five developers and three separate labs.

Design notes

Some notes about the visual design influences. After trying a few ideas, I came across a photo of a palette that I liked and picked out some colors from Pantone that aligned with my vision.

I wanted colors that were fresh, healthy, yet still restrained. I favor lots of whitespace in my apps, and work hard to simplify user flows. This quote exemplifies what I envisioned:

“A designer knows he has achieved perfection not when there is nothing left to add, but when there is nothing left to take away.”  — Antoine de Saint-Exupery

For the client, the app is simple … they walk, their steps are recorded. But behind the scenes is a sophisticated, state of the art blockchain network, protecting, accurately recording, and converting their personal data.

I tried to make the logo image look like an actual coin, but also contain the Kubernetes logo. The Kubecon conference was held in Denmark, where the beautiful Kroner coins ( with the hole in the middle and hearts at the side ) have inspired a new iteration of the logo, that you can see above.

I created a random Avatar generator called ‘minifig’ that draws simple avatars, generated with colors from the same above palette to keep a consistent feel to the app and the dashboard.

The future

We do want to push a little more with Kubecoin. We’re taking it to DockerCon next week with a couple of minor enhancements (you’ll have to wait and see!). But we’re also going to keep sharing it at a couple more conferences before the year is out with more enhancements, so stay tuned. My hope for Kubecoin’s future is to launch it at an even bigger scale and with a machine learning component.

Machine learning means that Kubecoin will make constant predictions based on the speed and distance people walk, to determine the value of the swag they exchange their kubecoins for. I have some design ideas forming around how we can make that interesting for participants.

Kubecoin is just one sample app that our team made. We have many ideas in development, such as an app that I designed called WatsonML (available on iTunes here), which uses Apple and IBM’s Core ML. And our Cloud Pattern team is constantly creating new patterns and workshop materials for you guys. In the meantime, I hope our experiment has opened up some ideas for you, too.

相關推薦

Apps without privacy issues: Creating a blockchain wellness app on the cloud

Are you heading to DockerCon next week? We are and we’re bringing back our popular blockchain on Kubernetes app, Kubecoin. Hopefully we see you there, b

Build a blockchain insurance app

Summary With its distributed ledger, smart contracts, and non-repudiation capabilities, blockchain is revolutionizing the way financi

Create a Node.js App Using the Express Application Generator Tool

1) Install Express dependencies, create the project directory, and run the generatornpm i -g express express-generatormkdir express-projectcd express-proje

How to run a React Native app on iOS

How to run a React Native app on iOSI recently started to develop a React-Native app on iOS. This was my first foray into native app development. I was sur

Deploy a MERN stack app on Heroku

In this article, I will describe how to take an existing Web Application that is build using MongoDB, ExpressJS, Node.js, and React (often called as MERN s

Create a personal video watchlist in the cloud with PHP and the Movie Database API Part 2

If you have been following along with Part 1, you are half-way through building a web-based PHP application to store your personal wa

A Virtual Jewish Nation May Teach the World How to Live on the Cloud

A Virtual Jewish Nation May Teach the World How to Live on the CloudWe’re all familiar with “the cloud.” But have heard about “cloud nations”?If you ask fu

Is the Uni industrial iot gatewayverse a Bubble? – Physicists Work on the Multiverse Hypothesis

www.inhandnetworks.com Screenshot from a video of Matthew Johnson explaining the related concepts of inflation, eternal inflation, and the multi

Blockchain Innovators: Creating a REST server and Deploying Starter (6/6)

Learn how to create a REST server and deploy your blockchain network into the IBM Blockchain Platform. This is part 6 of our series Challenge Accepted: De

dashDB - Creating a table with CLOB column type

sda lec ads rim bold classic science count gree In order to create a table with clob column type, the table has to be created with "ORGAN

play02-Getting started-Creating a new application

Scala play sbt https://www.playframework.com/documentation/2.6.x/NewApplication 使用Play starter project:https://playframework.com/download#starters如果你

權限不足When Creating a Materialized View Log

MLOGThe privileges required to create a materialized view log are directly related to the privileges necessary to create the underlying objects associated

Creating a new dynamic form project, business modeling.

oss creat aps inf logic acc conn then dde The domain logic is like there are a bunch of objects, as well as a lot of configurations, acco

第一次使用jupyter建立python時錯誤:Creating Notebook Failed An error occurred while creating a new notebook.

當我們用命令列在瀏覽器中啟動jupyter notebook後需要點選右上角的New建立新的python檔案,此時會報錯。在Linux下可以用命令列解決這個問題。首先需要找到anaconda2中jupyter檔案,在anaconda2中的share檔案中,對jupyter執行如下命令,來修改jupy

[java] Creating a CachedRowSet Object

使用這一行來 create cachedrowset 不知道為何,有時會失敗: crs = RowSetProvider.newFactory().createCachedRowSet(); 最底層會丟出這個 Error: cachedrowset org.apache.catalina.loader.

Creating a Product Recommendation Neural Network in the Web Browser

Creating a Product Recommendation Neural Network in the Web BrowserNeural networks have demonstrated their power over the last few years, creating major br

Creating a reusable React Query component for your REST API

When implementing a new UI component I always start with the layouting and mock the server commucation by providing defaultProps and empty click listeners

How to Choose a Blockchain Platform for Your Business

How to Choose a Blockchain Platform for Your BusinessThe growing popularity of crypto investments has aroused a keen interest in blockchain technologies an

world assets on a blockchain is stupid

Why tokenizing real-world assets on a blockchain is stupidDon’t believe the snake oil salesmen!Blockchains are the latest buzzword used to sell your compan

How to go from a Blockchain Tourist to a Blockchain Citizen: Beyond the Hype

How to go from a Blockchain Tourist to a Blockchain Citizen: Beyond the HypeHow to go from a Blockchain Tourist to a Blockchain CitizenBlockchain tourism a