DEV Community

Cover image for dApps / Web3 - Help me finally understand / ELI5!
GrahamTheDev
GrahamTheDev

Posted on

dApps / Web3 - Help me finally understand / ELI5!

OK so I have read a few things about blockchain and dApps, I have listened to a few Twitter spaces and tried to educate myself on this.

But I am still not seeing the actual big picture, rather than a hype train and I want to understand it finally!

Crypto currencies make sense, NFTs kind of make sense (although the current "NFT points at a URL to prove ownership" model is flimsy at best) but dApps...they make no sense to me!

How do you get minimal latency lookups (like how does DNS work on such a complex network).

Why is it beneficial to have a distributed network where you don't control when the core "operating system" software updates and may be running different versions on different nodes.

How do you roll back a major mistake that exposes user data (for example) fast enough to avoid problems? And on the same track, if a node gets compromised in some way, who is responsible for the breach (my understanding is limited so this might be unlikely, I don't know!)

How is it better when it will inevitably result in more jumps and hops to data nodes, which won't be as efficient as large data centres and therefore use more energy.

Updating 10,000+ different data nodes rather than 6/7 CDNs seems like it is going to exponentially multiply data transmission data costs and energy costs.

All of these questions assume that "Gas prices" drop to next to nothing and it becomes commercially viable of course, which at the moment it certainly isn't.

Please, I may sound cynical, I am not really, I just don't see the Web3 benefits as clearly as everyone else apparently does!

Also if my terminology is crap, apologies, ask me if something doesn't make sense!

Discussion (21)

Collapse
ben profile image
Ben Halpern

Anybody who finds this topic interesting should check out metapunk

Collapse
grahamthedev profile image
GrahamTheDev Author

Thanks I will bookmark it for future reading, especially as it is powered by an amazing piece of software 😉!

Do you have any articles in your bookmarks list that might answer some of my dApps questions above though, as the information on stuff like that seems hard to find and there isn't anythink on metapunks yet that covers this as far as I can see from a quick look through the articles?

Collapse
ben profile image
Ben Halpern • Edited on

Paging @nickytonline @coffeecraftcode @leewynne , I think they could be a good ELI5 crowd, if any of y'all want to take a stab at the top questions.

Thread Thread
grahamthedev profile image
GrahamTheDev Author

Thanks Ben 👍

Thread Thread
nickytonline profile image
Nick Taylor • Edited on

There's some things I can answer, but I've dropped the blog post in the DAO I'm a part of to have someone more knowledgeable in the space chime in.

I liked the point in energy consumption, though I don't know if it will be that much more (I haven't researched that at all). Another interesting point is that the development process for dApps is quite crap (at least the last time I tried it), they are more complex than regular apps, they're slow and kinda complex to maintain.

As far as I know, everything is going the more energy efficient route opting for proof of stake instead of proof of work

Crypto currencies make sense, NFTs kind of make sense (although the current "NFT points at a URL to prove ownership" model is flimsy at best) but dApps...they make no sense to me!

Pointing to a URL is not the way to do it. You use something like IPFS or store it directly in the block e.g. an SVG in base64 data. I'm not positive if the base64 route is considered best practice though.

I do this in my sample project So Minty

So Minty

A Buildspace project where you learn to mint your own collection.

so-minty.mp4

Contributing

If you are interested in contributing to the project, first read our contributing guidelines. Take a look at our existing issues, or if you come across an issue, create an issue. For feature requests, start a discussion first.

Getting Started (Local Development)

  1. Install the dependencies

    npm install
    # or
    yarn
    Enter fullscreen mode Exit fullscreen mode
  2. Start the project

    npm run dev
    # or
    yarn dev
    Enter fullscreen mode Exit fullscreen mode

Open localhost:3000 with your browser to see the result.

Getting Started (Gitpod)

The project can be run in Gitpod. Navigate to gitpod.io/#https://github.com/nick.... If you wish to load it in Gitpod as an external contributor, you will need to fork the project first, then open the fork in Gitpod, e.g. gitpod.io/#https://github.com/some....

  1. Gitpod will take a minute or two to load.
  2. If this is the first time loading the project in Gitpod…

