SlideShare a Scribd company logo
1 of 18
HOW TO DEVELOP A
DISTRIBUTED APP ON
ETHEREUM
MARCO OTTOLINI – HERAKLION – 17 OCTOBER 2018
WHO AM I
• Hacker since 1980
• Tech Journalist
• Startupper
• Running summer internships in Heraklion since 2012
• Fell in love with Blockchain (Ethereum) since 2016
WHY THE BLOCKCHAIN?
WHY THE BLOCKCHAIN?
• HYPE: after Dec ‘17 Cryptos surge and fall
• SCAM: most of ICOs are scam (https://goo.gl/vgmh8w)
• BUSINESS: nobody really using it
• WHY USE IT: everything could be done with a ”normal” system
Blockchain technology is the fuel of what will be
remembered as “New World”, in the same way as
Internet was what powered the “New Economy” 20
WHAT A BLOCKCHAIN IS?
• It’s a Distributed Ledger (DLT)
• It’s NOT a Distributed Database:
• OK Insert and Retrieve
• NOT OK Delete and Update
• It’s immutable
• It’s public
• It’s secure by definition
WHAT A DISTRIBUTED APP IS?
Software application that is stored on cloud computing
platforms, that run on multiple systems
simultaneously, is accessible everywhere, is fault
tolerant and can scale up automatically
Java VM
Hosted in a
Linux Box
WHAT A DISTRIBUTED APP IS?
Java
Class
Spring
API
WHAT A DISTRIBUTED APP IS?
Java VM
Hosted in a
Linux Box
Java
Class
Spring
API
Java VM
Hosted in a
Linux Box
Java
Class
Spring
API
Java VM
Hosted in a
Linux Box
Java
Class
Spring
API
Load Balancer
DB DB
• Management
• Backup
• Monitoring
• Auto-Scaling
ETHEREUM VIRTUAL MACHINE
• Quasi touring complete machine
• EVM bytecodes
• Gas
• Gas price
• Accounts
• External (private key)
• Contract
Ethereum VM
Ethereum
Contract
WHAT A DISTRIBUTED APP IS?
Java VM
Hosted in a
Linux Box
Java
Class
Spring
API
Java VM
Hosted in a
Linux Box
Java
Class
Spring
API
Java VM
Hosted in a
Linux Box
Java
Class
Spring
API
Load Balancer
DB DB
• Management
• Backup
• Monitoring
• Auto-Scaling
Ethereum VM
Ethereum
Contract
WHAT AN ACCOUNT IS?
• It’s a hash “created” by a private key
• Key pairs are “generated” from a 12 words phrase:
witch collapse practice feed shame open despair creek road again ice least
• Transactions and balance related to an account are kept on the
blockchain
Private
Key
Account
Account
Account Blockchain
Transaction
INTRODUCTION TO REMIX
• Ethereum Solidity IDE in a browser (Like jsfiddle for javascript)
• Open it from http://remix.ethereum.org
HELLO WORLD!
pragma solidity ^0.4.25
contract Hello {
string hello;
constructor () public {
hello = "Hello World!";
}
function getHello() public view returns (string){
return hello;
}
}
HELLO WORLD ON “REAL” ETHEREUM
• Use Metamask to “connect” to ethereum
• Deploy the contract to a testnet (rinkeby)
• See it on Etherscan (https://rinkeby.etherscan.io/)
• We have a real distributed app!
INTRODUCTION TO METAMASK
• It is an Ethereum wallet for a browser
• Take it from https://metamask.io/
• It manages wallet (address) creation and private key storage
YOUR FIRST DISTRIBUTED APP -
TICKETING
Event
Manager
Ticket
Buyer
Event
Creates the
Event
Buys a ticket
Ticket
Owns a ticket
Receives money for ticket sale
TICKETING
• Two contracts
• Event
• Ticket
• Two actors
• Manager
• Buyer(s)
PHASES
1. Create an Event
2. Buy a Ticket
3. Enforce security
4. Enable payment
5. Emit events
6. Ticket burning
https://github.com/mottolini/hack-session-181017
THANK YOU
• marco@ottolini.com
• https://www.linkedin.com/in/ottolini/

More Related Content

What's hot

Microservices with Spring Boot
Microservices with Spring BootMicroservices with Spring Boot
Microservices with Spring BootRasheed Waraich
 
Intro to Polkadot & Kusama
Intro to Polkadot & KusamaIntro to Polkadot & Kusama
Intro to Polkadot & KusamaDan Reecer
 
Service Discovery: From Classic to VPC
Service Discovery: From Classic to VPCService Discovery: From Classic to VPC
Service Discovery: From Classic to VPCMark Corwin
 
Buzzwords: Microservices, containers and serverless - real life applications ...
Buzzwords: Microservices, containers and serverless - real life applications ...Buzzwords: Microservices, containers and serverless - real life applications ...
Buzzwords: Microservices, containers and serverless - real life applications ...drnugent
 
Azure Blockchain Service - myth or reality | Radu Vunvulea | ITCamp | Cluj-Na...
Azure Blockchain Service - myth or reality | Radu Vunvulea | ITCamp | Cluj-Na...Azure Blockchain Service - myth or reality | Radu Vunvulea | ITCamp | Cluj-Na...
Azure Blockchain Service - myth or reality | Radu Vunvulea | ITCamp | Cluj-Na...Radu Vunvulea
 
Integrate connections and twitter
Integrate connections and twitterIntegrate connections and twitter
Integrate connections and twitterStefano Pogliani
 
Write Smart Contracts with Truffle Framework
Write Smart Contracts with Truffle FrameworkWrite Smart Contracts with Truffle Framework
Write Smart Contracts with Truffle FrameworkShun Shiku
 
Smart Contract Dictionary
Smart Contract DictionarySmart Contract Dictionary
Smart Contract DictionaryGene Leybzon
 

What's hot (10)

Microservices with Spring Boot
Microservices with Spring BootMicroservices with Spring Boot
Microservices with Spring Boot
 
Intro to Polkadot & Kusama
Intro to Polkadot & KusamaIntro to Polkadot & Kusama
Intro to Polkadot & Kusama
 
VPC Hands-on
VPC Hands-onVPC Hands-on
VPC Hands-on
 
Service Discovery: From Classic to VPC
Service Discovery: From Classic to VPCService Discovery: From Classic to VPC
Service Discovery: From Classic to VPC
 
Buzzwords: Microservices, containers and serverless - real life applications ...
Buzzwords: Microservices, containers and serverless - real life applications ...Buzzwords: Microservices, containers and serverless - real life applications ...
Buzzwords: Microservices, containers and serverless - real life applications ...
 
Azure Blockchain Service - myth or reality | Radu Vunvulea | ITCamp | Cluj-Na...
Azure Blockchain Service - myth or reality | Radu Vunvulea | ITCamp | Cluj-Na...Azure Blockchain Service - myth or reality | Radu Vunvulea | ITCamp | Cluj-Na...
Azure Blockchain Service - myth or reality | Radu Vunvulea | ITCamp | Cluj-Na...
 
Integrate connections and twitter
Integrate connections and twitterIntegrate connections and twitter
Integrate connections and twitter
 
Write Smart Contracts with Truffle Framework
Write Smart Contracts with Truffle FrameworkWrite Smart Contracts with Truffle Framework
Write Smart Contracts with Truffle Framework
 
Smart Contract Dictionary
Smart Contract DictionarySmart Contract Dictionary
Smart Contract Dictionary
 
WEBBOX
WEBBOXWEBBOX
WEBBOX
 

Similar to How to Develop a Distributed App on Ethereum

[db tech showcase Tokyo 2018] #dbts2018 #B23 『Python, Oracle Cloud, Blockchai...
[db tech showcase Tokyo 2018] #dbts2018 #B23 『Python, Oracle Cloud, Blockchai...[db tech showcase Tokyo 2018] #dbts2018 #B23 『Python, Oracle Cloud, Blockchai...
[db tech showcase Tokyo 2018] #dbts2018 #B23 『Python, Oracle Cloud, Blockchai...Insight Technology, Inc.
 
ICON Introduction and Roadmap
ICON Introduction and RoadmapICON Introduction and Roadmap
ICON Introduction and RoadmapICON Foundation
 
Blockchain Tokenization
Blockchain TokenizationBlockchain Tokenization
Blockchain TokenizationBellaj Badr
 
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 WorldRamit Surana
 
Ethereum in a nutshell
Ethereum in a nutshellEthereum in a nutshell
Ethereum in a nutshellDaniel Chan
 
Introduction to Blockchain with an Ethereuem Hands-on
Introduction to Blockchain with an Ethereuem Hands-onIntroduction to Blockchain with an Ethereuem Hands-on
Introduction to Blockchain with an Ethereuem Hands-onJohann Romefort
 
EOSIO Distributed Application Use Cases
EOSIO Distributed Application Use CasesEOSIO Distributed Application Use Cases
EOSIO Distributed Application Use CasesRobert Konsdorf
 
Renaud Lifchitz - Blockchain decentralized apps: the future of malwares?
Renaud Lifchitz - Blockchain decentralized apps: the future of malwares?Renaud Lifchitz - Blockchain decentralized apps: the future of malwares?
Renaud Lifchitz - Blockchain decentralized apps: the future of malwares?Hacken_Ecosystem
 
Getting Started in Blockchain Security and Smart Contract Auditing
Getting Started in Blockchain Security and Smart Contract AuditingGetting Started in Blockchain Security and Smart Contract Auditing
Getting Started in Blockchain Security and Smart Contract AuditingBeau Bullock
 
Resource slides for blockchain related question
Resource slides for blockchain related questionResource slides for blockchain related question
Resource slides for blockchain related questionLin Lin (Wendy)
 
Ethereum Blockchain with Smart contract and ERC20
Ethereum Blockchain with Smart contract and ERC20Ethereum Blockchain with Smart contract and ERC20
Ethereum Blockchain with Smart contract and ERC20Truong Nguyen
 
20221110 MetaCoin
20221110 MetaCoin20221110 MetaCoin
20221110 MetaCoinHu Kenneth
 
Defrag X Keynote: Deploying and managing Global Blockchain Network
Defrag X Keynote: Deploying and managing Global Blockchain NetworkDefrag X Keynote: Deploying and managing Global Blockchain Network
Defrag X Keynote: Deploying and managing Global Blockchain NetworkDuncan Johnston-Watt
 
Blockchain on the oracle cloud, the next big thing
Blockchain on the oracle cloud, the next big thingBlockchain on the oracle cloud, the next big thing
Blockchain on the oracle cloud, the next big thingRobert van Mölken
 

Similar to How to Develop a Distributed App on Ethereum (20)

[db tech showcase Tokyo 2018] #dbts2018 #B23 『Python, Oracle Cloud, Blockchai...
[db tech showcase Tokyo 2018] #dbts2018 #B23 『Python, Oracle Cloud, Blockchai...[db tech showcase Tokyo 2018] #dbts2018 #B23 『Python, Oracle Cloud, Blockchai...
[db tech showcase Tokyo 2018] #dbts2018 #B23 『Python, Oracle Cloud, Blockchai...
 
All About Ethereum
All About EthereumAll About Ethereum
All About Ethereum
 
ICON Introduction and Roadmap
ICON Introduction and RoadmapICON Introduction and Roadmap
ICON Introduction and Roadmap
 
Etherium Intro for techies
Etherium Intro for techiesEtherium Intro for techies
Etherium Intro for techies
 
Blockchain Tokenization
Blockchain TokenizationBlockchain Tokenization
Blockchain Tokenization
 
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
 
Ethereum in a nutshell
Ethereum in a nutshellEthereum in a nutshell
Ethereum in a nutshell
 
Introduction to Blockchain with an Ethereuem Hands-on
Introduction to Blockchain with an Ethereuem Hands-onIntroduction to Blockchain with an Ethereuem Hands-on
Introduction to Blockchain with an Ethereuem Hands-on
 
EOSIO Distributed Application Use Cases
EOSIO Distributed Application Use CasesEOSIO Distributed Application Use Cases
EOSIO Distributed Application Use Cases
 
Blockchain Breakout Session Tech Coast Conference Jacksonville
Blockchain Breakout Session Tech Coast Conference JacksonvilleBlockchain Breakout Session Tech Coast Conference Jacksonville
Blockchain Breakout Session Tech Coast Conference Jacksonville
 
Renaud Lifchitz - Blockchain decentralized apps: the future of malwares?
Renaud Lifchitz - Blockchain decentralized apps: the future of malwares?Renaud Lifchitz - Blockchain decentralized apps: the future of malwares?
Renaud Lifchitz - Blockchain decentralized apps: the future of malwares?
 
Getting Started in Blockchain Security and Smart Contract Auditing
Getting Started in Blockchain Security and Smart Contract AuditingGetting Started in Blockchain Security and Smart Contract Auditing
Getting Started in Blockchain Security and Smart Contract Auditing
 
Resource slides for blockchain related question
Resource slides for blockchain related questionResource slides for blockchain related question
Resource slides for blockchain related question
 
Ethereum Blockchain with Smart contract and ERC20
Ethereum Blockchain with Smart contract and ERC20Ethereum Blockchain with Smart contract and ERC20
Ethereum Blockchain with Smart contract and ERC20
 
20221110 MetaCoin
20221110 MetaCoin20221110 MetaCoin
20221110 MetaCoin
 
Excelian hyperledger fabric-feb17
Excelian hyperledger fabric-feb17Excelian hyperledger fabric-feb17
Excelian hyperledger fabric-feb17
 
Defrag X Keynote: Deploying and managing Global Blockchain Network
Defrag X Keynote: Deploying and managing Global Blockchain NetworkDefrag X Keynote: Deploying and managing Global Blockchain Network
Defrag X Keynote: Deploying and managing Global Blockchain Network
 
Defrag x blockchain keynote
Defrag x blockchain keynoteDefrag x blockchain keynote
Defrag x blockchain keynote
 
Blockchain on the oracle cloud, the next big thing
Blockchain on the oracle cloud, the next big thingBlockchain on the oracle cloud, the next big thing
Blockchain on the oracle cloud, the next big thing
 
Block chain technology
Block chain technology Block chain technology
Block chain technology
 

Recently uploaded

Software Engineering - Introduction + Process Models + Requirements Engineering
Software Engineering - Introduction + Process Models + Requirements EngineeringSoftware Engineering - Introduction + Process Models + Requirements Engineering
Software Engineering - Introduction + Process Models + Requirements EngineeringPrakhyath Rai
 
Effective Strategies for Wix's Scaling challenges - GeeCon
Effective Strategies for Wix's Scaling challenges - GeeConEffective Strategies for Wix's Scaling challenges - GeeCon
Effective Strategies for Wix's Scaling challenges - GeeConNatan Silnitsky
 
Incident handling is a clearly defined set of procedures to manage and respon...
Incident handling is a clearly defined set of procedures to manage and respon...Incident handling is a clearly defined set of procedures to manage and respon...
Incident handling is a clearly defined set of procedures to manage and respon...Varun Mithran
 
Workshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit Milan
Workshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit MilanWorkshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit Milan
Workshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit MilanNeo4j
 
Encryption Recap: A Refresher on Key Concepts
Encryption Recap: A Refresher on Key ConceptsEncryption Recap: A Refresher on Key Concepts
Encryption Recap: A Refresher on Key Conceptsthomashtkim
 
Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024
Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024
Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024SimonedeGijt
 
Alluxio Monthly Webinar | Simplify Data Access for AI in Multi-Cloud
Alluxio Monthly Webinar | Simplify Data Access for AI in Multi-CloudAlluxio Monthly Webinar | Simplify Data Access for AI in Multi-Cloud
Alluxio Monthly Webinar | Simplify Data Access for AI in Multi-CloudAlluxio, Inc.
 
Automate your OpenSIPS config tests - OpenSIPS Summit 2024
Automate your OpenSIPS config tests - OpenSIPS Summit 2024Automate your OpenSIPS config tests - OpenSIPS Summit 2024
Automate your OpenSIPS config tests - OpenSIPS Summit 2024Andreas Granig
 
From Knowledge Graphs via Lego Bricks to scientific conversations.pptx
From Knowledge Graphs via Lego Bricks to scientific conversations.pptxFrom Knowledge Graphs via Lego Bricks to scientific conversations.pptx
From Knowledge Graphs via Lego Bricks to scientific conversations.pptxNeo4j
 
UNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale Ibrida
UNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale IbridaUNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale Ibrida
UNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale IbridaNeo4j
 
Navigation in flutter – how to add stack, tab, and drawer navigators to your ...
Navigation in flutter – how to add stack, tab, and drawer navigators to your ...Navigation in flutter – how to add stack, tab, and drawer navigators to your ...
Navigation in flutter – how to add stack, tab, and drawer navigators to your ...Flutter Agency
 
Transformer Neural Network Use Cases with Links
Transformer Neural Network Use Cases with LinksTransformer Neural Network Use Cases with Links
Transformer Neural Network Use Cases with LinksJinanKordab
 
Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024
Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024
Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024MulesoftMunichMeetup
 
COMPUTER AND ITS COMPONENTS PPT.by naitik sharma Class 9th A mittal internati...
COMPUTER AND ITS COMPONENTS PPT.by naitik sharma Class 9th A mittal internati...COMPUTER AND ITS COMPONENTS PPT.by naitik sharma Class 9th A mittal internati...
COMPUTER AND ITS COMPONENTS PPT.by naitik sharma Class 9th A mittal internati...naitiksharma1124
 
The Strategic Impact of Buying vs Building in Test Automation
The Strategic Impact of Buying vs Building in Test AutomationThe Strategic Impact of Buying vs Building in Test Automation
The Strategic Impact of Buying vs Building in Test AutomationElement34
 
Prompt Engineering - an Art, a Science, or your next Job Title?
Prompt Engineering - an Art, a Science, or your next Job Title?Prompt Engineering - an Art, a Science, or your next Job Title?
Prompt Engineering - an Art, a Science, or your next Job Title?Maxim Salnikov
 
Novo Nordisk: When Knowledge Graphs meet LLMs
Novo Nordisk: When Knowledge Graphs meet LLMsNovo Nordisk: When Knowledge Graphs meet LLMs
Novo Nordisk: When Knowledge Graphs meet LLMsNeo4j
 
From Theory to Practice: Utilizing SpiraPlan's REST API
From Theory to Practice: Utilizing SpiraPlan's REST APIFrom Theory to Practice: Utilizing SpiraPlan's REST API
From Theory to Practice: Utilizing SpiraPlan's REST APIInflectra
 
A Deep Dive into Secure Product Development Frameworks.pdf
A Deep Dive into Secure Product Development Frameworks.pdfA Deep Dive into Secure Product Development Frameworks.pdf
A Deep Dive into Secure Product Development Frameworks.pdfICS
 

Recently uploaded (20)

Abortion Pill Prices Germiston ](+27832195400*)[ 🏥 Women's Abortion Clinic in...
Abortion Pill Prices Germiston ](+27832195400*)[ 🏥 Women's Abortion Clinic in...Abortion Pill Prices Germiston ](+27832195400*)[ 🏥 Women's Abortion Clinic in...
Abortion Pill Prices Germiston ](+27832195400*)[ 🏥 Women's Abortion Clinic in...
 
Software Engineering - Introduction + Process Models + Requirements Engineering
Software Engineering - Introduction + Process Models + Requirements EngineeringSoftware Engineering - Introduction + Process Models + Requirements Engineering
Software Engineering - Introduction + Process Models + Requirements Engineering
 
Effective Strategies for Wix's Scaling challenges - GeeCon
Effective Strategies for Wix's Scaling challenges - GeeConEffective Strategies for Wix's Scaling challenges - GeeCon
Effective Strategies for Wix's Scaling challenges - GeeCon
 
Incident handling is a clearly defined set of procedures to manage and respon...
Incident handling is a clearly defined set of procedures to manage and respon...Incident handling is a clearly defined set of procedures to manage and respon...
Incident handling is a clearly defined set of procedures to manage and respon...
 
Workshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit Milan
Workshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit MilanWorkshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit Milan
Workshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit Milan
 
Encryption Recap: A Refresher on Key Concepts
Encryption Recap: A Refresher on Key ConceptsEncryption Recap: A Refresher on Key Concepts
Encryption Recap: A Refresher on Key Concepts
 
Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024
Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024
Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024
 
Alluxio Monthly Webinar | Simplify Data Access for AI in Multi-Cloud
Alluxio Monthly Webinar | Simplify Data Access for AI in Multi-CloudAlluxio Monthly Webinar | Simplify Data Access for AI in Multi-Cloud
Alluxio Monthly Webinar | Simplify Data Access for AI in Multi-Cloud
 
Automate your OpenSIPS config tests - OpenSIPS Summit 2024
Automate your OpenSIPS config tests - OpenSIPS Summit 2024Automate your OpenSIPS config tests - OpenSIPS Summit 2024
Automate your OpenSIPS config tests - OpenSIPS Summit 2024
 
From Knowledge Graphs via Lego Bricks to scientific conversations.pptx
From Knowledge Graphs via Lego Bricks to scientific conversations.pptxFrom Knowledge Graphs via Lego Bricks to scientific conversations.pptx
From Knowledge Graphs via Lego Bricks to scientific conversations.pptx
 
UNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale Ibrida
UNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale IbridaUNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale Ibrida
UNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale Ibrida
 
Navigation in flutter – how to add stack, tab, and drawer navigators to your ...
Navigation in flutter – how to add stack, tab, and drawer navigators to your ...Navigation in flutter – how to add stack, tab, and drawer navigators to your ...
Navigation in flutter – how to add stack, tab, and drawer navigators to your ...
 
Transformer Neural Network Use Cases with Links
Transformer Neural Network Use Cases with LinksTransformer Neural Network Use Cases with Links
Transformer Neural Network Use Cases with Links
 
Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024
Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024
Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024
 
COMPUTER AND ITS COMPONENTS PPT.by naitik sharma Class 9th A mittal internati...
COMPUTER AND ITS COMPONENTS PPT.by naitik sharma Class 9th A mittal internati...COMPUTER AND ITS COMPONENTS PPT.by naitik sharma Class 9th A mittal internati...
COMPUTER AND ITS COMPONENTS PPT.by naitik sharma Class 9th A mittal internati...
 
The Strategic Impact of Buying vs Building in Test Automation
The Strategic Impact of Buying vs Building in Test AutomationThe Strategic Impact of Buying vs Building in Test Automation
The Strategic Impact of Buying vs Building in Test Automation
 
Prompt Engineering - an Art, a Science, or your next Job Title?
Prompt Engineering - an Art, a Science, or your next Job Title?Prompt Engineering - an Art, a Science, or your next Job Title?
Prompt Engineering - an Art, a Science, or your next Job Title?
 
Novo Nordisk: When Knowledge Graphs meet LLMs
Novo Nordisk: When Knowledge Graphs meet LLMsNovo Nordisk: When Knowledge Graphs meet LLMs
Novo Nordisk: When Knowledge Graphs meet LLMs
 
From Theory to Practice: Utilizing SpiraPlan's REST API
From Theory to Practice: Utilizing SpiraPlan's REST APIFrom Theory to Practice: Utilizing SpiraPlan's REST API
From Theory to Practice: Utilizing SpiraPlan's REST API
 
A Deep Dive into Secure Product Development Frameworks.pdf
A Deep Dive into Secure Product Development Frameworks.pdfA Deep Dive into Secure Product Development Frameworks.pdf
A Deep Dive into Secure Product Development Frameworks.pdf
 

How to Develop a Distributed App on Ethereum

  • 1. HOW TO DEVELOP A DISTRIBUTED APP ON ETHEREUM MARCO OTTOLINI – HERAKLION – 17 OCTOBER 2018
  • 2. WHO AM I • Hacker since 1980 • Tech Journalist • Startupper • Running summer internships in Heraklion since 2012 • Fell in love with Blockchain (Ethereum) since 2016
  • 4. WHY THE BLOCKCHAIN? • HYPE: after Dec ‘17 Cryptos surge and fall • SCAM: most of ICOs are scam (https://goo.gl/vgmh8w) • BUSINESS: nobody really using it • WHY USE IT: everything could be done with a ”normal” system Blockchain technology is the fuel of what will be remembered as “New World”, in the same way as Internet was what powered the “New Economy” 20
  • 5. WHAT A BLOCKCHAIN IS? • It’s a Distributed Ledger (DLT) • It’s NOT a Distributed Database: • OK Insert and Retrieve • NOT OK Delete and Update • It’s immutable • It’s public • It’s secure by definition
  • 6. WHAT A DISTRIBUTED APP IS? Software application that is stored on cloud computing platforms, that run on multiple systems simultaneously, is accessible everywhere, is fault tolerant and can scale up automatically
  • 7. Java VM Hosted in a Linux Box WHAT A DISTRIBUTED APP IS? Java Class Spring API
  • 8. WHAT A DISTRIBUTED APP IS? Java VM Hosted in a Linux Box Java Class Spring API Java VM Hosted in a Linux Box Java Class Spring API Java VM Hosted in a Linux Box Java Class Spring API Load Balancer DB DB • Management • Backup • Monitoring • Auto-Scaling
  • 9. ETHEREUM VIRTUAL MACHINE • Quasi touring complete machine • EVM bytecodes • Gas • Gas price • Accounts • External (private key) • Contract Ethereum VM Ethereum Contract
  • 10. WHAT A DISTRIBUTED APP IS? Java VM Hosted in a Linux Box Java Class Spring API Java VM Hosted in a Linux Box Java Class Spring API Java VM Hosted in a Linux Box Java Class Spring API Load Balancer DB DB • Management • Backup • Monitoring • Auto-Scaling Ethereum VM Ethereum Contract
  • 11. WHAT AN ACCOUNT IS? • It’s a hash “created” by a private key • Key pairs are “generated” from a 12 words phrase: witch collapse practice feed shame open despair creek road again ice least • Transactions and balance related to an account are kept on the blockchain Private Key Account Account Account Blockchain Transaction
  • 12. INTRODUCTION TO REMIX • Ethereum Solidity IDE in a browser (Like jsfiddle for javascript) • Open it from http://remix.ethereum.org
  • 13. HELLO WORLD! pragma solidity ^0.4.25 contract Hello { string hello; constructor () public { hello = "Hello World!"; } function getHello() public view returns (string){ return hello; } }
  • 14. HELLO WORLD ON “REAL” ETHEREUM • Use Metamask to “connect” to ethereum • Deploy the contract to a testnet (rinkeby) • See it on Etherscan (https://rinkeby.etherscan.io/) • We have a real distributed app!
  • 15. INTRODUCTION TO METAMASK • It is an Ethereum wallet for a browser • Take it from https://metamask.io/ • It manages wallet (address) creation and private key storage
  • 16. YOUR FIRST DISTRIBUTED APP - TICKETING Event Manager Ticket Buyer Event Creates the Event Buys a ticket Ticket Owns a ticket Receives money for ticket sale
  • 17. TICKETING • Two contracts • Event • Ticket • Two actors • Manager • Buyer(s) PHASES 1. Create an Event 2. Buy a Ticket 3. Enforce security 4. Enable payment 5. Emit events 6. Ticket burning https://github.com/mottolini/hack-session-181017
  • 18. THANK YOU • marco@ottolini.com • https://www.linkedin.com/in/ottolini/

Editor's Notes

  1. https://www.mycryptopedia.com/ethereum-virtual-machine-explained/