Introducing Off Topic

I miss the days of yore,
where blogs had focus broad.
A mix of hobbies or talents varied,
a window into a person's psyche.

A journal of sorts where they write,
of things that spark their interests and delights.
Then came the internet of modern times,
that asked of everything, to be commercialized.

I protest, I detest,
this utilitarian web.
`Off Topic` is where,
I break this thread.

Visual guide to polling in Functional Programming (Scala)

In this post, let's look at how to poll a system using a Stream.

To make it easier/interesting, I will explain it using a visual approach.

Let's use the following problem statement.

  • We have API for a queue1 that can be queried using pollFn function.
  • We need to process data returned by queue using process function.
  • There may or may not be data at the time of querying.

    Read more…