Intro to Ethereum Dapps

– [Narrator] In this lesson,
we’ll learn about building
decentralized applications or Dapps.
But first, let’s take a minute
to appreciate the difference between Dapps
and regular web applications.
In traditional web
application architecture,
there is a Front End client,
and a Backend server.
The Front End is written
using HTML, CSS, JavaScript,
and the backend is written in a framework
of your choice like
Rails, Node, or Django.
The Front and Backend
interact with each other
by sending JSON messages over HTTP.
There is typically a
hosting service involved
where your Backend is running like AWS.
With decentralized applications,
there’s also a Front End
client and a Backend server.
The Front End is written using the same
HTML, CSS, JavaScript, but for the Backend
we would use a block chain like Ethereum.
The Front and Backend
would still be interacting
with each other using JSON messages.
This architecture is a bit oversimplified,
but the point is that
the end user will not
be able to tell whether
they are interacting
with a Dapp or any other regular web app.
The change would be invisible
and in the background.
The traditional client server architecture
is so common that it’s rarely revisited.
Should we still be building apps this way
knowing everything we know now?
Let’s take a look at some of the issues
with the traditional
client server architecture.
The first issue is that your server
is running on a
Centralized Hosting Service
who you outsourced your hosting needs to.
As more and more people around the world
use the same popular hosting service,
it becomes a bigger single point
of failure for the entire internet.
Think about it, to take down all the sites
that are running their Backend
on this popular hosting service,
all you have to do is
disrupt this one provider’s
infrastructure in order to take down
potentially half the Internet.
This isn’t a very resilient
architecture for the web.
It’s also an increasing amount of pressure
on a singular organization,
to expect them to build
and maintain all this infrastructure
for the entire world.
Centralized servers are also
easy to censor and control.
Taking down a web application is as simple
as removing it from
the centralized server.
This can happen at the state level
where government agencies
request hosting providers
to take down certain websites
they may not like or agree with.
But if your application
was running everywhere,
taking it down would not
be as straight forward.
To censor a block chain application,
you would have to take down all
the networks nodes simultaneously.
The Ethereum block chain currently has
over 25,000 nodes spread around the world.
When we increasingly rely
on centralized services,
we create honeypots of data for attackers.
We’ve seen this time and time
again with various hacks.
The most recent being the Equifax hack.
Equifax is a centralized
credit reporting service
and they were responsible for maintaining
millions of users personal
credit information
including their social security numbers.
Millions of people put their
trust in this one organization
to keep their data safe from
getting into the wrong hands.
As a potential attacker,
it’s very lucrative
to hit just one database and get access
to millions of people’s sensitive data,
that you could then use to
open credit cards, for example.
With the decentralized
database, like a block chain
data attacks are not as trivial
as getting access to a single database.
Another issue with the
traditional client server
architecture is that of data integrity.
Along with your Backend server,
the database powering your application
is also likely running on
the same hosting service.
Assuming you trust your hosting provider
a hundred percent this isn’t an issue.
But how can you be sure?
What’s stopping an unauthorized employee
at the hosting service from making changes
to the data in your database?
And what if your database
contained people’s
sensitive information like
their bank account balances?
That’s an awful lot of trust to put into
any single organization
with the most valuable
part of your application,
which is your data.
In fact, data is so
valuable that many companies
are built on the very
premise of selling your data.
They do this by creating
a centralized website
for users to interact with
by either posting photos
or entering search words.
They record your
interactions to a database,
and then sell your interaction
data to advertisers
for lots of money without
your knowledge or consent.
Think about that.
All the data that is generated
by everyone in the world
is monetized by only a
handful of companies.
With decentralized applications,
users can regain control of their data
and decide for themselves
whether to monetize it
by choosing to sell to advertisers or not,
and they get to keep the
money, not some other company.
Protecting from data
failure is another issue.
Unless you are making the extra effort
to create backups and
replicas of your database,
there is no guarantee of
surviving catastrophic failures.
Everyone running a database
with their application
has to take on the responsibility
of backing it up as well.
There is no standardized process
for creating these backups
and some organizations may
not even create backups.
Some may even mishandle the backups
and place them in a vulnerable place
for attackers to take advantage of.
With the block chain,
everything is publicly readable
and redundantly copied to
various nodes of the network
ensuring that the data is never lost.
Even if a certain number of nodes go down,
the database can still continue to work.
All this isn’t to say that
block chain applications
are the silver bullet to
all the webs problems,
since they do come with
their own limitations
which we’ll explore in the coming lessons.
But block chain applications do provide
a new level of baseline guarantees
that aren’t found in
other popular systems,
like superior fault tolerance
and trustless execution.
In this context, trustless execution means
not having to trust any
person or organization
to execute your code as your wrote it.
We can use cryptography or math
to provide a guarantee of
the execution of your code.
Now that we understand
some of the unique benefits
of writing block chain applications,
we’ll build a simple block chain
Explorer Dapp in our next video.
Thanks for watching and see ya next time.

Add a Comment

Your email address will not be published. Required fields are marked *