SlideShare a Scribd company logo
Productive web applications
that run only on the frontend
Stefan Adolf
Developer Ambassador - Turbine Kreuzberg
@stadolf
Back in the days.
Back in the days.
2005
● PHP on your Apache webserver
You upload backend code & templates
(“Wordpress”)
● On request the webserver delegates to PHP
● PHP queries the database, renders the template,
yields to Apache, yields HTML to th browser
● Apache delivers static assets, “enhancing” your
frontend.
2015
● Node on your Nginx Webserver
● You write an API service (express)
● The webserver delivers the static SPA frontend and its
assets
● The webserver proxies API requests to your express app
● Your express app queries a content management API to
fetch content
● The frontend rerenders after interacting with the API
Client
domain.com
whois?
DNS
www.domain.com
Back in the days.
Webserver /
Proxy
Client
domain.com
whois?
DNS
www.
api.
www.domain.com
Back in the days.
Webserver /
Proxy
Client
Application
domain.com
whois?
DNS
www.
api.
www.domain.com
Back in the days.
Webserver /
Proxy
Client
Application
domain.com
whois?
DNS
www.
api.
www.domain.com
Back in the days.
Webserver /
Proxy
Client
Application
domain.com
whois?
DNS
www.
api.
www.domain.com
Back in the days.
Webserver /
Proxy
Client
Application
Client
domain.com
whois?
DNS
www.
api.
www.domain.com
api.domain.com
Back in the days.
Webserver /
Proxy
Client
Application
Client
domain.com
whois?
DNS
www.
api.
www.domain.com
api.domain.com
Back in the days.
Why are servers necessary?
Servers are needed
to add trust to applications
When I talk to www.bank.co, I know, it’s my bank.
Servers are needed
to keep secrets from users
www.bank.co has API keys for a Google API
Servers are needed
to stay online if you go offline
Servers are needed
to agree on access points for apps
Servers are needed
to safely store and distribute data
What servers practically do, today.
DNS: www.code-school.com -> CNAME virtual.host.hoster.com -> A 199.277.388.15
Web: I’m here, and I proxy HTTP requests to Application
Application: I’m here to execute logic upon behind your request (“/api/users/17?fields=name”)
Database: I’ll keep track of the data
Authorization: I’m keeping your users’ passwords safe.
Webserver /
Proxy
Client
Application
Client
www.
api.
Webserver /
Proxy
Client
Application
Client
www.
api.
Webserver /
Proxy
Client
Application
Client
www.
api.
Webserver /
Proxy
Client
Application
Client
www.
api.
Webserver /
Proxy
Client
Application
Client
www.
api.
Webserver /
Proxy
Client
Application
Client
www.
api.
PaaS / BaaS to the rescue.
(aka “the cloud”)
PaaS / BaaS
Heroku: you write code, I run it. Magically.
Firebase: you write API services, I run them + a magically fast database.
Netlify: you build a static site, I deliver it, fast (on CDN)
Contentful: I replace your CMS API with an API driven CMS service that your users can use.
AWS Lambda: you write a function, I run it without an environment and care about the routing.
Can Google be unavailable?
Can AWS keep secrets?
Has Firebase got
a backup?
Can Heroku dynos be shutdown?
Does DNS tell the truth?
The web as we know it, is broken.
Restart breaking servers Trust black boxed cloud monoliths
web3
T o t h e r e s c u e
Decentralize all the things!
Decentralized things can’t break.
Decentralized (P2P) file systems
Everyone (you!) creates a local repository and runs an ipfs daemon on top of that
● Also works within a browser window (js-ipfs)
● Each daemon gets a unique identity on startup
All daemons connect to each other by using a P2P network (libp2p)
● Discovery is based on the peer identities
● Peers must be able to dial each other
● All peers are routable through this dynamic network
● All peers forward requests to their neighbors
Content on IPFS
Content is addressed by a Content ID (CID) that’s a hash of a Merkle tree of its contents
Content is addressed globally by that CID. The CID represents the binary content.
IPFS’ API feels as if it was a filesystem:
● ipfs add some_file.txt / ipfs add -r directory
● ipfs cat Qm.../file.txt
● ipfs get Qm.../image.jpg
● ipfs ls Qm.../folder
QmRJYzy24v53ndShLdNytfKr59tKnFQaLs1Sso8pAdikcW
(bafybeibmbfyzctddrxfeu4dc5swvso5tc3mcbhxopycvm7xdvmewqjv3t4)
Content Resolution
QmRJYzy24v53ndShLdNy
tfKr59tKnFQaLs1Sso8pAdikc
W
Ipfs add
Content Resolution
QmRJYzy24v53ndShLdNy
tfKr59tKnFQaLs1Sso8pAdikc
W
Ipfs add
I have QmRJYzy24...
Content Resolution
QmRJYzy24v53ndShLdNy
tfKr59tKnFQaLs1Sso8pAdikc
W
Ipfs add
Do you know QmRJYzy24...?
Content Resolution
QmRJYzy24v53ndShLdNy
tfKr59tKnFQaLs1Sso8pAdikc
W
Ipfs add
Do you know QmRJYzy24...?
Content Resolution
QmRJYzy24v53ndShLdNy
tfKr59tKnFQaLs1Sso8pAdikc
W
Ipfs add
I have QmRJYzy24...
Do you know QmRJYzy24...?
Content Resolution
QmRJYzy24v53ndShLdNy
tfKr59tKnFQaLs1Sso8pAdikc
W
Ipfs add
I have QmRJYzy24...
Do you know QmRJYzy24...?
Content Resolution
QmRJYzy24v53ndShLdNy
tfKr59tKnFQaLs1Sso8pAdikc
W
Ipfs add
I have QmRJYzy24...
Do you know QmRJYzy24...?
Content Resolution
QmRJYzy24v53ndShLdNy
tfKr59tKnFQaLs1Sso8pAdikc
W
Ipfs add
I have QmRJYzy24...
Do you know QmRJYzy24...?
Content Resolution
QmRJYzy24v53ndShLdNy
tfKr59tKnFQaLs1Sso8pAdikc
W
Ipfs add
I have QmRJYzy24...
I have QmRJYzy24...
Content Resolution
QmRJYzy24v53ndShLdNy
tfKr59tKnFQaLs1Sso8pAdikc
W
Ipfs add
I have QmRJYzy24...
I have QmRJYzy24...
Do you know QmRJYzy24...?
The main issue: connectivity
ipfs swarm peers
ipfs swarm connect /ip4/167.71.52.88/udp/4001/
quic/p2p/QmXAghnP7DqmAEE7Zx4SxMo3UcUVSn8f1xDCT6x1ysYM
Sj
Use the Browser Plugin to redirect all ipfs content to your local
gateway
http://bafybeiczz7umdkjzd6wbjfx6mfc3l3sddjsckf7hc4vyphvhg6rx
adnp5a.ipfs.localhost:8080/
IPFS & HTTP: Web gateways
Each node comes with a builtin web gateway (8080)
Use web gateways to retrieve IPFS data via HTTP (here are some public ones)
Once browsers support ipfs:// natively they might become obsolete
Subdomain based gateways are great to deliver decentralized SPAs
http://bafybeibtpm4gimnctdimxpjoeybuzlnkmuo25xgi54frqhhso4jd6hxtzm.ipfs.localhost:8080/
Demo
Adding / getting content
IPFS webui
peering
Host a static website
on your local machine
Host your own website
1. Create a website.
2. ipfs add -r website/build
3. Share the CID with your friends
4. They can get your website by ipfs get CID
5. Don’t shut down your PC
6. If you change one character, tell them the new CID
Caveat: works only with subdomain based gateways (because of relative asset urls)
Keeping content online, permanently
Aka “pinning” or “permastores”
IPFS nodes can be advised to keep content. Ipfs pin add <cid>
You can ask (or pay) others if they pin content for you
Or you use a trustless storage protocol
IPNS: link to changing content
ipfs add -r your_home_page
ipfs name publish <CID>
● Creates a unique name related to your node’s public key and links it to the given content
Access the content from public web gateways:
https://dweb.link/ipns/QmZu4NDRMnoEthm2W5Zi2CuGpYdCarg3jQkK6YwnFJQJzy/
To update the content (the name hash stays the same):
● ipfs name publish <new CID>
Fleek
= Netlify on IPFS
Builds your site from your git repo, also builds PR previews!
Publishes & pins the build on IPFS
Manages a dynamic .on.fleek.co domain to it (and adds SSL)
https://white-sunset-5541.on.fleek.co/
You can access that website from any gateway (also your own)
= http://white-sunset-5541.on.fleek.co.ipns.localhost:8080/
= http://bafybeifz46hk7s6w4orjtu34sfn4quobapxo5oigbcjdgirx7jj75e5d4i.ipfs.dweb.link/
Demo
Hosting a local website
Fleek
And what about the database?
OrbitDB
Based on an jsIPFS node running inside your browser
Structures content in a way that it can be consumed like a database
- Append only logs
- Key value stores
- Document databases
- Simple counters
Database content is replicated as CRDTs (“timestamped document diffs”) over
the network
- utilizes libp2p Pubsub messaging (builtin to any IPFS node)
- Also contains access control layers and encryption features
Run a jsIPFS node inside your website
& add a common “meeting point” to share content between browsers.
Launch an OrbitDB instance on your node
Interact with an OrbitDB database
How does that work?
Upon cold start the app creates and reads a unique OrbitDB inside your browser tab
- The name orbit.users.birthday leads to an unique hash
- /orbitdb/zdpuAqiiDjGSPXwz9HdYaVFQPCe2VdwqG2tiqdbWTFegj3DYe/orbit.users.birthday
db is empty when you create it
db announces to the world that it’s up and others should listen and tell about updates (pubsub)
All updates are internally ordered by timestamps and are applied in that order
=> each client ends up with a final state depending on which updates it hears.
As long as any node in the world has the content, other peers can sync it.
Demo
OrbitDB
https://github.com/elmariachi111/wcs-decentralized
https://wcs.on.fleek.co/
https://bafybeiacpvdvqnqf43eoru33dkdzqx2c7ckaqtw4372f5pwpivf5fr4ba4.ipfs.dweb.link/
Still hard? There are tools built on
top of it!
Stefan Adolf
Developer Ambassador - Turbine Kreuzberg
@stadolf
https://ledger-academy.on.fleek.co/#/

