Dependency Mock Server & Black Friday Preparation

Last year while preparing for Black Friday our team had an interesting challenge:

Some of our downstream services1 had proper setup to provide environments/APIs to load test.

This meant will have to configure our systems based on hopeful estimates based on last minute estimates and until then, we would could only sit idle. This wasn't appealing for obvious reasons of doing a hackjob and having a firefighting mode during Black Friday/Cyber Week.

Proposed Solution: Dependency Mock Server

The solution I came up with and which we used was to have a Mock Server that served endpoints similar to our dependencies and return dynamic responses based on request payload.

Server with Three Dependencies

Read more…

OT: Mapping thoughts, Memex & Zettelkasten.

Off Topic are posts where I talk about the human side of things.

Vannevar Bush, As We May Think

Have you read Vannevar Bush's article As We May Think? In that article he discusses an interesting concept:

"A System becoming an extension of human knowledge and memory which may be consulted with exceeding speed and flexibility."

Now this might not seem groundbreaking to us for we have Computers, Internet and Search Engines (Google, DDG, etc.). However it's important to know that Hypertext, which is the backbone of internet, was created thanks to the inspiration taken from Memex, which is the name of the system Bush proposed.

Read more…

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…