SlideShare una empresa de Scribd logo
1 de 18
Open Mainframe Project
Summer internship
Blockchain technology
Laszlo Szoboszlai
Linux Foundation
Date of presentation (02/11/2016)
Session <?>
• Introduction to Blockchain technology and the project
• Structure of a chaincode
• Personal approach to writing HumanityCoins chaincode
• Demo (if everything goes well)
Agenda
Short introduction to blockchain
• Distributed ledger technology
• Stores chaincode, not a currency like bitcoin
• High security through distributed ledger (all nodes need
to be altered at the same time)
• Ideal for batch operation (consensus takes time)
• Hyperledger fabric is the Linux Foundation’s
implementation of blockchain
Introduction to the project
• Humanity Coins
• The idea comes from IBM fellow Donna Dillenberger
• System to encourage people to do good things
• You can give (thank) points to someone who done a
good deed to you
Introduction to the project
(technical details)
• Three levels of thanks: small(1 point), medium (5 pts)
and large (10 points)
• An optional message can be added to the thank
• Points and messages are stored on the ledger
• Front end (mobile) application can access the ledger
through rest API (under development)
• Tweeting auditor to ensure fair use of the system
My work through the project
• Setting up development environment (Golang, docker etc…)
• Testing different settings of networks by increasing security level
• Creating a shell script to start up four validating peers with security,
encryption and consensus enabled, similar to IBM’s High Security
Business Network
• Writing the chaincode, the application written on top of hyperledger
infrastructure
• Github code:
• HumanityCoins chaincode encapsulated in a hyperledger peer as a
docker container:
Structure of a Chaincode
• Every chaincode has to implement 3 functions (Init, Invoke, Query)
• Can have more functions on top of the above 3
• The functions can do anything but traditionally
– Init : initialises data on the ledger
– Invoke : used to modify data on the ledger and
– Query : is for reading data from the ledger
• Coded in Go programming language (now Java is supported as
well, and more coming)
• Data stored as key – value pairs (keys tend to be strings, values on
the ledger are byte arrays)
Implementation of chaincode
(unusual functions)
• Let’s call it addThanks instead of Invoke
• Three types of Query: getUser, getKeys and getRandomUser
instead of a single query
Implementation of the
chaincode
(data structures)
• Structs are converted to a
JSON object before written to the ledger
• Each user has a thanklist stored where the
name of the thanker, the type of the thank
and a short message is stored
• In order to make getRandomUser() easier
the user names are stored in a separate
struct as well (KeyList)
Implementation of the
chaincode
(init function)
• Init is used to initialise the users with their starting points
• Usernames and initial points are passed through args
• Requires even number of parameters
• KeylistObj is filled simultaneously
Implementation of chaincode
(init function cont’d)
• Entity struct is filled from variables and empty thanklist is created
• Entity struct to JSON object -> ledger
• KeyListObj to JSON object -> ledger (PutState function)
• Initialisation ready
Testing
• Tried to follow TDD principles
• After initial skeleton chaincode I created a test script in bash ( first
time all tests failed)
• Tweaked all the functions to pass all the tests
• Extended the chaincode with the extra functions (getKeys(),
getRandomUser() ) but first I created the test scenarios that needed
to be passed
• Finally everything was green
Issues & solutions
• Rapidly changing codebase -> stick to v 0.5
• Issues with LinuxONE on Marist cloud -> got a box from Vicom
Infinity (and another one later)
• Changing project -> writing own chaincode instead of using IBM
demo code
• Connect to IBM HSBN -> set up a HSBN simulation on my box
Future work
• Rewards part of chaincode and app (ie Coffee shop
gives free cup of coffee to people over 1000 points)
• Integration with smart meters
• Port to IBM Bluemix
• Connect with Zos connect
Things I have learnt trough the
summer
• How to write a chaincode
• How Hyperledger fabric blockchain works
• Go programming language
• Docker
• Advanced bash scripting
• TDD, agile methodologies
• How to communicate with stakeholders
Few bigThanks
(the 10 points one )
go to:
• Volodymyr Paprotski (my mentor, IBM)
• Herbert Daly (co-mentor, University of Bedfordshire)
• Leonard Santalucia (co-mentor, Vicom Infinity)
• Yongkook Kim (co-mentor, Vicom Infinity)
• Development team on slack
• people from Marist College
Live demo
Session feedback
• Please submit your feedback at
http://conferences.gse.org.uk/2016/feedback/nn
• Session is nn
This is the last
slide in the deck
Insert
Custom
Session
QR code