More Related Content

PDF
Plack basics for Perl websites - YAPC::EU 2011
KEY
Web frameworks don't matter
PDF
"High-load is at the intersection of DevOps and PHP development",
KEY
Plack perl superglue for web frameworks and servers
PDF
Red Hat Nordics 2020 - Apache Camel 3 the next generation of enterprise integ...
PDF
SouJava May 2020: Apache Camel 3 - the next generation of enterprise integration
PDF
Everything-as-code. A polyglot adventure. #DevoxxPL
PPTX
Apache Camel K - Copenhagen
Plack basics for Perl websites - YAPC::EU 2011
Web frameworks don't matter
"High-load is at the intersection of DevOps and PHP development",
Plack perl superglue for web frameworks and servers
Red Hat Nordics 2020 - Apache Camel 3 the next generation of enterprise integ...
SouJava May 2020: Apache Camel 3 - the next generation of enterprise integration
Everything-as-code. A polyglot adventure. #DevoxxPL
Apache Camel K - Copenhagen

What's hot (20)

PDF
Apache Camel v3, Camel K and Camel Quarkus
PDF
Best Practices for Middleware and Integration Architecture Modernization with...
PPTX
Apache Camel K - Copenhagen v2
PDF
Building a desktop app with HTTP::Engine, SQLite and jQuery
PPTX
Apache Camel K - Fredericia
KEY
Plack at OSCON 2010
KEY
Plack at YAPC::NA 2010
PDF
Killer Docker Workflows for Development
ODP
Developing high-performance network servers in Lisp
PDF
Camel Day Italy 2021 - What's new in Camel 3
PDF
Web Clients for Ruby and What they should be in the future
PDF
How Shopify Scales Rails
PPTX
Serverless integration with Knative and Apache Camel on Kubernetes
KEY
About Clack
PDF
Kafka Summit SF 2017 - Streaming Processing in Python – 10 ways to avoid summ...
PDF
Developing Java based microservices ready for the world of containers
ODP
Lisp Meet Up #31, Clake: a GNU make-like build utility in Common Lisp
PDF
An introduction and future of Ruby coverage library
PPTX
The forgotten route: Making Apache Camel work for you
PPTX
Integrating microservices with apache camel on kubernetes
Apache Camel v3, Camel K and Camel Quarkus
Best Practices for Middleware and Integration Architecture Modernization with...
Apache Camel K - Copenhagen v2
Building a desktop app with HTTP::Engine, SQLite and jQuery
Apache Camel K - Fredericia
Plack at OSCON 2010
Plack at YAPC::NA 2010
Killer Docker Workflows for Development
Developing high-performance network servers in Lisp
Camel Day Italy 2021 - What's new in Camel 3
Web Clients for Ruby and What they should be in the future
How Shopify Scales Rails
Serverless integration with Knative and Apache Camel on Kubernetes
About Clack
Kafka Summit SF 2017 - Streaming Processing in Python – 10 ways to avoid summ...
Developing Java based microservices ready for the world of containers
Lisp Meet Up #31, Clake: a GNU make-like build utility in Common Lisp
An introduction and future of Ruby coverage library
The forgotten route: Making Apache Camel work for you
Integrating microservices with apache camel on kubernetes
Ad

