CS/IT1230
EMERGING TECHNOLOGIES
Blockchain
Introduction
• Do you have a mobile phone?
• How much do you know about the different wireless
communication protocols that are used to send and receive data?
• How much do you know about electromagnetic waves that are the
foundation of mobile communication?
• Well, most of us do not know very much about these details
because it is not necessary to know them in order to use a mobile
phone and most of us do not have the time to learn about them.
• We mentally separate the mobile phone into the parts we need to
know and the parts that can be ignored or taken for granted.
Introduction
• Layers of a Software System
• The following two ways of partitioning a system are used
– Application vs. implementation
– Functional vs. nonfunctional aspects
• The application layer focuses on the user’s needs, while the implementation layer
focuses on making things happen.
• Functional aspects focus on what is done, while nonfunctional aspects focus on
how things are done.
Introduction
• Examples of functional aspects are sending data over a network,
playing music, taking photos, and manipulating individual pixels of a
picture.
• Examples of nonfunctional aspects are a beautiful graphical user
interface, fast-running software, and an ability to keep user data
private and save.
• Other important nonfunctional aspects of a system are security and
integrity.
• Integrity means that a system behaves as intended, and it involves
many aspects such as security and correctness.
• Most software failures, such as losses of data, illogical behavior, or
strangers accessing one’s private data, are the result of violated
system integrity.
Integrity
• Integrity is an important nonfunctional aspect of any software
system. It has three major components
1. Data integrity: The data used and maintained by the system are
complete, correct, and free of contradictions.
2. Behavioral integrity: The system behaves as intended and it is free
of logical errors.
3. Security: The system is able to restrict access to its data and
functionality to authorized users only.
• Most of us may take integrity of software systems for granted because companies
take a lot of time and effort to achieve it.
• But our feelings may change as soon as we interact with a system that fails to do
so
• Most software failures, such as losses of data, illogical behavior, or strangers
accessing one’s private data, are the result of violated system integrity.
Introduction
• Now let’s take a car…
• Two cars that look identical from the outside can differ dramatically with respect
to the power of their engines and hence have very different driving performance.
• Additionally, your choice of the engine will have an impact on other
characteristics of the car, like its price, its operational costs, the type of fuel
consumed, the exhaust system, and the dimensions of the brakes.
• A payment System
Two Types of Software Architecture
• There are many ways to implement software systems.
• However, one of the fundamental decisions when implementing a system
concerns its architecture, the way in which its components are organized and
related to one another
• The two major architectural approaches for software systems are centralized and
distributed.
• In centralized software systems, the components are located around and
connected with one central component.
• In contrast, the components of distributed systems form a network of connected
components without having any central element of coordination or control.
• Distributed - none of the components is directly connected with all other
components. However, all components are connected with one another at least
indirectly.
• Central - The components are not connected
with one another directly. They only have one
direct connection to the central component.
Two Types of Software Architecture
Read on the advantages and disadvantages on pages 12 to 14 of the book
Advantages of Distributed Disadvantages of Distributed
Systems Systems
• Higher computing power • Coordination overhead
• Cost reduction • Communication overhead
• Higher reliability • Dependency on networks
• Ability to grow naturally • Higher program complexity
• Security issues
• Hybrid
Identifying Distributed Systems
• A distributed system consists of a number of independent computers that
cooperate with one another by using a communication medium in order to
achieve a specific objective without having any centralized element of control or
coordination.
• As a rule of thumb, one can state that as soon as a system has a single
component that could bring down the whole system it is not distributed,
regardless of how complex its architecture looks.
• When designing a software system, one can choose which architectural style will
be used, similar to choosing an engine for a car.
• The architectural decision can be done independently from the functional
aspects of the application layer.
• As a result, one can create distributed as well as centralized systems with identical
functionality on the application layer.
• The architecture is only a means to an end when it comes to implementing a
system.
The Purpose of Blockchain
• Hence, a payment system, can be implemented as a distributed or centralized
system.
• Each of the two architectural concepts has its own advantages and disadvantages
and their own specific way of doing things.
• Choosing a specific architecture has consequences on how you will achieve the
functional and nonfunctional aspects of a system.
• In particular, both architectural concepts have very different approaches to
ensure integrity.
• And this is the point where the blockchain enters the picture.
• The blockchain is part of the implementation layer of a distributed
software system.
• The purpose of the blockchain is to ensure a specific nonfunctional aspect
of a distributed software system that is: achieving and maintaining its
integrity.
The potential of peer to peer systems.
• When was the last time you used a CD?
• The digitalization of music, the availability of recording equipment
at affordable prices, the growing spread of privately used PCs, and
the emergence of the Internet made music studios dispensable.
• Peer-to-peer systems (Napster, torrents, etc.. ) have the potential to
reshape whole industries based on a simple idea: replacing the
middleman with peer-to-peer interactions.
• In the case of the music industry, the traditional studios and their
marketing and distribution channels that acted as the middlemen
between artists and consumers have been replaced by peer to- peer
file sharing systems.
The potential of peer to peer systems.
• Let’s looks at banks… a middleman between natural suppliers and
customers.
• In a peer-to-peer system, the same transfer would be much simpler and it
would take less time and costs since it could be processed as what it is: a
transfer of bits and bytes between two peers or nodes, respectively.
• Replacing the middleman is also called disintermediation. It is considered
a serious threat to many business and companies that mainly act as
intermediaries between different groups of people, such as buyers and
seller, borrowers and lenders, or producers and consumers.
The potential of peer to peer systems.
• Peer-to-peer systems are distributed software systems that consist of
nodes (individual computers), which make their computational resources
(e.g., processing power, storage capacity, or information distribution)
directly available to another.
• When joining a peer-to-peer system, users turn their computers into
nodes of the system that are equal concerning their rights and roles.
• Although users may differ with respect to the resources they contribute,
all the nodes in the system have the same functional capability and
responsibility. Hence, the computers of all users are both suppliers and
consumers of resources.
• The advantage of peer-to-peer systems over centralized systems is that
direct interactions occur between contractual partners instead of indirect
interactions through a middleman, hence, there is less processing time
and lower costs
• .
Architecture of Peer-to-Peer Systems
• Peer-to-peer systems are distributed computer systems by
construction since they are made of individual nodes that share
their computational resources among others.
• However, there are also peer-to-peer systems that still utilize
elements of centralization.
• Centralized peer-to-peer systems maintain central nodes to facilitate
the interaction between peers, to maintain directories that describe
the services offered by the peer nodes, or to perform look-ups and
identification of the nodes. Centralized peer-to-peer systems
typically utilize a hybrid architecture
The Potential of the Blockchain
• Herd Cats? Video https://www.youtube.com/watch?v=sK73PDwMel4
• There is the problem of trying to organize a group of individuals who do
not accept or recognize central authority
• A purely distributed peer-to-peer system consists of individual and
independent nodes without having any kind of central control or
coordination.
• In a peer to peer system, how is integrity maintained?
• The value of the blockchain is the environment it provides with
relation to trust, integrity, and the management of ownership.
• The relation between purely distributed peer-to-peer systems to the
blockchain is that the former uses the latter as a tool to achieve and
maintain integrity. Purely distributed peer-to-peer systems may use the
blockchain in order to achieve and to maintain system integrity.
Trust and Integrity in Peer-to-Peer Systems
• Trust and integrity are two sides of the same coin.
• In the context of software systems, integrity is a nonfunctional aspect of a system
to be safe, complete, consistent, correct, and free of corruption and errors.
• Trust is also the firm belief of humans in the reliability, truth, or ability of
someone or something without evidence, proof, or investigation.
• Trust is given in advance and will increase or decline based on the results of
interactions on an ongoing basis.
• With respect to peer-to-peer systems, this means that people will join and
continue to contribute to a system if they trust it and if the results of interacting
with the system on an ongoing basis confirm and reinforce their trust.
• Integrity of the system is needed in order to fulfill the expectations of the users
and reinforce their trust in the system.
• If the trust of the users is not reinforced by the system due to a lack of integrity,
the users will abandon the system, which, as a result, will eventually cause it to
terminate.
Trust and Integrity in Peer-to-Peer Systems
• How do we achieve and maintain integrity in a purely distributed peer-to-
peer system?
• Achieving and maintaining integrity in purely distributed systems depends
on a variety of factors, some of the most important are:
1. Knowledge about the number of nodes or peers
2. Knowledge about the trustworthiness of the peers
• The chances of achieving integrity in a distributed peer-to-peer system are
higher if the number of nodes as well as their trustworthiness is known.
• This situation is comparable to running a private club that adheres to high
moral standards and utilizes a rigorous on-boarding process for new
members.
• However, the worst circumstances for achieving integrity in a distributed
peer-to-peer system are given when the number of nodes and their
trustworthiness is unknown. This is the case when running a purely
distributed peer-to-peer system on the Internet that is open to everyone.
Integrity Threats in Peer-to-Peer Systems
• For simplicity, one can consider two major integrity threats in peer-to-
peer systems:
• Technical failures
– Peer-to-peer systems are comprised of the individual computers of its users
who communicate via a network. All hardware and software components of a
computer system as well as any component of a computer network have the
immanent risk of failing or creating errors. Hence, any distributed system has
to face the problem that its components may fail or may produce wrong
results by chance.
• Malicious peers
– This source of untrustworthiness is not a technical problem, but rather a
problem caused by the goals of the individuals who decide to exploit the
system for their own purposes. This threat is more related to sociology and
group dynamics than to technology. Dishonest and malicious peers comprise
the most severe threat to the peer-to-peer system, because they attack the
foundation on which any peer-to-peer system is built: trust.
Integrity Threats in Peer-to-Peer Systems
– As soon as users can no longer trust their peers, they will turn away and stop
contributing computational resources to the system.
– Hence, the number of members will decline and the whole system will
become less attractive to the remaining members, which in turn will
accelerate the decline of the system that eventually will be abandoned
completely.
The core Problem to Be Solved by the
Blockchain
• Achieving integrity and trust in the best of all conditions is easy.
• The real challenge is to achieve integrity and trust in a distributed
system in the worst of all conditions.
• And this is the problem that the blockchain is supposed to solve.
• The core problem to be solved by the blockchain is achieving and
maintaining integrity in a purely distributed peer-to-peer system
that consists of an unknown number of peers with unknown
reliability and trustworthiness.
• This problem is not a new one.
• It is actually a well-known and widely discussed problem in
computer science.
• By utilizing a metaphor from the military, the problem is widely
regarded as the Byzantine general problem. (video)
• https://www.youtube.com/watch?v=dfsRQyYXOsQ
Four ways to define the blockchain
• The term blockchain is used as follows:
– As a name for a data structure
– As a name for an algorithm
– As a name for a suite of technologies
– As an umbrella term for purely distributed peer-to-peer
systems with a common application area
Blockchain – A Data Structure
• In computer science and software engineering, a data structure is a way to
organize data regardless of their concrete informational content.
• E.g. in terms of a floor plan for a building in architecture. A floor plan for a
building addresses separating and connecting space with walls, floors, and stairs
regardless of their concrete usage.
• When used as a name for a data structure, blockchain refers to data put together
into units called blocks. One can think of these blocks much like pages in a book.
These blocks are connected to one another like a chain, hence the name
blockchain. In relation to a book, the words and sentences are the information to
be stored. They are written on different pages instead of being written on a large
spool. The pages are connected with one another via their position in the book
and via the page numbers.
• You can determine if someone removed a page from the book by checking
whether the page numbers continue without leaving out a number.
• Furthermore, the information on the pages as well as the pages within the book
are ordered. The ordering is an important detail, which will be used extensively.
Additionally, the chaining of the data blocks in the data structure is achieved by
using a very special numbering system, which differs from the page numbering in
ordinary books.
Blockchain - An Algorithm
• In software engineering, the term algorithm refers to a sequence of
instructions to be completed by a computer.
• These instructions often involve data structures.
• When used as a name for an algorithm, blockchain refers to a
sequence of instructions that negotiates the informational content
of many blockchain-data-structures in a purely distributed peer-to-
peer system, similar to a democratic voting schema.
Blockchain - A Suite of Technologies
• When used to refer to a suite of technologies, blockchain refers to a
combination of the blockchain-data-structure, the blockchain-
algorithm, as well as cryptographic and security technologies that
combined can be used to achieve integrity in purely distributed
peer-to-peer systems, regardless of the application goal.
• An Umbrella Term for Purely Distributed Peer-to-Peer
Systems with a Common Application Area
• Blockchain can also be used as an umbrella term for purely
distributed peer-to-peer systems of ledgers that utilize the
blockchain-technology-suite. Note: that in this context blockchain
refers to a purely distributed system as a whole instead of referring
to a software unit that is part of a purely distributed system.
Blockchain - Provisional Distribution
• The blockchain is a purely distributed peer-to-peer system of ledgers
that utilizes a software unit that consist of an algorithm, which
negotiates the informational content of ordered and connected
blocks of data together with cryptographic and security technologies
in order to achieve and maintain its integrity.
• Managing and clarifying ownership is the most prominent
• application case of the blockchain but is not the only one.