Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥

Building Decentralized Web Apps with Solid and ...

Building Decentralized Web Apps with Solid and Symfony

No, this presentation is not about web3.

And for good reasons! There is a more open, more interoperable, simpler, more ecological, and even more... decentralized (!!) way to build decentralized web applications.

Web standards, and in particular those of the latest generation (RDF, JSON-LD, N3, OpenID Connect) provide a framework for building such apps.

It is on this technical basis that two new protocols that could revolutionize the web are established: Solid.

The Solid project, for Social Linked Data, developed by Sir Tim Berners-Lee - the creator of the Web himself - gives users control of their data. It allows them to store their data wherever they want, and to choose precisely which application can access what.

Even better, no need for smart contracts or even blockchain to create decentralized web applications using these technologies, a good old PHP script and a Raspberry Pi are enough. That said, using Symfony and API Platform can greatly facilitate the task, that's what we will discover together!

Kévin Dunglas

April 01, 2022
Tweet

More Decks by Kévin Dunglas

Other Decks in Programming

Transcript

  1. Save the web, decentralize! 02 03 OUTLINE 04 01 Web

    3 VS Web 3.0 Solid Build your Solid application
  2. Kévin Dunglas ➔ Co-founder of Les-Tilleuls.coop ➔ Symfony Core Team

    ➔ Creator of: • API Platform • Mercure.rocks • Vulcain.rocks @dunglas
  3. 02 03 04 01 Save the web, decentralize! Build your

    Solid application Solid Web 3 or Web 3.0?
  4. 02 03 04 01 Save the web, decentralize! Web 3

    or Web 3.0? Build your Solid application Solid
  5. ➔ Resources ◆ published on servers ◆ requested by clients

    ◆ identified by URIs (aka URLs) ◆ linked together ➔ Open standards (W3C, IETF): ◆ URI, HTTP, HTML… ➔ Created by Tim Berners-Lee @ CERN Back to the Future: Web 1.0 (90s)
  6. « The Web is intended to be an Internet-scale distributed

    hypermedia system. » Roy Fielding (author of HTTP, Apache and REST), in 2000. The Web 1.0 was Decentralized
  7. ➔ User Generated Content ➔ focus on interoperability (initially) ➔

    Marketing term, not a fundamental change of the web stack: ◆ still relying on URI, HTTP (1.1), HTML… ◆ RSS, XML, web APIs, XML, JSON 😍 ◆ rise of JavaScript ➔ Mix of community (RSS, Wordpress, Wikipedia…) and commercial (YouTube, Twitter, Facebook…) projects ➔ Lead to centralization (because money) Web 2.0: the Social Web (2000s)
  8. ➔ Reclaim big tech’s and government’s power, give users back

    the control of their data ➔ Decentralized open source apps ➔ Crypto-based, runs on blockchains ➔ Trustless and permissionless: direct exchanges, no 3rd parties Web3, the Promise: Re-Decentralize Image: Rapid Innovation
  9. ➔ Real-world “dapps” are mostly centralized, most of data and

    code are in centralized servers, not in the blockchain (eg OpenSea NFT) ➔ Hard to maintain, privacy issues (public and immutable data/code) ➔ Proof of Work Blockchains: huge ecological footprint ➔ Proof of Stake Blockchains: less decentralized, favors users who have a large amount of cryptocurrency Web 3: Don’t Believe the Hype
  10. Web 3: Don’t Believe the Hype ➔ Promoted by VCs,

    crypto and NFT enthusiasts, large tech corps ➔ Main goal: monetize and financialize every aspects of life ➔ Littered by scams and Ponzi schemes ➔ Criticized by many experts: Moxie Marlinspike, André Stalz, Jack Dorsey, Stephen Diehl… even Elon Musk
  11. ➔ Machine-readable web: Linked Data ➔ The web as a

    big database ➔ Focus on interoperability and decentralization ➔ Created by Tim Berners-Lee ➔ Open standards (W3C): ◆ URI, HTTP ◆ RDF: abstract data model ◆ JSON-LD, Turtle, XML-RDF…: serialization formats ◆ RDFS, OWL: vocabulary definitions The Original Web 3.0: Semantic Web (2000s)
  12. ➔ Abstract model to represent any set of data ➔

    Directed graph ➔ Basic unit: semantic triple ◆ subject ◆ predicate ◆ object Resource Description Format (RDF) SUBJECT OBJECT predicate
  13. 03 01 Web 3 or Web 3.0? Solid 02 04

    Save the web, decentralize! Build your Solid application
  14. ➔ Toolkit to build decentralized and interoperable apps ➔ Users

    store their data in decentralized data pods ➔ Pods are secure personal data stores (S3-like) ➔ Users choose who and which apps can access their data ➔ Set of open standards (W3C) ➔ Built on top of Web 3.0 standards ➔ Created by Tim Berners-Lee, Inrupt and the MIT Solid
  15. ➔ WebID: URI identifying a person, an organization, a company…

    ➔ Open ID Connect (OIDC): identity layer on top of OAuth2 ➔ Solid OIDC: to discover the OIDC/OAuth server related to a WebID ➔ Linked Data Platform (LDP): Linked Data REST API to read and write RDF resources ➔ Web Access Control (WAC): RDF vocabulary for users, groups and ACL ➔ Other specs: pub/sub, notifications, friend lists…. Solid Stack: Standards
  16. Solid Pods ➔ FOSS, self-hosted ◆ Node solid server (most

    popular) ◆ Nextcloud ◆ PHP Solid Server ➔ FOSS, community hosted: ◆ solidcommunity.net ◆ solidweb.org ➔ Commercial: ◆ Inrupt Enterprise Solid Server ◆ TrinPod
  17. ➔ Common vocabularies are key for: ◆ interoperability between apps

    ◆ data portability ➔ Well known vocabularies: ◆ FOAF: social graph ◆ vcard: e-business cards ◆ ActivityStreams: social networks ◆ DublinCore: documents ◆ Schema.org: common things ◆ … ➔ Vocabs can be mixed together and extended ➔ RDF vocabs to define new vocabs: ◆ RDFS, OWL, SKOS… RDF Vocabularies
  18. 03 01 Build your Solid application 02 04 Web 3

    or Web 3.0? Save the web, decentralize! Solid
  19. ➔ Standalone PHP library ◆ OIDC and Solid OIDC client

    ◆ Solid pods client ➔ Symfony Bundle ◆ Passport authenticator ◆ User provider ◆ Pod client as a service ◆ HttpClient integration ➔ Early stage, experimental ➔ Some TODOs (contribs welcome) Solid Client PHP
  20. Built on top of awesome PHP libraries: ➔ jumbojett/openid-connect-php: OIDC

    client ➔ web-token/jwt-core: JOSE implementation ➔ easyrdf/easyrdf: RDF parser, serializer and converter ➔ symfony/http-client: HttpClient Free Software ❤