Reusable patterns for scalable APIs running on Docker

Reusable patterns for scalable APIs running on Docker

The shipping containers were introduced around 1830s and since then they play a crucial role in the modern society by providing efficient packaging, storage and transportation. Today we see the same revolution happening in the DevOps world with the adoption of container technologies like Docker. They allow us to package, distribute and run software in a scalable and efficient way. In this talk we’ll see how we can abstract the common problem we solve everyday when building scalable Java APIs with Docker into design patterns to create reusable solutions. We’ll explore the good practices of writing Java applications with Docker. Then we’ll see how each design pattern can be applied in real scenarios that address different concerns that a large system creates. We’ll see some real life implementations of those patterns and how they help us solve problems in scalable systems. By the end of the talk we’ll have a very powerful abstraction to tackle the everyday problems we face in building big and impactful systems.

Eb44761e0fb3a5ec8e23ec28048dd7a5?s=128

Nikolay Stoitsev

October 18, 2017
Tweet

Transcript

  1. None
  2. None
  3. Containers

  4. None
  5. cgroups

  6. namespaces

  7. Copy-on-write

  8. Stackable Image Layers

  9. bootfs

  10. bootfs Base image - (ubuntu, debian)

  11. bootfs Base image - (ubuntu, debian) Add JRE

  12. bootfs Base image - (ubuntu, debian) Add JRE Add git

  13. None
  14. https://store.docker.com/images/alpine

  15. https://www.dockerbook.com/

  16. Class Object Image Container

  17. None
  18. Map/Reduce

  19. https://www.usenix.org/node/196347

  20. Single-node, multi-container Application patterns

  21. Sidecar Web server Log server File System

  22. Sidecar Application Instance Translations Downloader File System

  23. Resource Isolation Separate development Easy and flexible composition Failure containment

  24. Ambassador Web Server Ambasador External App External App External App

  25. Ambassador example Application Hyperbahn Instance Hyperbahn Instance Hyperbahn Instance Hyperbahn

    Instance https://github.com/uber-archive/hyperbahn
  26. Easy to reason about Easy to test Reusable

  27. Adapter Application Monitoring Adapter Centralized monitoring system

  28. Multi-node application patterns

  29. Leader election App Leader election container App Leader election container

    App Leader election container App Leader election container
  30. Simplifies the problem Easy testing

  31. Distributed Transactions App Transaction manager container App Transaction manager container

    App Transaction manager container App Transaction manager container
  32. Work queue Worker Work Execution Worker Work Execution Work Coordinator

  33. Simplification

  34. Scatter/gather Merge Execution Work Execution Work Execution Root Work Execution

  35. Sharded Service Shard Function Distributor Worker Shard 1 Worker Shard

    2 Worker Shard 3
  36. http://enterpriseintegrationpatterns.com

  37. Messaging endpoints

  38. Idempotent Receiver App Idempotent Receiver

  39. Message Routing

  40. Dynamic Router App Consumer App Consumer App Consumer Dynamic Router

    Output Channel Controll Channel
  41. None
  42. Thanks!