Similar to Productive web applications that run only on the frontend (20)

PPTX
Interplanetary File System.pptx
PDF
OSDC.no 2015 introduction to node.js workshop
PDF
Python in the land of serverless
PPTX
Decentralized storage
PDF
Serverless: A love hate relationship
PDF
Open Source Serverless: a practical view. - Gabriele Provinciali Luca Postacc...
PDF
Building real time applications with Symfony2
PPTX
Scaling Push Messaging for Millions of Netflix Devices
PDF
The Fn Project: A Quick Introduction (December 2017)
PDF
Node.js in production
PDF
IPFS: The Permanent Web
PPTX
Serverless applications
PDF
WebSocket Perspectives 2015 - Clouds, Streams, Microservices and WoT
PDF
What can you do with lambda in 2020
PPTX
Introduction to IPFS & Filecoin
PDF
Serverless Applications on AWS
PDF
Learn how to build decentralized and serverless html5 applications with embar...
PDF
Learn how to build decentralized and serverless html5 applications with Embar...
PDF
The future will be Serverless - JSDay Verona 2018
PDF
What can you do with lambda in 2020
Interplanetary File System.pptx
OSDC.no 2015 introduction to node.js workshop
Python in the land of serverless
Decentralized storage
Serverless: A love hate relationship
Open Source Serverless: a practical view. - Gabriele Provinciali Luca Postacc...
Building real time applications with Symfony2
Scaling Push Messaging for Millions of Netflix Devices
The Fn Project: A Quick Introduction (December 2017)
Node.js in production
IPFS: The Permanent Web
Serverless applications
WebSocket Perspectives 2015 - Clouds, Streams, Microservices and WoT
What can you do with lambda in 2020
Introduction to IPFS & Filecoin
Serverless Applications on AWS
Learn how to build decentralized and serverless html5 applications with embar...
Learn how to build decentralized and serverless html5 applications with Embar...
The future will be Serverless - JSDay Verona 2018
What can you do with lambda in 2020
Ad

