Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Learn how to build decentralized and serverless html5 applications with embark js, ethereum, dat and ipfs

21 views

Published on

Codemotion, Rome 13/04/2018

Do you have an idea for a startup and don't want to pay for scaling it up? Forget about bandwidth problems, servers to install and pay for, with the power of IPFS, DAT and the blockchain.
In this talk, we will explore how to build an HTML5 DAPP (distributed application) with EmbarkJS, and figure out how to rethink servers, storage, messaging, data and payments in a distributed and decentralised way with the help of Ethereum's smart contracts, IPFS and DAT distributed storage.

Discover more at http://blog.zigolab.it

Published in: Internet
  • Be the first to comment

  • Be the first to like this

Learn how to build decentralized and serverless html5 applications with embark js, ethereum, dat and ipfs

  1. 1. LEARN HOW TO BUILD 
 DECENTRALIZED AND SERVERLESS 
 HTML5 APPLICATIONS 
 WITH EMBARKJS, ETHEREUM, DAT AND IPFS April 13th 2018 – Codemotion, Rome A l e s s a n d r o C o n f e t t i
  2. 2. 2 image from the work of Paul Baran, On Distributed Communications Networks 1964 Alessandro Confetti - April 13th 2018 – Codemotion, Rome
  3. 3. 3 Image from Evolving terminology with evolved technology: decentralized versus distributed December 4, 2015 Alessandro Confetti - April 13th 2018 – Codemotion, Rome
  4. 4. 4 Images from Evolving terminology pt. 2: topology vs ownership January 10, 2016 Alessandro Confetti - April 13th 2018 – Codemotion, Rome
  5. 5. 2014 AWS Lamba Elastic Function computing 2009 Node.js 2010 AKKA Asyncronous WWW 2004 AWS Elastic services 1993 CGI 1995 MySQL Dynamic WWW Static WWW 1990 HTTP/HTML From decentralised arpanet to… 5 Alessandro Confetti - April 13th 2018 – Codemotion, Rome 2017 worldwide (de)centralised serverless computing ARPANET 1984 DNS 1974 TCP 1969 Internet foundations
  6. 6. BigchainDB Blockchain based database 20162015 Ethereum Trustless (pure) P2P function computingDAT IPFS Pure P2P storage sevice 2013 20142011 Namecoin Blockchain based naming service 2009 Bitcoin Trustless pure P2P payment service Worldwide P2P network 1999 NAPSTER 2001 From usenet to… 6 2017 P2P computing Self-organised decentralised service USENET 1979 Alessandro Confetti - April 13th 2018 – Codemotion, Rome
  7. 7. AWS LAMBDA SERVERLESS COMPUTING 7 Image from AWS Lambda official page Alessandro Confetti - April 13th 2018 – Codemotion, Rome
  8. 8. WEB SERVER Storage 1990 STATIC WEB-SITE 8 CLIENT http Index.html Alessandro Confetti - April 13th 2018 – Codemotion, Rome
  9. 9. LOAD BALANCER WEB SERVER Storage WEB SERVER Storage 2000 STATIC WEB-SITE 9 CLIENT http Index.html Alessandro Confetti - April 13th 2018 – Codemotion, Rome
  10. 10. EU PROXY WEB SERVER Storage WEB SERVER Storage LOAD BALANCER 2017 STATIC WEB-SITE 10 CLIENT http Index.html …US WEB SERVER Storage WEB SERVER Storage LOAD BALANCER WEB SERVER Storage WEB SERVER Storage LOAD BALANCER Alessandro Confetti - April 13th 2018 – Codemotion, Rome
  11. 11. P2P SERVERLESS COMPUTING 11 ???? Alessandro Confetti - April 13th 2018 – Codemotion, Rome
  12. 12. 12 Alessandro Confetti - April 13th 2018 – Codemotion, Rome
  13. 13. Block 1Block … Block 2 Block 4 ipfs 2017 IPFS STATIC WEB-SITE 13 CLIENT IPFS NODE IPFS NODE IPFS NODE IPFS NODE Storage HTTP/IPFS 
 GATEWAY Storage Index.html block 1 block 4 block 7 block 2 block 5 block 8 block 3 block 6 block 9 Storage StorageStorage Index.html http ipfs Index.html Alessandro Confetti - April 13th 2018 – Codemotion, Rome
  14. 14. HOW TO INSTALL IPFS 14 wget https://dist.ipfs.io/go-ipfs/v0.4.14/go-ipfs_v0.4.14_linux-amd64.tar.gz tar -xvfz go-ipfs_v0.4.14_linux-amd64.tar.gz cd go-ipfs ./install.sh ipfs init ipfs daemon http://localhost:5001/webui Alessandro Confetti - April 13th 2018 – Codemotion, Rome
  15. 15. 15 Alessandro Confetti - April 13th 2018 – Codemotion, Rome
  16. 16. 16 Alessandro Confetti - April 13th 2018 – Codemotion, Rome
  17. 17. HOW TO INSTALL DAT 17 npm install -g dat mkdir MyData cd MyData dat create dat share —-http http://localhost:8080 Alessandro Confetti - April 13th 2018 – Codemotion, Rome
  18. 18. 18 Alessandro Confetti - April 13th 2018 – Codemotion, Rome
  19. 19. 19 Alessandro Confetti - April 13th 2018 – Codemotion, Rome
  20. 20. 20 Image and article about the left-pad incident from The Register Alessandro Confetti - April 13th 2018 – Codemotion, Rome
  21. 21. 21 STATIC HTTP SITE STATIC IPFS/DAT SITE Bandwidth costs and capacity 
 is upon the site Bandwidth costs and capacity 
 is upon the client proxies, load balancers, 
 clusters and zones must be 
 configured and maintained The P2P network is self-organising Censorship can be easily enforced 
 thought DNS and IP Filtering Content is resilient 
 to DSN and IP filtering 
 or deletion Alessandro Confetti - April 13th 2018 – Codemotion, Rome
  22. 22. 22 Alessandro Confetti - April 13th 2018 – Codemotion, Rome
  23. 23. P2P SERVERLESS COMPUTING 23 IPFS/DAT BLOCKCHAIN ETHEREUM Front-end code for weather app is hosted on IPFS or DAT Ethereum contract is executed on the EVM and returns data back to user (eventually storing data on the blockchain) The smart contract is triggered by the user or an external oracle Alessandro Confetti - April 13th 2018 – Codemotion, Rome
  24. 24. 24 Alessandro Confetti - April 13th 2018 – Codemotion, Rome
  25. 25. 25 Alessandro Confetti - April 13th 2018 – Codemotion, Rome
  26. 26. HOW TO INSTALL EMBARKJS 26 # install ethereum wget https://gethstore.blob.core.windows.net/builds/geth-darwin-amd64-1.6.0- facc47cb.tar.gz tar -xvfz geth-darwin-amd64-1.6.0-facc47cb.tar.gz sudo mv geth-darwin-amd64-1.6.0-facc47cb/geth /usr/local/bin/geth # install EmbarkJS sudo npm -g install embark embark demo # install compatible ipfs version inside demo folder mkdir demo/bin cd demo/bin wget https://dist.ipfs.io/go-ipfs/v0.4.11/go-ipfs_v0.4.11_darwin-amd64.tar.gz tar -xvfz go-ipfs_v0.4.11_darwin-amd64.tar.gz ./ipfs init Alessandro Confetti - April 13th 2018 – Codemotion, Rome
  27. 27. 27 (DE)CENTRALISED 
 SERVLESS COMPUTING DISTRIBUTED
 SERVLESS COMPUTING you don’t have to manage servers or services, 
 neither to worry how to scale or allocate them… 
 as long are you able to pay 
 or to cope with the provider’s rules you don’t have to manage servers or services, 
 neither to worry how to scale or allocate them… 
 but you can help build the network
 and been rewarded for it Trust is upon the the provider Trust is upon the network Resilience and scalability 
 through (de)centralised
 clustering, sharding, zoning… Resilience and scalability 
 through distributed networks Alessandro Confetti - April 13th 2018 – Codemotion, Rome
  28. 28. WE ARE HIRING IN ITALY! i n f o - i t @ t h o u g h t w o r k s . c o m TECNOLOGY RADAR VOL17 https://info.thoughtworks.com/technology-radar-subscription.html
  29. 29. $ tail -f questions 29 Alessandro Confetti aconfet@thoughtworks.com twitter @zigolab 
 blog http://blog.zigolab.it

×