SpringOne Platform 2017
Henri van den Bulk, Schwab; Craig Duero, Schwab; Tom Martin, Schwab
Spring Cloud Data Flow (SCDF) provides event streaming capabilities on a modern platform. A common challenge with event streaming systems is the ability to ascertain what happened with an event as it flows through the system. Due to the distributed nature of systems like SCDF sequential ordering and latency are a challenging problem. We’ve been able to combine Sleuth/Zipkin with SCDF to provide us with Latency and Event Tracing.
Strategies for Landing an Oracle DBA Job as a Fresher
Latency and Event Tracing with Spring Cloud Data Flow
1. Latency and
Event Tracing
in Spring Cloud
Data Flow
Henri M.B. van den Bulk
Technical Director – App Architecture
Craig Duero
Sr. Staff Software Applications Engineer
Tom Martin
Sr Staff Software Applications Engineer
Public Information
2. Charles Schwab Corporation
About Us
Henri M.B. van den Bulk
Technical Director - Application Architecture, CTO office
https://www.linkedin.com/in/hvandenbulk
@hmvandenb
2
Craig Duero
Technical Lead – Offer Order
https://www.linkedin.com/in/craig-duero
Tom Martin
Technical Lead – Offer Order
https://www.linkedin.com/in/martint73/
Public Information
3. Charles Schwab Corporation 3
“Before we begin, I need to say a few words concerning today’s
discussion. Please keep in mind that the views and opinions
expressed here are for general informational purposes only and
should not be considered an individualized recommendation or
personalized advice.”
Public Information
The Charles Schwab Corporation (Schwab), provides a full range of securities brokerage, banking, money management and financial advisory services through its operating
subsidiaries. Its broker‐dealer subsidiary, Charles Schwab & Co., Inc. (Member SIPC), offers investment services. Its banking subsidiary, Charles Schwab Bank (Member
FDIC and an equal housing lender) provides deposit and lending services and products.
5. Charles Schwab Corporation 5Public Information
Ref: http://www.aspentimes.com/news/aspens-ducky-derby-to-stay-afloat/
6. Charles Schwab Corporation
Event Processing: Overview
6
Event processing allows us to build
composable event processing pipelines
using a microservices approach.
A common challenge with event processing
systems is the ability to ascertain what
happened with an event as it flows through
the system. Due to the distributed nature of
systems sequential ordering and latency
are a challenging problem.
We want to understand our pipelines and
troubleshoot latency problems.
µ µ µ
Public Information
16. Charles Schwab
Requirement
16
Trade ID = 109202399 Customer ID = 642782050, Symbol = AAPL,
Action = Buy, Quantity = 1838, Confirmed = true
Input – Trade Event Output – Trade DetailsNew App
Our client wants us to send them trade details every time we receive new trade events
Public Information
17. Charles Schwab
How We Will Design This
17
• We will create 3 stream applications:
• Source – Receive the event
• Transform – Gathers trade details
• Sink – Sends details to client
• We will use Spring Cloud Dataflow to orchestrate and deploy the stream
Source Transform Sink
Public Information
18. Charles Schwab
Additional Features of Sleuth
Customizations
− Sample Rate
− Span Names
− Manual Creation and Closing of Spans
− Continue Span
− Span Injectors
Further Spring Integration
− RestTemplate
− Feign Client
− Hystrix
− @Async
1
8
Public Information
19. Charles Schwab
A Couple Things to Be Aware Of
Sleuth with Zipkin is not a complete logging solution
Doesn’t provide aggregation, reporting, alerting, etc.
Should be used in conjunction with other logging tools
Implementing Sleuth
Be prepared to refactor your code
Make sure you have the correct dependencies
Beware of potential issues with threading
Make sure all annotations are in a Bean class
Implementing Zipkin
Consider how much data you want to sample
Default datastore is in-memory
Currently supports persisting to MySQL and Cassandra
1
9
Public Information
20. Charles Schwab
Conclusion
Sleuth and Zipkin can be extremely valuable for latency and event tracing
Integrates easily with Spring Cloud Data Flow
No coding required to get started
Minimal coding needed for customizations
2
0
Public Information
21. Charles Schwab Corporation
Ref: https://lifehacker.com/5832038/fix-stretched-or-bent-sunglasses-with-a-hot-water-bath 21
At no point were rubber ducks hurt.