More from Stefan Adolf (20)

PDF
Blockchains - Technical foundations
PDF
HOW TO SURVIVE A 2DAY HACKATHON?
PDF
Digitale Selbstbestimmung mit Hilfe dezentraler Technologien
PDF
Digitale Selbstbestimmung | Anwendungsfälle der Dezentralität
PDF
Decentralized technology: a (short) survey
PDF
DePA - die dezentrale Patientenakte (29.1. FU Berlin)
PDF
DePA - die dezentrale Patientenakte
PDF
Was ist eine Datenbank - und was hat Blockchain damit zu tun?
PDF
Never Code Alone: Von Symfony Forms zu einer SPA auf APIs
PDF
Decentralize all the things
PDF
Indexing Decentralized Data with Ethereum, IPFS & The Graph
PDF
Gatsby (Code.Talks) 2019
PDF
A micro service story
PDF
Api Platform: the ultimate API Platform
PDF
Pump up the JAM with Gatsby (2019)
PDF
Testing API platform with Behat BDD tests
PDF
Hack it like its hot!
PDF
api-platform: the ultimate API platform
PDF
Webpack Encore - Asset Management for the rest of us
PDF
(2018) Webpack Encore - Asset Management for the rest of us
Blockchains - Technical foundations
HOW TO SURVIVE A 2DAY HACKATHON?
Digitale Selbstbestimmung mit Hilfe dezentraler Technologien
Digitale Selbstbestimmung | Anwendungsfälle der Dezentralität
Decentralized technology: a (short) survey
DePA - die dezentrale Patientenakte (29.1. FU Berlin)
DePA - die dezentrale Patientenakte
Was ist eine Datenbank - und was hat Blockchain damit zu tun?
Never Code Alone: Von Symfony Forms zu einer SPA auf APIs
Decentralize all the things
Indexing Decentralized Data with Ethereum, IPFS & The Graph
Gatsby (Code.Talks) 2019
A micro service story
Api Platform: the ultimate API Platform
Pump up the JAM with Gatsby (2019)
Testing API platform with Behat BDD tests
Hack it like its hot!
api-platform: the ultimate API platform
Webpack Encore - Asset Management for the rest of us
(2018) Webpack Encore - Asset Management for the rest of us