How do you roll back a major mistake that exposes user data (for example) fast enough to avoid problems? And on the same track, if a node gets compromised in some way, who is responsible for the breach (my understanding is limited so this might be unlikely, I don't know!)

If the transaction succeeds on the blockchain, it's permanent. Think of it like event sourcing where another event would need to correct the previous event if something were to occur, i.e. write to the blockchain again to correct the mistake.

For a Smart contract, they can never be changed, so a lot of thought has to go into writing them. As far as I know, the only way again to fix something like this is create a new contract and then I believe you would need to migrate the data, i.e. write to the blockchain again, i.e. $$$.

In regards to gas prices, they're just super high on ETH right now.

That's what I can best explain and please anyone correct me if I got something wrong.

Thread Thread
grahamthedev profile image
GrahamTheDev Author • Edited on

Thanks Nick!

As far as I know, everything is going the more energy efficient route opting for proof of stake instead of proof of work

Yes I am aware of the Proof of Stake part coming soon, but the energy bit (I did not explain it well) was more the "duplication issue" for dApps data storage and the issues surrounding that.

Imagine DEV - at least 15GB of article text - in one maybe 2 databases (I assume). On a dApp (assuming it catches on and scales) would you not have to store data in 100+ places and update it in 100+ places? That is 100+ lots of 15GB transferred at least once, to 100+ server locations that all require cooling and power.

Plus dApps promote the idea of more but smaller data hubs, that cannot be as energy efficient (individually, each one is less efficient that a massive data centre)?

If the transaction succeeds on the blockchain, it's permanent. Think of it like event sourcing where another event would need to correct the previous event if something were to occur, i.e. write to the blockchain again to correct the mistake.

Yeah sorry yet again, I needed to be more clear, Is there not always going to be a "cascade effect" of updates. Work is done, the blockchain is updated, but does that not need to proliferate around the world to hundreds of nodes before it is the same everywhere? Maybe this is a super technical part that requires me to understand more about the detail of blockchain before I can ask a good question on it!

The sort of scenario I thought of was accidentally uploading a local file of user data you were inspecting. You spot the mistake and immediately remove the file with an update, but could it not take time for that update to roll out everywhere making you vulnerable for hours rather than seconds?

In regards to gas prices, they're just super high on ETH right now.

Ah got it, plus I suppose with the Proof of stake the costs may drop into commerically viable realms so probably not an issue soon 👍

Thread Thread
nombrekeff profile image
Keff

Pointing to a URL is not the way to do it. You use something like IPFS or store it directly in the block e.g. an SVG in base64 data. I'm not positive if the base64 route is considered best practice though.

Now that you mention that, we initially did it by storing data as compressed base64, and that's the reason why 1kb data was not enough for us (as mentioned in the other comment I posted). We also used IPFS at some point but it had it's drawbacks as well, but I can't recall exactly what the problems where.

Thread Thread
nickytonline profile image
Nick Taylor

In regards to the storage of an NFT, @dabit3 Just dropped a really helpful thread on Twitter.

Thread Thread
grahamthedev profile image
GrahamTheDev Author

Thanks Nick, useful thread and much appreciated!

FYI I just learned that you can't click Twitter cards on mobile (iOS), thought I would let you know!

Thread Thread
nickytonline profile image
Nick Taylor

Glad you enjoyed the thread! For the iOS issue, mind opening an issue on GitHub? https://github.com/forem/forem/issues/new?assignees=&labels=&template=bug_report.md

Thread Thread
grahamthedev profile image
GrahamTheDev Author • Edited on
Collapse
nombrekeff profile image
Keff • Edited on

I'm on the same page, I don't get it. Even though I've worked with, or around, blockchain and cryptos for 5 years I still don't get the point of dApps.

I liked the point in energy consumption, though I don't know if it will be that much more (I haven't researched that at all). Another interesting point is that the development process for dApps is quite crap (at least the last time I tried it), they are more complex than regular apps, they're slow and kinda complex to maintain.

Little side story, I worked on a dApp a few years back. I was in charge of creating the POC for a decentralized social network, which is still alive. My initial implementation was a desktop app (we wanted it to be as decentralized as possible) and was run on a custom fork of bitcoin at the time (bad idea as transactions could not store more than 1kb of data if I recall correctly). We later switched to some other custom blockchain fork to support more data, but that's another story. It took me around 3 months to get the POC working, and after that, I dropped from the project as I did not enjoy the process whatsoever, and other people hopped in.

