More Related Content Similar to Cloud Event Driven Architectures with Spring Cloud Stream 2.0 - SpringOne Tour NYC (20) More from VMware Tanzu (20) Cloud Event Driven Architectures with Spring Cloud Stream 2.0 - SpringOne Tour NYC1. Spring Cloud Stream - developer
recipes, what’s new and what’s next?
Oleg Zhurakousky
@z_oleg
1
2. Unless otherwise indicated, these slides are © 2013 -2017 Piv otal Software, Inc. and licensed under a Creative
Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/
Disclaimer - fine print
2
This presentation contains statements relating to Pivotal’s expectations, projections, beliefs and prospects which are “forward-looking
statements” about Pivotal’s future which by their nature are uncertain. Such forward-looking statements are not guarantees of future
performance, and you are cautioned not to place undue reliance on these forward-looking statements. Actual results could differ materially
from those projected in the forward-looking statements as a result of many factors, including but not limited to: (i) adverse changes in
general economic or market conditions; (ii) delays or reductions in information technology spending; (iii) risks associated with managing the
growth of Pivotal’s business, including operating costs; (iv) changes to Pivotal’s software business model; (v) competitive factors, including
pricing pressures and new product introductions; (vi) Pivotal’s customers’ ability to transition to new products and computing strategies
such as cloud computing, the uncertainty of customer acceptance of emerging technologies, and rapid technological and market changes;
(vii) Pivotal’s ability to protect its proprietary technology; (viii) Pivotal’s ability to attract and retain highly qualified employees; (ix) Pivotal’s
ability to execute on its plans and strategy; and (x) risks related to data and information security vulnerabilities. All information set forth in
this presentation is current as of the date of this presentation. These forward-looking statements are based on current expectations and are
subject to uncertainties and changes in condition, significance, value and effect as well as other risks disclosed previously and from time to
time in documents filed by Dell Technologies Inc., the parent company of Pivotal, with the U.S. Securities and Exchange Commission. Dell
and Pivotal assume no obligation to, and do not currently intend to, update any such forward-looking statements after the date of this
presentation. The following is intended to outline the general direction of Pivotal’s offerings. It is intended for information purposes only and
may not be incorporated into any contract. Any information regarding pre-release of Pivotal offerings, future updates or other planned
modifications is subject to ongoing evaluation by Pivotal and is subject to change. This information is provided without warranty or any
kind, express or implied, and is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making
purchasing decisions regarding Pivotal’s offerings. These purchasing decisions should only be based on features currently available. The
development, release, and timing of any features or functionality described for Pivotal’s offerings in this presentation remain at the sole
discretion of Pivotal. Pivotal has no obligation to update forward-looking information in this presentation.
3. Unless otherwise indicated, these slides are © 2013 -2017 Piv otal Software, Inc. and licensed under a Creative
Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/
Scope
3
• 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?
4. Unless otherwise indicated, these slides are © 2013 -2017 Piv otal Software, Inc. and licensed under a Creative
Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/
Cloud
4
• 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
5. Unless otherwise indicated, these slides are © 2013 -2017 Piv otal Software, Inc. and licensed under a Creative
Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/
Events
5
• 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
6. Unless otherwise indicated, these slides are © 2013 -2017 Piv otal Software, Inc. and licensed under a Creative
Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/
Stream
6
• 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). . .
8. Unless otherwise indicated, these slides are © 2013 -2017 Piv otal Software, Inc. and licensed under a Creative
Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/
Spring Integration
8
• Messaging framework which provides implementation of EIP
on top of Spring Messaging
9. Unless otherwise indicated, these slides are © 2013 -2017 Piv otal Software, Inc. and licensed under a Creative
Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/
Spring Integration
9
• Pros/Cons
• Handles message dispatching while exposing POJO-based flexible
application development model
• Shares resources
10. Unless otherwise indicated, these slides are © 2013 -2017 Piv otal 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 workaround for not
supported features.
• Partitioning
• Consumer Groups
• Message Headers
• Destination provisioning
• Honors application configurations by the underlying frameworks (spring-integration,
spring-kafka etc.)
• Kafka & Rabbit are currently supported
11. Unless otherwise indicated, these slides are © 2013 -2017 Piv otal Software, Inc. and licensed under a Creative
Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/
Spring Cloud Stream
11
• Transparent content-type negotiation and argument resolution
• Ability to connect microservices to external systems
• Kafka
• Rabbit MQ
• JMS
• Etc. . .
• Provides flexible programming model
• Built on familiar Spring idioms - Spring Messaging
• Supports pub/sub semantics, consumer groups, stateful partitions and other messaging paradigms
• Message centric
• Supports Imperative and Declarative programming models
Message
12. Unless otherwise indicated, these slides are © 2013 -2017 Piv otal Software, Inc. and licensed under a Creative
Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/
Spring Cloud Stream - programming model
12
• Imperative
• Declarative
13. Unless otherwise indicated, these slides are © 2013 -2017 Piv otal Software, Inc. and licensed under a Creative
Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/
Spring Cloud Stream
13
14. Unless otherwise indicated, these slides are © 2013 -2017 Piv otal Software, Inc. and licensed under a Creative
Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/
Spring Cloud Stream - programming model
14
• Spring Cloud Stream - Spring Boot app
• Flexible configuration (i.e., Annotation, XML, hybrid)
• Binders
• Streaming
• KStream
• Channel-based
• Kafka
• Rabbit
• Seamless integration with the rest of the Spring Cloud stack
• Metrics
• Sleuth
• Config
• Circuit Braker
• Etc.
15. Unless otherwise indicated, these slides are © 2013 -2017 Piv otal Software, Inc. and licensed under a Creative
Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/
Spring Cloud Stream - summary
15
• Durable Publish-Subscribe messaging
• For easily creating complex topologies
• Consumer groups
• Multiple instances can be competing consumers when scaling
• Declarative data partitioning
• Colocating related data in consumer instances (Kafka, Rabbit etc)
• Content negotiation
17. Unless otherwise indicated, these slides are © 2013 -2017 Piv otal 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?
17
• 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
19. Unless otherwise indicated, these slides are © 2013 -2017 Piv otal Software, Inc. and licensed under a Creative
Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/
Things to think about. . .
19
• Bridge-based binding
• source/target to SI channels
• user must be aware of Spring, SI and other (dispatching, message immutability etc)
Rabbit queue -> SI channel -> Argument Resolution -> user code -> SI channel -> conversion to wire - target exchange
• Spring Cloud Stream infrastructure mixed with functional code
• @EnableBinding
• Complex message processing use cases (batching/windowing, transactions etc)
• Serverless (Java 8 Functions)
• Event based
• Dynamic resource utilization "scale to 0"
• Focus on business logic
• Easy integration with platform services (binders)
• Cross platform (SCF adapters AWS, Azure, Openwhisk etc)
• Source/Sink conceptual mismatch (is source and app or just a source?)
20. Unless otherwise indicated, these slides are © 2013 -2017 Piv otal Software, Inc. and licensed under a Creative
Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/
Spring Cloud Stream - programming model
20
• Imperative
• Declarative
21. Unless otherwise indicated, these slides are © 2013 -2017 Piv otal Software, Inc. and licensed under a Creative
Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/
Source/Sink conceptual missmatch
21
Type to enter a caption.
22. Unless otherwise indicated, these slides are © 2013 -2017 Piv otal Software, Inc. and licensed under a Creative
Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/
Serverless/Functions
22
Type to enter a caption.
23. Unless otherwise indicated, these slides are © 2013 -2017 Piv otal Software, Inc. and licensed under a Creative
Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/
Direct Binding & Function composition
23
Type to enter a caption.
24. Unless otherwise indicated, these slides are © 2013 -2017 Piv otal Software, Inc. and licensed under a Creative
Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/
Spring Cloud Functions - cross platform
24
Type to enter a caption.
25. Unless otherwise indicated, these slides are © 2013 -2017 Piv otal Software, Inc. and licensed under a Creative
Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/
Spring Cloud Stream - Links
25
• 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
Editor's Notes The emergence of microservices and cloud native architectures has triggered a resurgence of interest in Event Driven and Streaming Architectures where Event is one of the building blocks and the primary mechanism for enabling eventual consistency in a distributed system.
But what is Cloud Native Architectures? What is Event and Event Driven Arch?
Not something that is new. In fact it is not new at all but it is evolving in such speed that we constantly need to redefine, clarify, expend and formulate what does it really mean to us?
If ask people to define the cloud what are the chances I’ll get the same answer? The emergence of microservices and cloud native architectures has triggered a resurgence of interest in Event Driven and Streaming Architectures where Event is one of the building blocks and the primary mechanism for enabling eventual consistency in a distributed system.
But what is Cloud Native Architectures? What is Event and Event Driven Arch?
Not something that is new. In fact it is not new at all but it is evolving in such speed that we constantly need to redefine, clarify, expend and formulate what does it really mean to us?
If ask people to define the cloud what are the chances I’ll get the same answer? Allows clients to communicate and integrate with one another using cloud-managed shared services LocalTime.now(); - not true LocalTime.now(); - not true LocalTime.now(); - not true LocalTime.now(); - not true