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

Revitalizing Aging Architectures with Microservices and the Reactive Platform

Kevin Webber
December 01, 2015

Revitalizing Aging Architectures with Microservices and the Reactive Platform

When you need to react quickly to competitive threats, but your existing architecture is anything but nimble, what do you do? You will hear the story of how Walmart Canada revitalized its aging architecture with a microservices model built for speed and performance - that efficiently leveraged its JVM infrastructure - to achieve major e-commerce success in just 12 months.

Results:

1. Conversions up 20%
2. Mobile orders up 98%
3. No downtime during Black Friday or Boxing Day

Kevin Webber

December 01, 2015
Tweet

More Decks by Kevin Webber

Other Decks in Programming

Transcript

  1. Revitalizing Aging
    Architectures with
    Microservices

    View full-size slide

  2. Typesafe
    Reactive
    Platform
    » Play - RESTful API
    framework
    » Akka - Distributed
    computing framework
    » Spark - General purpose in-
    memory compute engine
    » ConductR, Monitoring, and
    commercial features

    View full-size slide

  3. Why replatform?

    View full-size slide

  4. 2005 architecture

    View full-size slide

  5. 2015 architecture

    View full-size slide

  6. 2020 architecture

    View full-size slide

  7. Size of the internet today

    View full-size slide

  8. The world by 2020
    » 4 billion connected people
    » 25+ million apps
    » 25+ billion embedded systems
    » 40 zettabytes (40 trillion gigabytes)
    » 5,200 GB of data for every person on Earth

    View full-size slide

  9. Walmart Canada

    View full-size slide

  10. Business Impact

    View full-size slide

  11. The goal
    » ~100% availability ("nine nines")

    View full-size slide

  12. The goal
    » ~100% availability ("nine nines")
    » Consistent responsiveness under varying load
    conditions

    View full-size slide

  13. The goal
    » ~100% availability ("nine nines")
    » Consistent responsiveness under varying load
    conditions
    » Predictable spikes of traffic, e.g, Black Friday
    » Less predictable spikes of traffic, e.g,
    marketing campaign driving traffic

    View full-size slide

  14. The goal
    » ~100% availability ("nine nines")
    » Consistent responsiveness under varying load
    conditions
    » Predictable spikes of traffic, e.g, Black Friday
    » Less predictable spikes of traffic, e.g,
    marketing campaign driving traffic
    » Enable LOBs to rapidly adapt to market conditions

    View full-size slide

  15. A Revitalized Architecture

    View full-size slide

  16. Walmart's Business Uplift
    » Conversions up 20%
    » Mobile orders up 98%
    » No downtime Black Friday or Boxing Day

    View full-size slide

  17. Walmart's Operational Savings
    » Moved off expensive hardware
    » On cheap virtual x86 servers
    » 20% - 50% cost savings
    » ~ 40% compute cycles

    View full-size slide

  18. Where to begin?

    View full-size slide

  19. asynchronous, non-blocking, real-time, highly-
    available, loosely coupled, scalable, fault-tolerant,
    concurrent, reactive, event-driven, push instead of
    pull, distributed, low latency, high throughput...

    View full-size slide

  20. asynchronous, non-blocking, real-time, highly-
    available, loosely coupled, scalable, fault-tolerant,
    concurrent, reactive, event-driven, push instead of
    pull, distributed, low latency, high throughput...
    Too complicated. We need a simple vocabulary.

    View full-size slide

  21. Reactive
    A maturity model for modern
    distributed systems.
    » Responsive
    » Resilient
    » Elastic
    » Message-driven

    View full-size slide

  22. Why, What, How
    Reactive (principles)
    » responsive, resilient,
    elastic, message-driven

    View full-size slide

  23. Why, What, How
    Reactive (principles)
    » responsive, resilient,
    elastic, message-driven
    Microservices (strategy)
    » bounded contexts (DDD),
    event sourcing, CQRS,
    eventual consistency

    View full-size slide

  24. Why, What, How
    Reactive (principles)
    » responsive, resilient,
    elastic, message-driven
    Microservices (strategy)
    » bounded contexts (DDD),
    event sourcing, CQRS,
    eventual consistency
    Tools (implementation)
    » Typesafe Reactive Platform
    (Play, Akka, Spark)

    View full-size slide

  25. Heritage system

    View full-size slide

  26. Future system

    View full-size slide

  27. Clustered
    microservices
    » responsive to events, load,
    failure, users
    » embrace new concepts and
    patterns
    » cluster computing
    » distribution of data
    » new patterns like
    circuit breakers

    View full-size slide

  28. Async boundary

    View full-size slide

  29. Async boundary

    View full-size slide

  30. Asynchronous

    View full-size slide

  31. Microservices
    Ecosystem
    plus:
    » service registry
    » service discovery
    » architecture visualization
    » security

    View full-size slide

  32. Play Anatomy
    Stateless
    » Session is stored in the
    browser cookie
    Actions
    » User-defined functions that
    run in a different context
    than the request loop

    View full-size slide

  33. Play at its core
    » Familiar MVC paradigm
    » Embraces flows of data
    » WebSockets, SSE
    » Reactive Streams (experimental in Play 2.4)
    » File uploads
    » Integration with Akka
    » Distribute work via messaging

    View full-size slide

  34. Actor model
    » Distribution
    » Location transparency
    » Isolation

    View full-size slide

  35. Typical error channel

    View full-size slide

  36. Dedicated error channel

    View full-size slide

  37. Validation errors

    View full-size slide

  38. Spark & Fast Data

    View full-size slide

  39. Streams?
    » A series of elements over time
    » Events, chunks of files
    » No beginning, no end

    View full-size slide

  40. Akka Streams
    » Per-event processing
    » Back-pressure
    » Not distributed
    » Reactive Streams compliant
    » Integrate with Spark
    Streaming

    View full-size slide

  41. What Typesafe
    offers

    View full-size slide

  42. Typesafe ConductR
    Manage Typesafe Reactive Platform applications across a cluster

    View full-size slide

  43. Typesafe Monitoring
    Know exactly what your Reactive system is doing

    View full-size slide

  44. Commercial features
    » Akka Split Brain Resolver
    » Akka 2.3 Cluster Support for Docker
    » Play User Quotas
    » Play SOAP

    View full-size slide

  45. Project Success Subscription
    » Certified build
    » Compatibility verifications
    » Security alerts
    » Binary updates
    » Long-term support
    » Legal protection

    View full-size slide

  46. Thank you!
    Visit https://www.typesafe.com/products/typesafe-
    reactive-platform to get started
    Contact info
    » Twitter: @kvnwbbr
    » Email: [email protected]

    View full-size slide