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

The Reactive Edge

The Reactive Edge

There is a huge demand for responsive, real-time mobile and web experiences, but current architectural patterns do not easily accommodate applications that respond to events in real time. Common solutions using message queues or HTTP long-polling quickly lead to resiliency, scalability, and development velocity challenges, due to the need to manage queues and develop complex workarounds for problems like thundering herds and dropped events. By adopting a protocol providing Reactive Streams semantics over the network boundary, we have been able to solve many of these problems at the communication layer. Using streams, data can be pushed to clients when it changes instead of having to long poll, while backpressure obviates the need for queues throughout the system. This makes it possible to create rich application experiences and support use-cases such as mobile-to-mobile communication and large file transfers that would be difficult or cost-prohibitive with traditional networking.

Ryland Degnan

October 20, 2017
Tweet

More Decks by Ryland Degnan

Other Decks in Programming

Transcript

  1. The Reactive Edge: Reinventing the Edge Tier Using a Reactive

    Communication Protocol Simplifying Distributed Communication Ryland Degnan ryland@netifi.com
  2. Who Am I? Ryland Degnan Chief Technical Officer at Netifi

    Formerly Netflix Edge Platform Team Contributor to RSocket, RxNetty linkedin.com/in/rjdegnan twitter.com/rjdegnan Simplifying Distributed Communication Ryland Degnan ryland@netifi.com
  3. “The Internet was done so well that most people think

    of it as a natural resource like the Pacific Ocean, rather than something that was man-made. When was the last time a technology with a scale like that was so error-free? The Web, in comparison, is a joke. The Web was done by amateurs.” —Alan Kay The Web is a Joke… Source: http://www.drdobbs.com/architecture-and-design/interview-with-alan-kay/240003442 Simplifying Distributed Communication Ryland Degnan ryland@netifi.com
  4. Increased Connectivity Massive Mobile Device Growth Realtime Interaction Expected The

    World is Changing… Simplifying Distributed Communication Ryland Degnan ryland@netifi.com
  5. Image Messaging New connected experiences are being created everyday VR

    Video Games Video Streaming The World is Changing… Simplifying Distributed Communication Ryland Degnan ryland@netifi.com
  6. Communication Communication is the foundation that all of these experiences

    are built upon Communication Simplifying Distributed Communication Ryland Degnan ryland@netifi.com
  7. HTTP Would you build your house on an old foundation?

    Simplifying Distributed Communication Ryland Degnan ryland@netifi.com
  8. The Foundation is Rotten HTTP Lots of Moving Parts Communicating

    between applications is complicated and inefficient. Unable to Cancel Work in Progress Server Unable to Signal When Ready to Handle Traffic Complicated Server and Application Configuration Errors are Hard to Handle Simplifying Distributed Communication Ryland Degnan ryland@netifi.com
  9. Does it have to be that way? Simplifying Distributed Communication

    Ryland Degnan ryland@netifi.com The Foundation is Rotten
  10. Time to Change the Foundation More Performant More Secure Cheaper

    and Easier to Build Faster Time to Market By changing the way applications communicate you can easily build rich experiences Simplifying Distributed Communication Ryland Degnan ryland@netifi.com
  11. HTTP Thundering herds Cascading failure Circuit breaking Retry logic Timeouts

    Configuration Simplifying Distributed Communication Ryland Degnan ryland@netifi.com
  12. HTTP TCP is a full-duplex protocol! Can’t we do better?

    Simplifying Distributed Communication Ryland Degnan ryland@netifi.com
  13. RSocket Reactive Streams over network boundaries, with different interaction models

    Application flow control, supports cancellation of work in progress Collaboration between Netflix, Facebook, Pivotal, Netifi and others A Better Foundation Reactive Streams Common interfaces for streaming data across an asynchronous boundary Collaboration between Netflix, Lightbend, Twitter, Pivotal and others Many implementations, now supported in JDK 9 Flow API Simplifying Distributed Communication Ryland Degnan ryland@netifi.com
  14. Towards a Reactive Edge: A Netflix Case Study Simplifying Distributed

    Communication Ryland Degnan ryland@netifi.com
  15. The Netflix API circa 2007 Fine-grained REST API forces client

    applications to make multiple calls that need to be assembled Mobile clients pay the price of WAN latency multiple times Ignores differences between devices Poor developer velocity for UI teams No fault tolerance isolation layer Simplifying Distributed Communication Ryland Degnan ryland@netifi.com
  16. Edge PoPs Core regions The Edge is Expanding Simplifying Distributed

    Communication Ryland Degnan ryland@netifi.com
  17. AWS Region AWS Region AWS Region Middle Tier & Platform

    Evolution of the Netflix Edge Simplifying Distributed Communication Ryland Degnan ryland@netifi.com
  18. Edge Network Edge Router Edge Router iOS Endpoint Load Balancer

    AWS Region AWS Region iOS User Evolution of the Netflix Edge Middle Tier & Platform Simplifying Distributed Communication Ryland Degnan ryland@netifi.com
  19. Edge Network Edge Router Edge Router iOS Endpoint Load Balancer

    AWS Region AWS Region iOS User Evolution of the Netflix Edge Middle Tier & Platform Simplifying Distributed Communication Ryland Degnan ryland@netifi.com
  20. Simplifying Distributed Communication Ryland Degnan ryland@netifi.com Reactive Edge Network… as

    a service A globally distributed Edge Network that anyone can plug into Self healing, no configuration of queues or circuit breakers Transparent discovery, load balancing, resumability, authentication/encryption
  21. IoT Analytics Logs Data Streams Kafka Spark Hadoop Other Services

    Your Infrastructure Global Edge Network Edge Data Gateway Edge Data Gateway Proprietary Optimized Transport US West US East Durable Message Storage Your Apps and Devices Simplifying Distributed Communication Ryland Degnan ryland@netifi.com
  22. Reactive Programming Model Advanced Application Protocol Secure By Default Predictive

    Load Balancing Application Flow Control prevents overloading downstream systems Leverage the richness of Reactive Streams APIs for client and server code Predicts latency of downstream systems and routes to best endpoint Provides a layer of abstraction over the complexity of building distributed systems Reactive programming model over the network Guaranteed message ordering and delivery All communication is encrypted point-to-point preventing message tampering and viewing by unauthorized parties Provides Perfect Forward Secrecy preventing MITM attacks Automatically routes traffic away from unhealthy instances Simplifying Distributed Communication Ryland Degnan ryland@netifi.com
  23. Reactive Programming Model Identical Examples No Callback Hell Easy fanout/composition

    Easier Error Handling Simplifying Distributed Communication Ryland Degnan ryland@netifi.com
  24. Proteus Protobuf compiler plugin Microservices with the click of a

    button https://github.com/netifi/proteus-java Netifi SDK Plug into our global edge network from anywhere Java & Android, iOS, C++ and JS soon https://github.com/netifi Get Involved! Simplifying Distributed Communication Ryland Degnan ryland@netifi.com