Unified Historical and New Data Streams: Move the Polling to the Backend
Dec 14, 2019
Imagine the implementation of a continually updating time-series graph or a newsfeed.
It can be thought of as two data streams:
a finite stream populating historical data and an infinite stream providing the new data.
Traditionally, API clients (e.g. a UI) may be pulling this off by
continually polling the backend API endpoint at some interval or
juggling two separate endpoints for both streams. This post showcases moving that client logic into the backend API and
exposing a unified interface for handling both types of data streams.
Comparing Akka Untyped, FSM, and Typed Actors Part 1: Implementation
Sep 3, 2018
Using Akka actors in Scala,
I’ll be discussing three approaches to implement a finite state machine:
Untyped, Untyped FSM, and
Typed. I will provide code to portray their nuances and
highlight some interesting aspects of each.
Testing is another important consideration that I’ve saved for Part 2.
If one would rather run the full code and test suite,
I’ve put this project on my GitHub.