Intro to Ethereum Dapps - YouTube

Channel: unknown

[5]
- [Narrator] In this lesson, we'll learn about building
[8]
decentralized applications or Dapps.
[11]
But first, let's take a minute
[12]
to appreciate the difference between Dapps
[15]
and regular web applications.
[17]
In traditional web application architecture,
[20]
there is a Front End client, and a Backend server.
[24]
The Front End is written using HTML, CSS, JavaScript,
[28]
and the backend is written in a framework
[30]
of your choice like Rails, Node, or Django.
[34]
The Front and Backend interact with each other
[36]
by sending JSON messages over HTTP.
[40]
There is typically a hosting service involved
[42]
where your Backend is running like AWS.
[46]
With decentralized applications,
[48]
there's also a Front End client and a Backend server.
[51]
The Front End is written using the same
[53]
HTML, CSS, JavaScript, but for the Backend
[57]
we would use a block chain like Ethereum.
[60]
The Front and Backend would still be interacting
[63]
with each other using JSON messages.
[65]
This architecture is a bit oversimplified,
[68]
but the point is that the end user will not
[70]
be able to tell whether they are interacting
[73]
with a Dapp or any other regular web app.
[76]
The change would be invisible and in the background.
[80]
The traditional client server architecture
[81]
is so common that it's rarely revisited.
[84]
Should we still be building apps this way
[87]
knowing everything we know now?
[89]
Let's take a look at some of the issues
[91]
with the traditional client server architecture.
[94]
The first issue is that your server
[96]
is running on a Centralized Hosting Service
[99]
who you outsourced your hosting needs to.
[102]
As more and more people around the world
[104]
use the same popular hosting service,
[106]
it becomes a bigger single point
[109]
of failure for the entire internet.
[111]
Think about it, to take down all the sites
[114]
that are running their Backend
[115]
on this popular hosting service,
[117]
all you have to do is disrupt this one provider's
[121]
infrastructure in order to take down
[123]
potentially half the Internet.
[125]
This isn't a very resilient architecture for the web.
[129]
It's also an increasing amount of pressure
[131]
on a singular organization, to expect them to build
[134]
and maintain all this infrastructure
[138]
for the entire world.
[139]
Centralized servers are also easy to censor and control.
[143]
Taking down a web application is as simple
[146]
as removing it from the centralized server.
[149]
This can happen at the state level
[150]
where government agencies request hosting providers
[154]
to take down certain websites
[155]
they may not like or agree with.
[158]
But if your application was running everywhere,
[161]
taking it down would not be as straight forward.
[164]
To censor a block chain application,
[166]
you would have to take down all
[168]
the networks nodes simultaneously.
[171]
The Ethereum block chain currently has
[172]
over 25,000 nodes spread around the world.
[177]
When we increasingly rely on centralized services,
[181]
we create honeypots of data for attackers.
[184]
We've seen this time and time again with various hacks.
[188]
The most recent being the Equifax hack.
[191]
Equifax is a centralized credit reporting service
[194]
and they were responsible for maintaining
[196]
millions of users personal credit information
[200]
including their social security numbers.
[202]
Millions of people put their trust in this one organization
[206]
to keep their data safe from getting into the wrong hands.
[209]
As a potential attacker, it's very lucrative
[212]
to hit just one database and get access
[215]
to millions of people's sensitive data,
[218]
that you could then use to open credit cards, for example.
[221]
With the decentralized database, like a block chain
[224]
data attacks are not as trivial
[226]
as getting access to a single database.
[230]
Another issue with the traditional client server
[232]
architecture is that of data integrity.
[235]
Along with your Backend server,
[237]
the database powering your application
[240]
is also likely running on the same hosting service.
[243]
Assuming you trust your hosting provider
[245]
a hundred percent this isn't an issue.
[248]
But how can you be sure?
[250]
What's stopping an unauthorized employee
[253]
at the hosting service from making changes
[255]
to the data in your database?
[258]
And what if your database contained people's
[260]
sensitive information like their bank account balances?
[264]
That's an awful lot of trust to put into
[266]
any single organization with the most valuable
[269]
part of your application, which is your data.
[273]
In fact, data is so valuable that many companies
[277]
are built on the very premise of selling your data.
[281]
They do this by creating a centralized website
[283]
for users to interact with by either posting photos
[287]
or entering search words.
[290]
They record your interactions to a database,
[292]
and then sell your interaction data to advertisers
[295]
for lots of money without your knowledge or consent.
[299]
Think about that.
[300]
All the data that is generated by everyone in the world
[303]
is monetized by only a handful of companies.
[307]
With decentralized applications,
[309]
users can regain control of their data
[312]
and decide for themselves whether to monetize it
[315]
by choosing to sell to advertisers or not,
[318]
and they get to keep the money, not some other company.
[323]
Protecting from data failure is another issue.
[326]
Unless you are making the extra effort
[328]
to create backups and replicas of your database,
[331]
there is no guarantee of surviving catastrophic failures.
[335]
Everyone running a database with their application
[338]
has to take on the responsibility
[340]
of backing it up as well.
[342]
There is no standardized process for creating these backups
[346]
and some organizations may not even create backups.
[350]
Some may even mishandle the backups
[352]
and place them in a vulnerable place
[354]
for attackers to take advantage of.
[356]
With the block chain, everything is publicly readable
[359]
and redundantly copied to various nodes of the network
[363]
ensuring that the data is never lost.
[366]
Even if a certain number of nodes go down,
[368]
the database can still continue to work.
[371]
All this isn't to say that block chain applications
[375]
are the silver bullet to all the webs problems,
[378]
since they do come with their own limitations
[380]
which we'll explore in the coming lessons.
[383]
But block chain applications do provide
[385]
a new level of baseline guarantees
[388]
that aren't found in other popular systems,
[391]
like superior fault tolerance and trustless execution.
[395]
In this context, trustless execution means
[398]
not having to trust any person or organization
[401]
to execute your code as your wrote it.
[404]
We can use cryptography or math
[407]
to provide a guarantee of the execution of your code.
[411]
Now that we understand some of the unique benefits
[414]
of writing block chain applications,
[416]
we'll build a simple block chain
[418]
Explorer Dapp in our next video.
[420]
Thanks for watching and see ya next time.