Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

API Centric Patterns

970 views

Published on

Architectural patterns for an API Centric architecture. We discuss the misconceptions around statelessness and the different components that allow for a flexible and reliable runtime based on REST APIs.

Published in: Software
  • Be the first to comment

  • Be the first to like this

API Centric Patterns

  1. 1. Patterns For API Centric Architecture Daniel Cerecedo @dcerecedo
  2. 2. Byteflair StatelessStateless
  3. 3. Byteflair StatelessStateless Client/Server
  4. 4. Byteflair StatelessStateless It's all about CLIENT STATE, not about the global state of the system
  5. 5. Byteflair StatelessStateless Client requests provide ALL the context that the Server needs to Determine Client state
  6. 6. Byteflair StatelessStateless The state of the client is part of the payload
  7. 7. Byteflair StatelessStateless Stateless servers are core to HORIZONTAL SCALING
  8. 8. Byteflair
  9. 9. Byteflair CommonContractCommonContract Exchange protocol Message format
  10. 10. Byteflair CommonContractCommonContract Exchange protocol Message format Coupling
  11. 11. Byteflair CommonContractCommonContract
  12. 12. Byteflair
  13. 13. Byteflair OrchestrationOrchestration 2 1 3
  14. 14. Byteflair OrchestrationOrchestration 2 1 3
  15. 15. Byteflair Mediation RouterMediation Router
  16. 16. Byteflair Mediation RouterMediation Router Intelligently ROUTES and TRANSFORMS messages, and handles endpoint ERRORS
  17. 17. Byteflair Mediation RouterMediation Router ✔ Load Balancer Specify a group of components among which to load balance requests ✔ Dead Letter Declare error conditions, retry policies and where to deliver the message on failure ✔ Content Based Routing Route a message to different endpoints based of its contents ✔ Dynamic Router Route a message to different endpoints based on the state of the system ✔ Normalizer Transform messages from heterogeneous formats into a common format
  18. 18. Byteflair Mediation RouterMediation Router
  19. 19. Byteflair Mediation RouterMediation Router
  20. 20. Byteflair
  21. 21. Byteflair Message BrokerMessage Broker A Message Broker supports ALL communication models: ✔ Publish/Subscribe ✔ Sync RPC ✔ Async RPC
  22. 22. Byteflair Message BrokerMessage Broker A Message Broker GUARANTEES the delivery of a message
  23. 23. Byteflair
  24. 24. Byteflair Service RegistryService Registry Netflix Eureka
  25. 25. Byteflair Service RegistryService Registry
  26. 26. Byteflair
  27. 27. Byteflair Load BalancerLoad Balancer Netflix Ribbon
  28. 28. Byteflair
  29. 29. Byteflair Circuit BrakerCircuit Braker Netflix Hystrix
  30. 30. Byteflair Service DiscoveryService Discovery
  31. 31. Byteflair Service DiscoveryService Discovery Discovery client automatically resolvesservice names through the service registry
  32. 32. Byteflair Service DiscoveryService Discovery Client load balancer caches service instance locations to support service resolution in case the registry failure
  33. 33. Byteflair Service DiscoveryService Discovery Client load balancer selects a serviceinstance among all available
  34. 34. Byteflair Circuit BreakerCircuit Breaker If we are unable to service a request we can shortcircuit and fallback graciously
  35. 35. Byteflair Stateless Service Discovery Load Balancer Circuit Braker Micro Services 
  36. 36. Byteflair Micro ServicesMicro Services MywayMyway
  37. 37. Byteflair Micro ServicesMicro Services MywayMyway
  38. 38. Byteflair ContainerizationContainerization
  39. 39. Byteflair ContainerizationContainerization Strict separation between build, release and run. Releases are APPEND ONLY
  40. 40. Byteflair ContainerizationContainerization Infrastructure is IMMUTABLE
  41. 41. Byteflair ContainerizationContainerization Services are exported via PORT BINDING
  42. 42. Byteflair ReferencesReferences Spring Cloud Using cloud components with spring, specially Netflix OSS http://projects.spring.io/spring-cloud/ Flux Capacitor Java-based, cloud-native, reference architecture using many Netflix Open Source projects https://github.com/cfregly/fluxcapacitor 12 Factor APP Methodology for building software-as-a-service apps http://12factor.net/ Shipyard Composable docker management http://shipyard-project.com/
  43. 43. ?ThanksThanks MerciMerci GraciasGracias http://byteflair.com Daniel Cerecedo @dcerecedo

×