Recently uploaded (20)

PDF
Design an Analysis of Algorithms I-SECS-1021-03
PPTX
L1 - Introduction to python Backend.pptx
PDF
AI in Product Development-omnex systems
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PDF
medical staffing services at VALiNTRY
PDF
Understanding Forklifts - TECH EHS Solution
PDF
System and Network Administraation Chapter 3
PDF
System and Network Administration Chapter 2
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PDF
top salesforce developer skills in 2025.pdf
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PPT
JAVA ppt tutorial basics to learn java programming
PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PDF
How Creative Agencies Leverage Project Management Software.pdf
PDF
PTS Company Brochure 2025 (1).pdf.......
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
Design an Analysis of Algorithms I-SECS-1021-03
L1 - Introduction to python Backend.pptx
AI in Product Development-omnex systems
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
medical staffing services at VALiNTRY
Understanding Forklifts - TECH EHS Solution
System and Network Administraation Chapter 3
System and Network Administration Chapter 2
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
Wondershare Filmora 15 Crack With Activation Key [2025
top salesforce developer skills in 2025.pdf
Which alternative to Crystal Reports is best for small or large businesses.pdf
Upgrade and Innovation Strategies for SAP ERP Customers
JAVA ppt tutorial basics to learn java programming
Operating system designcfffgfgggggggvggggggggg
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
How Creative Agencies Leverage Project Management Software.pdf
PTS Company Brochure 2025 (1).pdf.......
How to Choose the Right IT Partner for Your Business in Malaysia
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...

Productive web applications that run only on the frontend