Contenu connexe
Similaire à Cloud Event Driven Architectures with Spring Cloud Stream 2.0 - Oleg Zhurakousky (20)
Plus de VMware Tanzu (20)
Cloud Event Driven Architectures with Spring Cloud Stream 2.0 - Oleg Zhurakousky
- 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/
Scope
2
• What is Cloud?
• What is Event and Event driven Architecture?
• Streaming
• Putting it all together with Spring Cloud Stream
• What’s new in 2.0?
• What’s next?
- 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/
Cloud
3
• Ecosystem that integrates platforms and middleware into one cohesive hybrid
runtime.
• Messaging (JMS, AMQP, Kafka, etc.)
• File Systems
• Databases
• Etc. . .
• Outsources infrastructure concerns to the cloud provider via cloud connectors/
services
• Provides mechanism for applications services (clients) to interact with cloud
services.
• Event oriented
- 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/
Events
4
• Event - representation of a state change
• Always in past tense
• Events are delivered in a form or protocol specific records using some Messaging
middleware.
• Many delivery mechanisms
• HTTP (REST)
• Publish/Subscribe
• variation of pipes-and-filters pattern
• multiple subscribers
• Events contain meta-data (i.e., event type)
• Event = Message
Message
- 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/
Stream
5
• Stream - processing graph
• Event (Message) is injected into the graph operators
• Graph operators pass events between one another
• Processing graphs could run in sequence or parallel
stream.flatMap(event -> multipleEvents).map(event -> newEvent). . .
- 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/
Spring Integration
7
• Messaging framework which provides implementation of EIP
on top of Spring Messaging
- 8. 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
8
• 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
• Honors application configurations by the underlying frameworks (spring-integration,
spring-kafka etc.)
- 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
• Transparent content-type negotiation and argument resolution
• Ability to connect microservices to external 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
Message
- 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 - programming model
10
• Spring Cloud Stream - Spring Boot app
• Flexible configuration (i.e., Annotation, XML, hybrid)
• Binders
• Streaming
• KStream
• Channel-based
• Kafka
• Rabbit
• Community-driven - Google, AWS, Azur etc.
• Seamless integration with the rest of the Spring Cloud stack
• Metrics
• Sleuth
• Config
• Circuit Braker
• Etc.
- 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
11
- 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/
What’s new in 2.0?
13
• Improved Content-type negotiation
• Default content-type
• User-defined message converters
• Polling Consumer
• New Actuator endpoints for Binding control
• Metrics - based on Spring Boot support for Micrometer
• Native support for Apache Kafka streaming
• https://youtu.be/YPDzcmqwCNo (Josh Long)
• Web support is now optional
• Deprecation of Java-based serialization
• Revamped user guide
- 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/
What’s new in 2.1?
14
Spring Cloud Function
- 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/
Spring Cloud Stream - Links
17
• http://cloud.spring.io/spring-cloud-stream
• https://github.com/spring-cloud/spring-cloud-stream
• https://github.com/spring-cloud/spring-cloud-stream-binder-kafka
• https://github.com/spring-cloud/spring-cloud-stream-binder-rabbit