Diese Präsentation wurde erfolgreich gemeldet.
Wir verwenden Ihre LinkedIn Profilangaben und Informationen zu Ihren Aktivitäten, um Anzeigen zu personalisieren und Ihnen relevantere Inhalte anzuzeigen. Sie können Ihre Anzeigeneinstellungen jederzeit ändern.

Event Driven with Spring

357 Aufrufe

Veröffentlicht am

SpringOne Platform 2019
Session Title: Event Driven with Spring
Speaker: Oleg Zhurakousky, Developer, Pivotal
Youtube: https://youtu.be/oTTfaynD1Xc

Veröffentlicht in: Software
  • Looking For A Job? Positions available now. FT or PT. $10-$30/hr. No exp required.  http://t.cn/AieXSfKU
       Antworten 
    Sind Sie sicher, dass Sie …  Ja  Nein
    Ihre Nachricht erscheint hier

Event Driven with Spring

  1. 1. Even Driven Architectures with Spring Cloud Stream/Function. Oleg Zhurakousky @z_oleg 1
  2. 2. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ What is? 2 Event-driven architecture is a software architecture paradigm promoting the production, detection, consumption of, and reaction to events. Wikipedia
  3. 3. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ What is? 3 Event-driven architecture is a software architecture paradigm promoting the production, detection, consumption of, and reaction to events. Wikipedia Usually signifies the change of state which we want to record and/or react to.
  4. 4. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Communication and distribution 4 • Events don’t move, they occur • Often relies on network-based systems to communicate events (e.g., message driven middleware)
  5. 5. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Representation 5 • Events should carry enough information for the event consumer to act on it • Event payload • Even meta-data (time, id, source, type, etc) Message
  6. 6. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Reacting to events 6 • Process • Process and forward • Delegate (subset of process and forward)
  7. 7. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Event processing 7 • Simple event processing • Streaming event processing • Complex event processing (combination of both)
  8. 8. Demo
  9. 9. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Spring Cloud Stream 9 • Messaging framework which provides implementation of EIP on top of Spring Messaging
  10. 10. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Spring Cloud Stream 10 • Framework to build highly scalable event-driven and/or streaming microservices. • Provides boot-driven integration with Messaging Brokers using Destination Binders • Leverages native features of brokers while also providing a workarounds for not supported features. • Partitioning • Consumer Groups • Message Headers • Destination provisioning
  11. 11. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Spring Cloud Stream (cont…) 11 • Ability to connect microservices to external messaging systems via Binders • Kafka • Rabbit MQ • Etc. . . • Provides flexible programming model • Built on familiar Spring idioms • Supports pub/sub semantics, consumer groups, stateful partitions and other messaging paradigms • Message centric • Supports Imperative and Declarative programming models via Spring Cloud Function Message
  12. 12. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Spring Cloud Stream (cont…) 12 • Spring Cloud Stream - Spring Boot app • Flexible and minimalistic configuration • Seamless integration with the rest of the Spring Cloud stack • Metrics • Sleuth • Config • Circuit Braker • Etc.
  13. 13. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Spring Cloud Function 13 • Why functions and why Spring Cloud Function? • What is Spring Cloud Function? • How do we use Spring Cloud Function?
  14. 14. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Why functions? 14 • Simplicity yet the power of the three core strategies • Supplier<O> • Function<I, O> • Consumer<I> What requirement can NOT be expressed with functions?
  15. 15. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Spring Cloud Function 15 Why Spring Cloud Function?
  16. 16. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ What is Spring Cloud Function? 16 • Promotes implementation of business logic as functions • Supplier, • Function, • Consumer • Uniformed programming model • Transparent type conversion • Function Composition
  17. 17. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ What is Spring Cloud Function? (cont…) 17 • POJO functions (if it looks/smells like a function it must be a function) • Reactive support • Arity - functions with multiple inputs/outputs • Deployment of packaged functions (JARs or exploded archives) • Boot configuration • Simple Spring configurations • Simple non-Spring packages • Integration with serverless platforms • AWS • Azure All within spring-boot scope and features
  18. 18. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ What is Spring Cloud Function? (cont…) 18 • Function Catalog • Acts as a function registry • Wraps functions to add additional features • Composition • Type conversion • Function Registration • Encapsulates required information about functions • Input/Output types • Used for manual function registration
  19. 19. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Spring Cloud Stream/Function 19
  20. 20. Demo
  21. 21. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Summary 21
  22. 22. Learn More. Stay Connected. Thank you! @z_oleg 22 #springone@s1p

×