Más contenido relacionado

La actualidad más candente

SQL Queries on Smalltalk Objects
SQL Queries on Smalltalk ObjectsSQL Queries on Smalltalk Objects
SQL Queries on Smalltalk Objects
ESUG
 
January 2022: Central Iowa Linux Users Group: Git
January 2022: Central Iowa Linux Users Group: GitJanuary 2022: Central Iowa Linux Users Group: Git
January 2022: Central Iowa Linux Users Group: Git
Andrew Denner
 

La actualidad más candente (20)

Monitoring docker: from zero to Azure
Monitoring docker: from zero to AzureMonitoring docker: from zero to Azure
Monitoring docker: from zero to Azure
 
Cooking Akka.net and Azure Service Fabric together
Cooking Akka.net and Azure Service Fabric togetherCooking Akka.net and Azure Service Fabric together
Cooking Akka.net and Azure Service Fabric together
 
Building Digital Transaction Systems in the new Banking World
Building Digital Transaction Systems in the new Banking WorldBuilding Digital Transaction Systems in the new Banking World
Building Digital Transaction Systems in the new Banking World
 
Nick Raienko ''Service-oriented GraphQL''
Nick Raienko ''Service-oriented GraphQL''Nick Raienko ''Service-oriented GraphQL''
Nick Raienko ''Service-oriented GraphQL''
 
Timur Shemsedinov "Эволюция архитектуры ИС"
Timur Shemsedinov "Эволюция архитектуры ИС"Timur Shemsedinov "Эволюция архитектуры ИС"
Timur Shemsedinov "Эволюция архитектуры ИС"
 
Ensuring Quality in Data Lakes (D&D Meetup Feb 22)
Ensuring Quality in Data Lakes  (D&D Meetup Feb 22)Ensuring Quality in Data Lakes  (D&D Meetup Feb 22)
Ensuring Quality in Data Lakes (D&D Meetup Feb 22)
 
Bccon use notes objects in memory and other useful
Bccon   use notes objects in memory and other usefulBccon   use notes objects in memory and other useful
Bccon use notes objects in memory and other useful
 
SQL Queries on Smalltalk Objects
SQL Queries on Smalltalk ObjectsSQL Queries on Smalltalk Objects
SQL Queries on Smalltalk Objects
 
Python performance profiling
Python performance profilingPython performance profiling
Python performance profiling
 
MongoDB Days Silicon Valley: Concurrency Control in MongoDB 3.0+
MongoDB Days Silicon Valley: Concurrency Control in MongoDB 3.0+MongoDB Days Silicon Valley: Concurrency Control in MongoDB 3.0+
MongoDB Days Silicon Valley: Concurrency Control in MongoDB 3.0+
 
New Features of Kubernetes v1.2.0 beta
New Features of Kubernetes v1.2.0 betaNew Features of Kubernetes v1.2.0 beta
New Features of Kubernetes v1.2.0 beta
 
Lightbend Lagom: Microservices Just Right
Lightbend Lagom: Microservices Just RightLightbend Lagom: Microservices Just Right
Lightbend Lagom: Microservices Just Right
 
How to make App with Hyperledger fabric and composer
How to make App with Hyperledger fabric and composerHow to make App with Hyperledger fabric and composer
How to make App with Hyperledger fabric and composer
 
Secrets in Kubernetes
Secrets in KubernetesSecrets in Kubernetes
Secrets in Kubernetes
 
Multi tenancy for docker
Multi tenancy for dockerMulti tenancy for docker
Multi tenancy for docker
 
Amazon Cloud Overview
Amazon Cloud OverviewAmazon Cloud Overview
Amazon Cloud Overview
 
