Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Save The Web: Decentralize!

Save The Web: Decentralize!

The web was designed to serve humanity, to enable knowledge sharing, for friendship among people.
But data and services centralization by the Tech Giants have completely perverted it. Centralization causes major threats to our societies: mass surveillance, censorship, vote rigging, opponents arrests , advertising tracking.

The situation is such that the founding fathers of the web, including its creator Tim Berners-Lee, multiply the calls to save it.

The solution: decentralize it again, give users control over their data, fight against GAFAM monopolies, rebuild an independent and non-commercial web based on free software.

Developers, journalists, lawyers, artists and activists are organizing to bring out the “Dweb”, the decentralized and distributed web (again). The Dweb is a corpus of standards (usually published by the W3C) such as ActivityPub, JSON-LD, RDF or HTTP as well as tools including Solid, Mastodon, PeerTube or Mobilizon which aim to put the Web at the service of common good.

As web developers, it is our responsibility to build and promote this new web.

The good news is that the PHP ecosystem now has the tools to easily create decentralized web applications based on these standards. During this conference, we will discover why the Dweb is a crucial issue for the future of our societies, how it works technically, and how we implement it with API Platform!

To do so, I just published a new API Platform component: API Platform ActivityPub! This new libraries component allows:

* Build apps supporting ActivityPub in minutes!
* Add ActivityPub support to any existingAPI Platform or Symfony app
* 100% customizable
* Compatible with all API Platform features
* State of the art PHP / API Platform

Kévin Dunglas

June 26, 2020
Tweet

More Decks by Kévin Dunglas

Other Decks in Programming

