2. My name is Adrià Batlle, I have been developing for
multiple startups and I am currently CEO at
LambdaLoopers.
LambdaLoopers is a technology company which
aims to be a technology booster for existing and new
companies.
We believe that improving the technological
landscape will dramatically increase the life quality
of the population.
Who am I?
On 2017 we have seen an increased interest by
companies of all sizes and sectors about
cryptocurrencies and their underlying technology:
the blockchain.
We have been working on several projects related to
cryptocurrencies, and today I would like to make a
brief introduction to the different technologies and
frameworks related to blockchain development.
3. What is a blockchain?
The basic definition of a blockchain from Wikipedia
is:
"an open, distributed ledger that can record
transactions between two parties efficiently and in a
verifiable and permanent way".
This means that we have a replicated log of all the
transactions that happened between the wallet
owners of a certain cryptocurrency.
This gives us a highly distributed infrastructure that
mainly serves the purpose of storing cryptocurrency
transactions, but can be used to solve a huge variety
of use cases.
Identity management, transaction processing,
provenance documentation, food traceability or
voting are the most obvious ones, but any peer to
peer application could be developed on that
infrastructure.
4. This concept has been popularized by the Ethereum
blockchain, which is the most popular programmable
blockchain.
Ethereum is a blockchain with it’s own programming
language (Solidity) and a virtual machine to execute
it (Ethereum Virtual Machine or EVM).
The programmable blockchain: Ethereum
The blockchain has the concept of “Account” which is
an object with state living on the EVM that
communicates with other Accounts through
messages.
This paradigm isn’t new, it’s called the Actor Model
and it has been the basis for the Erlang language
(technology behind Whatsapp) and the Akka
framework (the basis for modern distributed
infrastructure as Spark or Flink).
5. In Ethereum there are two types of Accounts:
Externally owned account: An account controlled by
a private key. This is the one that people uses to send
and receive Ether on a daily basis.
Contract: This one is the programmable one which
contains code and can be interacted through code.
The programmable blockchain: Ethereum
The execution of code on Ethereum starts with a
transaction from an Externally owned account to a
Contract which triggers the Contract’s code
execution.
When the Contract executes, it can in its turn send
messages to other Accounts, which will mean sending
Ether or executing remote code.
6. The ability to send messages containing code
execution or Ether transfers made Ethereum the
blockchain of reference for companies wanting to
create the next ICO.
Here is the “Hello World” code to create the most
basic token on Ethereum.
You can run this example on the Ethereum wallet, a
UI tool that allows you to manage Ethereum
Accounts.
The programmable blockchain: Ethereum
7. In order to work comfortably with Solidity smart
contracts, there is a framework which comes handy:
Truffle (http://truffleframework.com/)
With Truffle you can compile, link and deploy your
smart contracts with ease.
The programmable blockchain: Ethereum
It also allows you to test your contract behaviour on
the “test-network” and change to the production
ethereum network when your code is ready.
It also provides an interactive console to
communicate with your code real time, as well as an
easy way to manage your smart contract migrations.
9. There are another set of use cases or applications
that are totally unrelated to Ether or other
cryptocurrencies but that would find the Blockchain
distributed ledger concept very useful.
Hyperledger Fabric is a platform for distributed
ledger solutions, underpinned by a modular
architecture delivering high degrees of confidentiality,
resiliency, flexibility and scalability.
The programmable blockchain: Hyperledger Fabric
Basically it allows to the developers to create their
own custom blockchain with the business logic they
need in a tailored environment.
It is perfectly suited to create applications without a
central authority where the actors need to
communicate with each other and have control over
the system.
Traceability, part manufacturing, information sharing
are all valid use cases to create a fabric distributed
application called chaincode.
10. On a Fabric application, there are 3 core concepts:
- Participants: The actors of the business logic,
think of a distributor and a commerce.
- Assets: These are the entities that are traded,
created, modified or deleted by the application.
- Transactions: This is where the business logic
resides, as it is the set of actions available by
the application.
Those concepts are defined as .cto files.
The programmable blockchain: Hyperledger Fabric
Participants have a defined set of Access Control
Rules (ACL) so the application knows what
transactions can or can’t be done on certain Assets.
The Access Control Rules are defined on .acl files.
The Transactions definition can be written in
Javascript files .js, so the developers can easily start
coding on it.
Finally we have Query files .qry with some predefined
queries that can be executed by the participants.
11. In order to get an application done easily,
Hyperledger provides a tool called Composer which
is a web tool which helps with the development.
The programmable blockchain: Hyperledger Fabric
Hyperledger Composer is a full framework to create
applications for Fabric.
It comes with a lot of examples which you can tweak
and a graphical environment to execute and test
them.
It also help with the application bundling in a
Business Network Definition file .bna and deploy it to
your Hyperledger Blockchain.
12. Right now the cryptocurrency world is mostly based
on speculation, but the underlying technology is here
to stay.
Is our job as developers to extract the maximum
value of it and explore the technology to see how it
can improve society.
Conclusions
There are lots of tools and help available online to
create applications on the blockchain, so now it’s the
moment to explore and create.
Thanks for your time, I hope you learned a bit about
blockchain development possibilities!
QUESTIONS?