January 2022: Central Iowa Linux Users Group: Git
January 2022: Central Iowa Linux Users Group: GitJanuary 2022: Central Iowa Linux Users Group: Git
January 2022: Central Iowa Linux Users Group: Git
 
Taking the Long View: How the Oslo Program Reduces Technical Debt
Taking the Long View: How the Oslo Program Reduces Technical DebtTaking the Long View: How the Oslo Program Reduces Technical Debt
Taking the Long View: How the Oslo Program Reduces Technical Debt
 
Lagom - Mircoservices "Just Right"
Lagom - Mircoservices "Just Right"Lagom - Mircoservices "Just Right"
Lagom - Mircoservices "Just Right"
 
Building IAM for OpenStack
Building IAM for OpenStackBuilding IAM for OpenStack
Building IAM for OpenStack
 

Destacado

Introduction to Blockchain and the Hyperledger Project
Introduction to Blockchain and the Hyperledger ProjectIntroduction to Blockchain and the Hyperledger Project
Introduction to Blockchain and the Hyperledger Project
Manuel Garcia
 

Destacado (14)

Blockchain Hyperledger Lab
Blockchain Hyperledger LabBlockchain Hyperledger Lab
Blockchain Hyperledger Lab
 
Introduction to Blockchain and Hyperledger
Introduction to Blockchain and HyperledgerIntroduction to Blockchain and Hyperledger
Introduction to Blockchain and Hyperledger
 
Excelian hyperledger walkthrough-feb17
Excelian hyperledger walkthrough-feb17Excelian hyperledger walkthrough-feb17
Excelian hyperledger walkthrough-feb17
 
Excelian hyperledger fabric-feb17
Excelian hyperledger fabric-feb17Excelian hyperledger fabric-feb17
Excelian hyperledger fabric-feb17
 
Hands on with multichain
Hands on with multichainHands on with multichain
Hands on with multichain
 
Trading Derivatives on Hyperledger
Trading Derivatives on HyperledgerTrading Derivatives on Hyperledger
Trading Derivatives on Hyperledger
 
Blockchain as a Service and Hyperledger in 15 Minutes
Blockchain as a Service and Hyperledger in 15 MinutesBlockchain as a Service and Hyperledger in 15 Minutes
Blockchain as a Service and Hyperledger in 15 Minutes
 
Blockchain for Business on Hyperledger
Blockchain for Business on HyperledgerBlockchain for Business on Hyperledger
Blockchain for Business on Hyperledger
 
Architecture of the Hyperledger Blockchain Fabric - Christian Cachin - IBM Re...
Architecture of the Hyperledger Blockchain Fabric - Christian Cachin - IBM Re...Architecture of the Hyperledger Blockchain Fabric - Christian Cachin - IBM Re...
Architecture of the Hyperledger Blockchain Fabric - Christian Cachin - IBM Re...
 
Introduction to Blockchain and the Hyperledger Project
Introduction to Blockchain and the Hyperledger ProjectIntroduction to Blockchain and the Hyperledger Project
Introduction to Blockchain and the Hyperledger Project
 
Technical Introduction to IBM's Open Blockchain (OBC)
Technical Introduction to IBM's Open Blockchain (OBC)Technical Introduction to IBM's Open Blockchain (OBC)
Technical Introduction to IBM's Open Blockchain (OBC)
 
Anatomy of a hyperledger application
Anatomy of a hyperledger applicationAnatomy of a hyperledger application
Anatomy of a hyperledger application
 
Orchestraing the Blockchain Using Containers
Orchestraing the Blockchain Using ContainersOrchestraing the Blockchain Using Containers
Orchestraing the Blockchain Using Containers
 
Kubernetes on GCP
Kubernetes on GCPKubernetes on GCP
Kubernetes on GCP
 

Similar a OMP GSE

Fixing Twitter Improving The Performance And Scalability Of The Worlds Most ...
Fixing Twitter  Improving The Performance And Scalability Of The Worlds Most ...Fixing Twitter  Improving The Performance And Scalability Of The Worlds Most ...
Fixing Twitter Improving The Performance And Scalability Of The Worlds Most ...
xlight
 

