From a developer standpoint... WTF is a dApp?

- Is it synonym for smart contract?
- does it need a backend server?
- does it run entirely in a browser / mobile app?
- is it really decentralized if it uses a cloud provider?

some thoughts about it👇🧵

#Cardano #BuildingOnCardano
The way I see it, a dApp is a distributed system that incorporates particular non-functional requirements in order to make it "decentralized".

but it isn't a binary quality, it's a spectrum where different components of the same app might be more or less centralized than others.
My understanding of non-functional requirements for a dApp:

📌no censorship: no single entity can arbitrary limit my access

📌self-accountability: I can autonomously verify the correctness of my interactions

📌resilience: it's resistant to technical and social disruptions
A DEX for example: the on-chain component controlling the swaps is censorship-resistant, but the frontend might be hosted in a cloud provider.

It's a valid approach, but this describes a dApp where we find different levels of decentralization for its constituent components.
I find it easier to understand distributed systems by describing their "topology".

In software architecture, a topology refers to the layout or arrangement of components in a system. It describes how these components are connected and how they communicate with each other.
Each dApp is unique, would be impossible to describe every topology, but I do find some reoccurring patterns that we're trying to describe in this @txpipe_tools RFC:

rfcs.txpipe.io/0004-dapp-topo…

It's far from complete and there's room for improvement, feedback is much appreciated♥️
Instead of having very long names or cryptic acronyms for each topology, we named each pattern after pizza toppings (toppings ~ topology)🤷

Here're some examples👇
🍕Pepperoni: app where the bulk of the business logic resides server-side. Users interact with a frontend running on their device. User's light wallet is leveraged for signing transactions. Server-side acts as a gateway to the blockchain. Relies on on-chain validators.
🍕Hawaiian: app where all of the business logic resides client-side. Users interact with a frontend + business logic running on their device. Light wallet is leveraged for signing transactions. 3rd-party RPC provider is used for querying blockchain data and submitting transaction
🍕Bacon: aims at full self-accountability by running a full node client-side. Frontend and business logic also run client-side. Interactions between app and blockchain happen locally, directly against the node. Relies on on-chain validators.
🍕Mushrooms: usually referred to as a "headless app". All of the logic resides server-side, exposed as an API. 3rd parties, different from the dApp developer, can build independent frontends or provide new functionality by composing APIs.

(my personal favorite)
Why should I care as a developer?

Because architectural patterns are general, reusable solution to a commonly occurring problems. There's no silver bullet, every solution has trade-offs. By identifying the options, we're better suited to find the right solution for our use-case.
There's a lot more to be discussed:
- trade-offs in each topology
- libs & tools for each approach
- how to make the "cloud" component more decentralized

If you're interested in these discussions, @txpipe_tools discord is a nice place to hang out:

discord.com/invite/ZTHcHUy…

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Santiago Carmuega

Santiago Carmuega Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @santicarmuega

Jul 5, 2022
Sharing an idea for a new #Cardano tool...

It looks like a node, swims like a node, quacks like a node... but it only serves data.

It's called "Dolos": A Cardano Data Node 🧵
Traditionally, nodes assume one of two roles: "relay" or "producer".

We argue that there’s a 3rd role that should be treated independently: nodes with the purpose of resolving local state queries or serving as data source for downstream tools that require ledger data.
By reducing the scope and selecting a whole different set of trade-offs, we can optimize this role to have a small resource footprint.

Deploying a "data node" should be relatively cheap in comparison to a full node doing all of the consensus / ledger heavy-lifting.
Read 8 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!

:(