3. RISKIFIED
total employees
in New York and
Tel Aviv
$64M
in funding secured
to date
1.000.000
global orders reviewed
every day
1000
merchants, including
several publicly traded
companies
250
14. Browser HTTP Server
latencies
write to journal
10 second windows (for each user)
Lowest Latency
Stream
Processing
lowest
latencies
Database
consume
22. Gather lowest latencies
● per each session
● per 10 second window
Browser HTTP Server
latencies
lowest
latencies
Database
write to journal
consume
Stream
Processing
Take #1
29. write to journal
Browser HTTP Server
latencies
1) Bring up only the HTTP server,
and wait for latencies to accumulate
1
30. 1) Bring up only the HTTP server,
and wait for latencies to accumulate
2) Only then bring up stream processing
31. write to journal
consume
1Browser HTTP Server
latencies
2
Database
Stream
Processing
lowest
latencies
1) Bring up only the HTTP server,
and wait for latencies to accumulate
2) Only then bring up stream processing
32. Instead of this:
10 second windows (for each user)
Lowest Latency
2
Database
write to journal
consume
1Browser HTTP Server
latencies
lowest
latencies Stream
Processing
33.
34. 10 second windows (for each user)
Lowest Latency
We get this:
2
Database
write to journal
consume
1Browser HTTP Server
latencies
lowest
latencies Stream
Processing
37. Event
Time
● Timestamp as payload
● Plays well with
distributed systems
● Not available in libraries
Processing
Time
● Time derived from clock
● Less suitable for
business logic
● Available in libraries😕
😀
56. case class Step(presentTime: Timestamp,
windows: Map[Interval, Set[Any]])
Timekeeping
Newer events advance 'presentTime’
Active
Windows
Logical
Clock
57. case class Step(presentTime: Timestamp,
windows: Map[Interval, Set[Any]])
Timekeeping
Windows represented as key-set by interval
Active
Windows
Logical
Clock
83. Thank you for
your time!
Thank you!
Glazier
https://github.com/riskified/glazier
“Streaming Microservices”, Dean Wampler
https://slideslive.com/38908773/kafkabased-microservices-with-akka-streams-and-kafka-streams
“Windowing data in Akka Streams”, Adam Warski
https://softwaremill.com/windowing-data-in-akka-streams/
Hinweis der Redaktion
Riskified is the world's leading eCommerce fraud prevention company.
We use machine learning and behavioural analytics to protect our customers from online fraud.
How many familiar with Akka Streams?
How many with Kafka or Flink?
Faced with a decision between the two?
“One thing we analyze is page visits to shops: what pages, when, and in particular—latencies”
Let’s run this through
Whale: public domain
Butterfly: taken from wikipedia, should be commons-*
No copyright info, appears to be in public domain
How many use:
Spark? Flink?
Kafka Streams?
Akka Streams? Monix? Fs2?
How many of you are evaluating these as alternatives?
Check out our other sessions here
and drop by our booth to learn more about us!
“...By the time events reach our code, timing for 10s windows is inaccurate,
Worse: catching up with backlog will flood 10s windows”