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.

Point-to-Point Messaging Architecture—The Reactive Endgame

101 views

Published on

SpringOne Platform 2018
Point-to-Point Messaging Architecture—The Reactive Endgame
Ryland Degnan, Netifi

Published in: Software
  • Be the first to comment

  • Be the first to like this

Point-to-Point Messaging Architecture—The Reactive Endgame

  1. 1. The Reactive Endgame Exploring new System Architectures with RSocket Ryland Degnan - @rjdegnan
 Stephane Maldini - @smaldini
  2. 2. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ “The network is the unsolved problem of cloud, and open source. We need the network to be a first-class citizen of a cloud system.” -Daniel Berg, distinguished engineer at IBM Cloud Communication in the Cloud is a Challenge 2 “A standard approach to connecting and communicating with microservices is needed. Standardization and uniformity simplifies management.” -Tony Lock, distinguished analyst at Freeform Dynamics
  3. 3. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ RSocket Was Built to Simplify Communication 3 Developed by leaders in microservices and cloud computing, contributors include Netflix, Facebook, Pivotal and Netifi. Open-source application-layer network protocol
  4. 4. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ RSocket operates via async message passing over a single connection. It is transport agnostic, providing a single, unified API for sending and receiving messages across all protocols. RSocket Was Built to Simplify Communication 4 Designed to simplify communication between services
  5. 5. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ In addition to flexibility in the underlying transport layer, RSocket provides session resumption, fragmentation and reassembly, application-layer flow control and predictive load balancing to protect both client and server resources from being overwhelmed. RSocket Was Built to Simplify Communication 5 Built for modern cloud applications
  6. 6. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ What is a Modern Cloud application? 6 A common mistake is to think of applications just in terms in the backend infrastructure. Today’s applications are distributed both geographically and in terms of where compute is run. The distinction between client and server is increasingly disappearing. Distributed, heterogeneous and interactive
  7. 7. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ What is a Modern Cloud application? 7 Browsers, mobile phones, gaming consoles, set-top boxes, IoT devices, laptops, servers. Multiple types of clients, platforms, languages
  8. 8. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ What is a Modern Cloud application? 88 Deployment topologies Platforms/frameworks Protocols/interaction models
  9. 9. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Axis 1: Deployment Topologies 9 Datacenter/private cloudMultiple public cloud providers
  10. 10. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Axis 2: Platforms/Frameworks 10 Multiple frameworksMultiple orchestration platforms
  11. 11. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Axis 3: Protocols/Interaction Models 11 Request-reply Streaming RPC Peer-to-peerReal-time
  12. 12. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Can We Do Something About This Mess? 12 Request-reply Streaming RPC Peer-to-peerReal-time
  13. 13. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Things We Can’t Do Anything About 13 It’s tempting to address complexity by imposing uniformity of infrastructure. This is costly and constraining, and doesn’t address any of the difficulties in building reliable distributed applications. Deployment Topology
  14. 14. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Things We Can’t Do Anything About 14 Frameworks and languages have their place, we want to be open to new technologies and allow developers the freedom to choose the right tools for the job. Proliferation of development frameworks
  15. 15. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Things We Can Do Something About 15 Define a standard protocol that enables us to use this small finite set of interactions across any combination of infrastructure, language, framework, so they don’t have to be implemented, reimplemented and implemented again! Standard approach to communication
  16. 16. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ 16
  17. 17. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ The RSocket contract 17 public interface RSocket extends Closeable { Mono<Payload> requestResponse(Payload payload); Mono<Void> fireAndForget(Payload payload); Flux<Payload> requestStream(Payload payload); Flux<Payload> requestChannel(Flux<Payload> payloads); double availability(); }
  18. 18. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ The RSocket contract 18 Every application the same concerns: flow control, session resumption, security, metrics/insights, tracing, service discovery, load balancing, fault injection, etc. RSocket gives you the ability to solve problems you care about in a consistent way across your application
  19. 19. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ The RSocket contract 19 Standardizing on a common network abstraction means everything is pluggable.
 You can switch cloud providers, orchestration platforms, transports, metrics backends, with no code changes. Without making any assumptions about the infrastructure, language or framework you are using
  20. 20. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ The RSocket contract setup 20 RSocket foo = RSocketFactory.connect() .transport(TcpClientTransport.create("1.2.3.4", 80)) .start() .block(); foo.request(new DefaultPayload(…)) .doOnComplete(() -> System.out.println(“hourray”) .subscribe(); Censored ByteBuffer creation
  21. 21. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ 21 Too Low Level ?
 Shift to the next gear with existing tech built on RSocket The RSocket contract setup 😱
  22. 22. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Contract driven and stubs with rsocket-rpc 22 RecordsServiceClient rankingService = new RecordsServiceClient(rsocket); recordsService.records(RecordsRequest.newBuilder().setMaxResults(16).build()) .subscribe(record -> System.out.println(record)); service RecordsService { rpc records (RecordsRequest) returns (stream Record) {} } You still need to manage this part somehow
  23. 23. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Contract driven and stubs with rsocket-rpc 23 service RecordsService { rpc records (RecordsRequest) returns (stream Record) {} } let recordServiceClient = new RecordsServiceClient(rsocket); let req = new RecordRequest(); req.setMaxResults(16); recordServiceClient.records(req) .subscribe();
  24. 24. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ 24 Still Too Low Level ? 🤢
  25. 25. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ • Easy Routing to Services and Devices • Built-in Flow Control • Built-in Monitoring • Extremely low latency • Predictive Load Balancing • No Agents or Sidecars Building new systems with RSocket : Proteus 25
  26. 26. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Building new systems with RSocket : Proteus 26 @Group("springone.demo.records") private RecordsServiceClient recordsService; netifi.proteus.broker.hostname=springone.netifi.io netifi.proteus.broker.port=8001
  27. 27. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ 27 Spring Boot level 😎
  28. 28. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Proteus Simplifies Cloud Applications 28 SelfManaging Proteus Proteus Pluggable Transport ControlCenter
  29. 29. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ 29 Proteus Proteus Simplifies Configuration
  30. 30. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Proteus PCF Service available soon® 30
  31. 31. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ 31 Folks, we are about to Demo !
  32. 32. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ 32 Demo time https://github.com/netifi/springone-demo 🤜🤛

×