$30 off During Our Annual Pro Sale. View Details »

COPE with Node.js microservices

COPE with Node.js microservices

Talk given at JS Monthly on the 29th of November, 2016, London.

Eduardo Bouças

November 29, 2016
Tweet

More Decks by Eduardo Bouças

Other Decks in Technology

Transcript

  1. JS Monthly, November 2016
    COPE with Node.js
    microservices
    Eduardo Bouças
    eduardoboucas.com
    @eduardoboucas
    London

    View Slide

  2. Part I — Discovery

    View Slide

  3. View Slide

  4. Content
    Management
    System

    View Slide

  5. Content
    Digital asset
    Management
    System

    View Slide

  6. Content
    Digital asset
    User
    Management
    System

    View Slide

  7. Content
    Digital asset
    User
    Layout
    Management
    System

    View Slide

  8. View Slide

  9. Traditional (monolithic) CMS
    Core
    Database
    Admin UI
    Templates

    View Slide

  10. Problem #1
    Long-term commitment to tech stack and CMS
    components/features

    View Slide

  11. Problem #2
    How to integrate with external systems on different
    tech stacks?

    View Slide

  12. Part II — Headless

    View Slide

  13. Headless CMS
    Core
    Database
    Admin UI
    Templates
    Web server
    Templates
    Native app
    API

    View Slide

  14. ● Separation of concerns: content and layout are
    decoupled
    ● Any front-end can be plugged in — RESTful +
    everyone speaks JSON
    ● A single editing interface can be used to publish to
    multiple devices
    Benefits

    View Slide

  15. ● Separates data from design
    ● Reduces editorial overhead
    ● Content re-usable and future-proof
    Create Once, Publish Everywhere
    COPE

    View Slide

  16. View Slide

  17. Problem #1
    Web CMS still pivot of entire system.

    View Slide

  18. Problem #2
    Database, core and API still tightly coupled
    together. What happens if the publishing interface
    needs to change?

    View Slide

  19. Problem #3
    COPE as an afterthought.

    View Slide

  20. View Slide

  21. ● Data architecture and business logic agnostic of
    tech stack
    ● Features as modular, interchangeable
    components
    ● Universal language
    ● Scalable on a micro-level
    A wish list

    View Slide

  22. «An approach to developing a single application as a
    suite of small services, each running in its own process
    and communicating with lightweight mechanisms, often
    an HTTP resource API.»
    Microservices
    Martin Fowler

    View Slide

  23. COPE by design
    API-first approach
    Modular components
    Built in Node.js
    Scalable
    Free and open source

    View Slide

  24. API
    A high-performance
    RESTful API layer
    designed in support
    of API-first
    development and the
    principles of COPE.
    Publish
    A writer’s window to
    the world of content
    creation. Flexible
    interfaces designed to
    optimise editorial
    workflow.
    CDN
    A just-in-time asset
    manipulation and
    delivery layer
    designed as a
    modern, global
    content distribution
    solution.
    Web
    A schemaless
    templating layer that
    can operate as a
    standalone platform
    or with API as a full
    stack web application.
    The suite

    View Slide

  25. The stack
    DADI API
    Database
    DADI Web Templates
    DADI CDN
    DADI Publish
    Media
    Storage
    Native app
    HTTP request

    View Slide

  26. DADI API
    DB shard
    iOS app
    DADI API
    DADI API
    Android app
    iOS app
    (CMS)
    DADI Web
    DADI Publish
    DADI CDN
    DADI CDN
    Scaling
    DB shard
    DB
    cluster

    View Slide

  27. ● > 100 million users a month
    ● Editorial teams of up to 400 people
    ● 250,000+ peak concurrent users
    Some numbers

    View Slide

  28. ● Scalability
    ● Developer liberation
    ● Fast to market
    Key benefits

    View Slide

  29. Fast to market
    API
    iOS Android
    Web
    CMS
    CDN
    iOS CMS
    Team 1
    Team 2
    Team 3
    Team 4

    View Slide

  30. ● Holds data architecture and
    business logic in JSON schema
    ● Content stored as documents,
    grouped in collections
    ● Fully REST (data and metadata)
    ● Customisable with hooks
    DADI API

    View Slide

  31. DADI CDN

    View Slide

  32. DADI CDN — Live demo
    http://codepen.io/eduardoboucas/full/ZOApOK/

    View Slide

  33. Thank you.
    dadi.tech
    github.com/dadi

    View Slide