Services, Architecture and Channels

Services, Architecture and Channels

A talk I gave at DjangoCon Europe 2017 in Florence, Italy


Andrew Godwin

April 03, 2017


  1. 2.

    Andrew Godwin Hi, I'm Django core developer Senior Software Engineer

    at Apparently now does software architecture
  2. 4.

    The Monolith Only one version of any dependency Everything can

    import everything Deployed all at once No separation Side-effects from other code
  3. 5.
  4. 6.

    Services Code split up by purpose/team Defined cross-boundary API Deployed

    separately Can use different versions of dependencies Isolated from each other
  5. 32.

    Channel Layer Interface Server Worker Server Process 1 ASGI ASGI

    Asynchronous socket handling Synchronous Django project Interface Server Worker Server ASGI ASGI Worker Server ASGI Process 2 Process 3 Process 4
  6. 35.

    At-most-once delivery ASGI's Tradeoffs You have to design for potential

    loss Low-latency but non-persistent Good for protocols, bad for important task queues Capacity, Backpressure and FIFO Informs producers quickly about pileups in the queue