Retries, Timeouts and Backoff

Distributed systems are hard. While we learn a lot about making highly available systems, we often overlook resiliency in system design. Sure we have heard about fault-tolerant, but what is “resilience” now? Personally, I like to define it a system’s ability to handle and eventually recover from unexpected conditions. There are several ways to go about making your systems resilient to failure, but in this post, we will focus on following
Read more →

SSH Tunneling - Local, Remote & Dynamic

Most of us are familiar with SSH (Secure Shell) - a protocol which allows us to securely log onto remote systems. SSH Tunneling (also known as SSH Port Forwarding) is a feature of SSH which forwards encrypted connections between a local and remote system. SSH tunneling works by using the already established SSH connection for sending additional network traffic. We’re going to look at the three types of port forwarding - local, remote & dynamic.
Read more →

Haskell Lens - Part 1

Preface lens are one of the most popular, yet confusing aspect of Haskell. To be fair, I could never really understand how they work. This series of posts is going to be my attempt to understand lens, the ideas and implementation details, and also the lens package. I hope I’ll learn something in the process, and you will too (hopefully!). Before we begin, I’d like to give a heads-up about few things, so you know what lies ahead.
Read more →

What is Currying

Inspiration This post is written after I saw this tweet Every functional programming tutorial: > OK, we're going to talk about currying. Currying is when you break down a function tha- scrolls down > const Y = f => (g => g(g))(g => f(x => g(g)(x))) pic.twitter.com/EPHH9SG5ay — Ben Howdle (@ben_howdle) February 21, 2018 And realized that we need a simpler tutorial to understand currying, the logic behind it, the nuances and the usage.
Read more →

Foldable and Traversable in Haskell

Foldable Foldable represents data structure type class that provides a generalisation of list folding (foldr and friends). provides operations derived from list foldings to arbitrary data structures You can use a Foldable where you would have to traverse a dataset and reduce it to a single result. Get the product of a list Get the max path value in a tree In short, fold can be understood as function to reduce a large structure into a single result.
Read more →

Haskell’s Applicative Functors

Understanding Applicative functors would require some understanding about Functors and Monads. We shall try to look at brief definitions for the scope of this article. Functor According to Haskell docs, a functor is simply something that can be mapped over. In other words, it is an abstraction for a context with the ability to apply a function to all the things inside the context. The context can be defined as container, computation etc.
Read more →

lazy-seq - Lazy Sequences in Clojure

lazy-seq - How? Why? And other heresies
Read more →

Structured Clojure: Protocols

Clojure Protocols - Definition, implementation, extension, reification
Read more →

Clojure - Atoms

In Clojure, everything is immutable! So how can Clojure be used to build stateful applications? That’s where Atom enter the picture. In simple words, atom in Clojure is a built-in mechanism to manage application state. Atoms are mutable, and can be updated as many times as you want. Let’s look at a practical example to understand the usage and implications of atom . We begin by looking up the documentation of atom in repl.
Read more →