Transcript

  1. Save the Web:
    Decentralize!

    View Slide

  2. dunglas.fr - @dunglas
    Agenda
    ❏ The web is dying
    ❏ What is to be done?
    ❏ Code is law

    View Slide

  3. dunglas.fr - @dunglas
    The Web is Dying

    View Slide

  4. dunglas.fr - @dunglas
    What’s the Web?

    View Slide

  5. dunglas.fr - @dunglas
    The Web of 2020

    View Slide

  6. dunglas.fr - @dunglas
    The Web, as Designed
    « The Web is intended to be an Internet-scale
    distributed hypermedia system […]. The Internet
    is about interconnecting information networks
    across multiple organizational boundaries. »

    - Roy T. Fielding,

    Architectural Styles and the Design of Network-based Software Architectures, 2000

    View Slide

  7. dunglas.fr - @dunglas
    The Web, as Designed
    decentralized

    View Slide

  8. dunglas.fr - @dunglas
    The Web of Today
    centralized

    View Slide

  9. dunglas.fr - @dunglas
    The Web of Today
    ❏ GAFAM represent 36% of French Internet time (Mediametrie)
    ❏ Amazon is the leader in cloud computing (50% market share), in e-commerce
    (AWS, 50% ms) and live-streaming (Twitch, 75% ms)
    ❏ Facebook is the leading social network (70% ms) and also owns Instagram,
    WhatsApp and Giphy
    ❏ GitHub (Microsoft) is the leading development platform and most free projects
    depend of it
    ❏ Google (70% ms) and Apple (30% ms) are the leaders for mobile OS

    View Slide

  10. dunglas.fr - @dunglas
    Technology is Political

    View Slide

  11. dunglas.fr - @dunglas
    Giving Marginalized Groups a Voice
    « [While creating the web], I realized that the web
    technology had to be universal to work for any
    type of computer, but also any language, genre,
    or culture. »
    - Tim Berners-Lee, creator of the web

    View Slide

  12. dunglas.fr - @dunglas
    The Web is Political!
    « Exchange [on the Internet] occurs without the networks knowing the
    content of the data, or without any true idea of who in real life the sender of
    a given bit of data is. This code is neutral about the data, and ignorant
    about the user.
    These features of TCP/IP have consequences for the "regulability" of
    behavior on the Internet. They make regulating behavior difficult. »
    - Lawrence Lessig, Code Is Law, 2000

    View Slide

  13. dunglas.fr - @dunglas
    The Web is Political!
    « [It] is especially important enabling women,
    the poor, and other marginalized groups to
    access the web and the opportunities for social
    and economic empowerment Internet access
    provides »
    - Tim Berners-Lee, creator of the web

    View Slide

  14. dunglas.fr - @dunglas
    Centralization is Harmful
    for Our Communities!

    View Slide

  15. dunglas.fr - @dunglas

    View Slide

  16. dunglas.fr - @dunglas
    The Threats coming With Centralization
    Two main kind of threats:
    ❏ Mass Surveillance
    ❏ Censorship

    Two main kind of actors:
    ❏ Governments
    ❏ Tech Giants

    View Slide

  17. dunglas.fr - @dunglas
    Centralization and
    Mass Surveillance

    View Slide

  18. dunglas.fr - @dunglas
    The Web of Today
    centralized

    View Slide

  19. View Slide

  20. View Slide

  21. dunglas.fr - @dunglas
    Centralization and
    Censorship

    View Slide

  22. dunglas.fr - @dunglas
    The « Hate » Law (« loi Avia »)
    ❏ Social networks must remove « clearly illegal »
    content in less than 24H
    ❏ Terrorist propaganda and child pornography must
    be removed in less than 1H
    ❏ Fine of 200K€ for any content not deleted
    ❏ No judge involved, no call
    ❏ Current status: found unconstitutional (on hold)

    View Slide

  23. dunglas.fr - @dunglas
    Example: Video of a Police Brutality Shot by a Journalist in my City

    View Slide

  24. dunglas.fr - @dunglas
    Official Reply from the Police:

    View Slide

  25. dunglas.fr - @dunglas
    Do You See the Problem Now?
    ❏ The original tweet containing the video isn’t
    available anymore
    ❏ With the « hate » law, police could be judge and
    party, and force the removal of police brutality
    recordings
    ❏ A new bill is being discussed (« loi Ciotti »), it
    could make illegal the publication of police
    brutality videos

    View Slide

  26. dunglas.fr - @dunglas
    Do You See the Problem Now?
    This guy is a cop
    speaking out racism in the police.

    View Slide

  27. dunglas.fr - @dunglas
    This tweet is still
    available through Tor
    Browser btw…
    Tor is a useful highly
    political piece of
    software.

    View Slide

  28. dunglas.fr - @dunglas
    And It’s Not Only About Twitter
    ❏ Facebook blocks the pages of the Kurdish organizations
    fighting ISIS (because asked to by Turkey)
    ❏ GitHub (MS) blocks all Iranian users, including famous OSS
    contributors (NuxtJS Core Team…)
    ❏ GitHub (MS) banned Tsunami Democràtic's source code (pro
    Catalan-independence)

    View Slide

  29. dunglas.fr - @dunglas
    The Web of Today
    centralized

    View Slide

  30. dunglas.fr - @dunglas
    Code is Law
    These laws can be easily enforced

    only because

    the web isn’t decentralized anymore!

    View Slide

  31. dunglas.fr - @dunglas
    What Is To Be
    Done?

    View Slide

  32. dunglas.fr - @dunglas
    So What to Do?
    ❏ Organize!
    ❏ Refuse!
    ❏ Code!

    View Slide

  33. dunglas.fr - @dunglas
    Organize

    View Slide

  34. dunglas.fr - @dunglas
    Organize

    View Slide

  35. dunglas.fr - @dunglas
    Refuse

    View Slide

  36. dunglas.fr - @dunglas
    Refuse
    ❏ Centralization, mass surveillance, censorship,
    racist IA, … exist only because people code
    them. Refuse to do it!
    ❏ Work in companies where you decide, not your
    boss, not the stockholders: worker-owned
    cooperatives

    View Slide

  37. dunglas.fr - @dunglas
    Code Is Law!

    View Slide

  38. dunglas.fr - @dunglas
    Code Is Law
    « The code regulates. It implements values, or
    not. It enables freedoms, or disables them. It
    protects privacy, or promotes monitoring. People
    choose how the code does these things. People
    write the code. »
    - Lawrence Lessig, Code Is Law, 2000

    View Slide

  39. dunglas.fr - @dunglas
    Let’s Code!
    decentralized
    centralized

    View Slide

  40. dunglas.fr - @dunglas
    The Web /
    Linked Data
    Random GAFAM tech
    Origin Scientific community, to serve humanity Serve their business
    Data access « Internet as a global database » Centralized information silos
    Interoperability Global and built-in Usually none, sometimes partial
    Best suited for Decentralized and Distributed systems
    Public APIs (« Open Data »)
    The World Wide Web
    Centralized systems
    Internal APIs

    View Slide

  41. dunglas.fr - @dunglas
    High level protocols
    (ActivityPub, Solid, Mercure…)
    HTTP(S)
    Vocabularies and ontologies
    (schema.org, ActivityStreams, DublinCore…)
    RDF
    (JSON-LD, Turtle)
    IRI / URI (aka URL)
    (in the web, everything is identified by an IRI)
    Use The Web Stack: It IS Decentralized!

    View Slide

  42. dunglas.fr - @dunglas
    A RDF Graph using URIs and Open Vocabularies
    short for
    http://schema.org

    View Slide

  43. dunglas.fr - @dunglas
    Example:
    ActivityPub

    View Slide

  44. dunglas.fr - @dunglas
    ActivityPub
    ❏ A decentralized social network protocol
    ❏ A web standard published by the W3C
    ❏ Built on top of the web stack:

    URI, HTTP, JSON-LD (RDF)
    ❏ Uses the ActivityStreams open vocabulary
    (another W3C standard)

    View Slide

  45. dunglas.fr - @dunglas

    View Slide

  46. dunglas.fr - @dunglas
    // POST https://social.example/alyssa/outbox
    {
    "@context": "https://www.w3.org/ns/activitystreams",
    "type": "Create",
    // Not possible with a centralized tech
    "to": ["https://chatty.example/ben/"], // reference to an external organization
    "actor": "https://social.example/alyssa/",
    "object": {
    "type": "Note",
    "id": "https://social.example/alyssa/posts/49e2d03d-b53a-4c4c-a95c-94a6abf45a19",
    "attributedTo": "https://social.example/alyssa/",
    "to": ["https://chatty.example/ben/"],
    "content": "Say, did you finish reading that book I lent you?"
    }
    }

    View Slide

  47. dunglas.fr - @dunglas
    ActivityPub Apps
    ❏ : federated social network (Twitter-like)
    ❏ Mobilizon: federated events system (Meetup-like), by Framasoft
    ❏ PeerTube: federated video-streaming service (YouTube-like)
    ❏ NextCloud: federated file sharing service (Dropbox-like)
    The current state of the decentralized web:
    the-federation.info

    View Slide

  48. dunglas.fr - @dunglas
    We Need More Apps:
    Give Us Tools!

    View Slide

  49. dunglas.fr - @dunglas
    API Platform
    ❏ REST and GraphQL framework written in PHP
    ❏ Built-in support for JSON-LD and vocabularies
    ❏ Battery included:

    persistence, filters, authorization, admin UI, React
    and VueJS app generation, real-time push
    (Mercure), HTTP/2 Server Push (Vulcain)….

    View Slide

  50. dunglas.fr - @dunglas
    API Platform Schema Generator 3
    ❏ Brand new version (alpha)
    ❏ Import any vocabulary (RDF or OWL):

    schema.org, ActivityStreams, DublinCore…
    ❏ Generate a full PHP data model, and even
    a web API
    ❏ classes, properties (with types),
    getters and setters, PHPDoc
    ❏ Doctrine annotations
    ❏ validation constraints
    ❏ API Platform annotations!
    github.com/api-platform/schema-generator #204

    View Slide

  51. dunglas.fr - @dunglas
    API Platform ActivityPub
    ❏ Published today (alpha)
    ❏ Build apps supporting ActivityPub in minutes!
    ❏ Add ActivityPub support to any existing

    API Platform or Symfony app
    ❏ 100% customizable
    ❏ Compatible with all API Platform features
    ❏ State of the art PHP / API Platform
    github.com/api-platform/activity-pub

    View Slide

  52. dunglas.fr - @dunglas
    Going Further
    ❏ Solid: decentralized web, true data ownership, privacy
    ❏ IPFS: distributed web protocol (p2p)
    ❏ Scuttlebot: p2p log store (distributed)
    ❏ Introducing the Dweb (Mozilla)
    ❏ Distributed HTTP (Mark Nottingham)
    ❏ The web began dying in 2014, here’s how (André Stalz)
    ❏ The world needs more search engines (cliqz)
    ❏ The open web is dying (Tony Perez)

    View Slide

  53. Don’t Mourn,

    Organize!
    dunglas.fr

    View Slide