Similar a OMP GSE (20)

Reactive Development: Commands, Actors and Events. Oh My!!
Reactive Development: Commands, Actors and Events.  Oh My!!Reactive Development: Commands, Actors and Events.  Oh My!!
Reactive Development: Commands, Actors and Events. Oh My!!
 
Internals of Presto Service
Internals of Presto ServiceInternals of Presto Service
Internals of Presto Service
 
Untangling - fall2017 - week 9
Untangling - fall2017 - week 9Untangling - fall2017 - week 9
Untangling - fall2017 - week 9
 
Advanced Internet of Things firmware engineering with Thingsquare and Contiki...
Advanced Internet of Things firmware engineering with Thingsquare and Contiki...Advanced Internet of Things firmware engineering with Thingsquare and Contiki...
Advanced Internet of Things firmware engineering with Thingsquare and Contiki...
 
NodeJS - Server Side JS
NodeJS - Server Side JS NodeJS - Server Side JS
NodeJS - Server Side JS
 
Scaling with mongo db (with notes)
Scaling with mongo db (with notes)Scaling with mongo db (with notes)
Scaling with mongo db (with notes)
 
Mongo DB at Community Engine
Mongo DB at Community EngineMongo DB at Community Engine
Mongo DB at Community Engine
 
MongoDB at community engine
MongoDB at community engineMongoDB at community engine
MongoDB at community engine
 
8. Software Development Security
8. Software Development Security8. Software Development Security
8. Software Development Security
 
Chirp 2010: Scaling Twitter
Chirp 2010: Scaling TwitterChirp 2010: Scaling Twitter
Chirp 2010: Scaling Twitter
 
Fixing twitter
Fixing twitterFixing twitter
Fixing twitter
 
Fixing_Twitter
Fixing_TwitterFixing_Twitter
Fixing_Twitter
 
Fixing Twitter Improving The Performance And Scalability Of The Worlds Most ...
Fixing Twitter  Improving The Performance And Scalability Of The Worlds Most ...Fixing Twitter  Improving The Performance And Scalability Of The Worlds Most ...
Fixing Twitter Improving The Performance And Scalability Of The Worlds Most ...
 
Fixing Twitter Improving The Performance And Scalability Of The Worlds Most ...
Fixing Twitter  Improving The Performance And Scalability Of The Worlds Most ...Fixing Twitter  Improving The Performance And Scalability Of The Worlds Most ...
Fixing Twitter Improving The Performance And Scalability Of The Worlds Most ...
 
Docker interview Questions-3.pdf
Docker interview Questions-3.pdfDocker interview Questions-3.pdf
Docker interview Questions-3.pdf
 
5 Pitfalls to Avoid with MongoDB
5 Pitfalls to Avoid with MongoDB5 Pitfalls to Avoid with MongoDB
5 Pitfalls to Avoid with MongoDB
 
Architectural Decisions: Smoothly and Consistently
Architectural Decisions: Smoothly and ConsistentlyArchitectural Decisions: Smoothly and Consistently
Architectural Decisions: Smoothly and Consistently
 
Architectural Decisions: Smoothly and Consistently
Architectural Decisions: Smoothly and ConsistentlyArchitectural Decisions: Smoothly and Consistently
Architectural Decisions: Smoothly and Consistently
 
The Developers World
The Developers WorldThe Developers World
The Developers World
 
Ruby and Distributed Storage Systems
Ruby and Distributed Storage SystemsRuby and Distributed Storage Systems
Ruby and Distributed Storage Systems
 