After working on that for some time, they realized that the desktop app was not ideal as updating it was not that easy, it was not practical and people would rather not download an app. So they decided to make it a website, somewhat centralizing it and returning to what we wanted to avoid. What I'm trying to get to is, that in theory, dApps sound great, but at some point, they must be somewhat centralized to make it more practical, easier for users, and for the developers to manage the app.

I haven't been following this stuff for a couple of years, so things might've changed since then, please correct me if that's the case.

Hope that makes some sense, I don't like talking about this as I have a bit of PTSD from my time working on that app xD

Collapse
grahamthedev profile image
GrahamTheDev Author

Interesting to have this perspective on it! It worries me even more that someone who has given it a "proper go" found it so difficult, but I do believe it is evolving quickly so would hopefully be easier now.

It is the fundamentals part that I can't get, you mentioned the updating and maintaining...that I cannot see improving to Enterprise levels purely down to logistics of shifting data around and having any chance of keeping it under control.

Hopefully someone will come along and give us both an "A-Ha" moment and encourage you to push past your awful experience and give it another go!

Collapse
nombrekeff profile image
Keff

Yeah I too hope it has evolved a bit since then. And hopefully, as you say, someone will clear some things up for us.

I also can't see it at an enterprise level any time soon, but maybe they're not ment to be. I also doubt big companies would want to, having control over the system and having access to data is quite powerfull for them.

Collapse
savvasstephnds profile image
Savvas Stephanides • Edited on

ELI5:

So mommy and daddy got you that teddy bear that you always wanted. But under one condition: you should share it with all your friends: Alice, Bob, Charlie, Danielle. They should all take turns taking the teddy bear for the day.

One day, you ask who has the teddy bear and none of your friends answer! It turns out, Bob, wanted to keep the teddy bear for himself. After that, Alice had the idea to write down who has the teddy bear for the day on a piece of paper. So every time someone gets the bear, Alice would write down on that piece of paper:

5 November 2021 - Danielle

and keep it somewhere safe.

One day, Bob being cheeky again, kept it again for himself and refused to say that he kept it for the day. Alice, who keeps the piece of paper, checks and sees that Bob was the last one who had it. She doesn't show the piece of paper to anyone so you all have to take her word for it.

You don't like this, because if Alice is the only one who has this paper, then she could, at any moment, change anything on it and nobody would notice! Then she could have the teddy bear more than she is allowed to!

So you come up with an idea. What if instead of having one large piece of paper with all the info, you split the paper into smaller pieces. So every time someone gets the teddy bear, you rip off a small piece of paper, give it to someone at random who will write the name of the friend who took the teddy bear and keep it at their own home, safely. To make sure that the small pieces of paper are in order, you also put a number on that paper. 1 for the first piece of paper, 2 for the next etc...

Now to decide who gets to go next, ALL pieces of paper should be read by everyone in order. If Bob is being cheeky and tries to change something again, it'd be easier to catch him this way.

dApps are somewhat similar but for servers. Instead of one company owning your servers, many people own small pieces of it. So the company or any single person can't be cheeky and do whatever they want with your stuff because they'll get caught easily!

Collapse
grahamthedev profile image
GrahamTheDev Author

Great ELI5 for block chain! This should be an article with a bit more detail to include minting and gas prices involving teddy bears (maybe it costs 1 sweet to take the bear or something?)

Collapse
savvasstephnds profile image
Savvas Stephanides

Haha thanks. Well I don't have that much knowledge on blockchain/dApps to go that far I'm afraid. Just the very very basics

Collapse
tomavelev profile image
Toma

1) The biggest power comes in terms of USER control over their stuff via crypto signing - independence from central institutions. We, the developers are fucked trying to learn, program, bugfix the apps.
2) The Blockchain technology is no silver bullet, that should be applied to all areas.

Collapse
siddharthshyniben profile image
Siddharth

Same questions here, I'm totally confused about all these web3 stuff 😕😵

Hope you (and i) get answers!

Collapse
grahamthedev profile image
GrahamTheDev Author

WHo knows, by the end of today I might actually understand it all and get involved!

Both side or the argument are welcomed as long as they are civil! ❤

Collapse
ruppysuppy profile image
Tapajyoti Bose

A bit late to the party, I guess 😅

So what do you think now after going through so many opinions? Most people in the comments seems to not like it that much