OMP GSE

  • 1. Open Mainframe Project Summer internship Blockchain technology Laszlo Szoboszlai Linux Foundation Date of presentation (02/11/2016) Session <?>
  • 2. • Introduction to Blockchain technology and the project • Structure of a chaincode • Personal approach to writing HumanityCoins chaincode • Demo (if everything goes well) Agenda
  • 3. Short introduction to blockchain • Distributed ledger technology • Stores chaincode, not a currency like bitcoin • High security through distributed ledger (all nodes need to be altered at the same time) • Ideal for batch operation (consensus takes time) • Hyperledger fabric is the Linux Foundation’s implementation of blockchain
  • 4. Introduction to the project • Humanity Coins • The idea comes from IBM fellow Donna Dillenberger • System to encourage people to do good things • You can give (thank) points to someone who done a good deed to you
  • 5. Introduction to the project (technical details) • Three levels of thanks: small(1 point), medium (5 pts) and large (10 points) • An optional message can be added to the thank • Points and messages are stored on the ledger • Front end (mobile) application can access the ledger through rest API (under development) • Tweeting auditor to ensure fair use of the system
  • 6. My work through the project • Setting up development environment (Golang, docker etc…) • Testing different settings of networks by increasing security level • Creating a shell script to start up four validating peers with security, encryption and consensus enabled, similar to IBM’s High Security Business Network • Writing the chaincode, the application written on top of hyperledger infrastructure • Github code: • HumanityCoins chaincode encapsulated in a hyperledger peer as a docker container:
  • 7. Structure of a Chaincode • Every chaincode has to implement 3 functions (Init, Invoke, Query) • Can have more functions on top of the above 3 • The functions can do anything but traditionally – Init : initialises data on the ledger – Invoke : used to modify data on the ledger and – Query : is for reading data from the ledger • Coded in Go programming language (now Java is supported as well, and more coming) • Data stored as key – value pairs (keys tend to be strings, values on the ledger are byte arrays)
  • 8. Implementation of chaincode (unusual functions) • Let’s call it addThanks instead of Invoke • Three types of Query: getUser, getKeys and getRandomUser instead of a single query
  • 9. Implementation of the chaincode (data structures) • Structs are converted to a JSON object before written to the ledger • Each user has a thanklist stored where the name of the thanker, the type of the thank and a short message is stored • In order to make getRandomUser() easier the user names are stored in a separate struct as well (KeyList)
  • 10. Implementation of the chaincode (init function) • Init is used to initialise the users with their starting points • Usernames and initial points are passed through args • Requires even number of parameters • KeylistObj is filled simultaneously
  • 11. Implementation of chaincode (init function cont’d) • Entity struct is filled from variables and empty thanklist is created • Entity struct to JSON object -> ledger • KeyListObj to JSON object -> ledger (PutState function) • Initialisation ready
  • 12. Testing • Tried to follow TDD principles • After initial skeleton chaincode I created a test script in bash ( first time all tests failed) • Tweaked all the functions to pass all the tests • Extended the chaincode with the extra functions (getKeys(), getRandomUser() ) but first I created the test scenarios that needed to be passed • Finally everything was green
  • 13. Issues & solutions • Rapidly changing codebase -> stick to v 0.5 • Issues with LinuxONE on Marist cloud -> got a box from Vicom Infinity (and another one later) • Changing project -> writing own chaincode instead of using IBM demo code • Connect to IBM HSBN -> set up a HSBN simulation on my box
  • 14. Future work • Rewards part of chaincode and app (ie Coffee shop gives free cup of coffee to people over 1000 points) • Integration with smart meters • Port to IBM Bluemix • Connect with Zos connect
  • 15. Things I have learnt trough the summer • How to write a chaincode • How Hyperledger fabric blockchain works • Go programming language • Docker • Advanced bash scripting • TDD, agile methodologies • How to communicate with stakeholders
  • 16. Few bigThanks (the 10 points one ) go to: • Volodymyr Paprotski (my mentor, IBM) • Herbert Daly (co-mentor, University of Bedfordshire) • Leonard Santalucia (co-mentor, Vicom Infinity) • Yongkook Kim (co-mentor, Vicom Infinity) • Development team on slack • people from Marist College
  • 18. Session feedback • Please submit your feedback at http://conferences.gse.org.uk/2016/feedback/nn • Session is nn This is the last slide in the deck Insert Custom Session QR code

Notas del editor

  1. A distributed ledger is a consensus of replicated, shared, and synchronized digital data geographically spread across multiple sites, countries, and/or institutions.
  2. Unexpected non financial “thank” random acts of kindness New currency (no cost to you ) On public blockchain so governments can see it