Connections are everywhere! To communicate between 2 parties, we need connections. We use them in modern web stack and apps: from server-client to server-database interactions. But why don't we hear about it often?

Abstraction! Details on connections are often abstracted away (and for good reason!). However, if you are planning to build your own program with great performance, a firm understanding of what goes under the hood is definitely an advantage!

In this article, I will be starting off with a common problem to motivate the use of connection pooling. …

Lessons learned from the distributed large-scale computation pipeline that Google built.

Photo by Rajeshwar Bachu on Unsplash

What is MapReduce?

MapReduce is an interface that enables automatic parallelization and distribution of large-scale computation while abstracting over “the messy details of parallelization, fault-tolerance, data distribution, and load balancing” [1].

As the name suggests, MapReduce is inspired by the map and reduce functions present in many functional languages. These functions allow MapReduce to parallelize large computation easily and use re-execution as a key mechanism to deal with failures.

What were the problems MapReduce was trying to solve?

Before MapReduce, Google has implemented hundreds of computations that process a large amount of raw data to compute various derived data.

They found that most of these computations were conceptually straightforward. However, the difficulty…

Key considerations and strategies to build a highly available cache solution for business use cases

Photo by Elena Mozhvilo on Unsplash

Memcached is a well-known, simple, in-memory cache solution and is used by several large companies such as Facebook, Twitter, and Pinterest. The main use case for Memcached is look-aside caching, to reduce the load on the database. Unlike Redis, Memcached, known for its simplicity, does not offer any in-built high availability features.

The Problem

As the scale of a cache cluster expands, high availability (HA) becomes a critical issue. How do we respond quickly in situations where a cache server crashes temporarily or even permanently? How do we prevent request overload to our Database servers?

While there have been a few open-source…

Banner image from [1].

What is Memcached

Memcached is a free & open source, high-performance, distributed memory object caching system, generic in nature, but intended for use in speeding up dynamic web applications by alleviating database load. [1]

Memcached is known for its simplicity as a distributed cache. Its simple design promotes not only quick deployment, ease of development but also has been reported to be faster than other cache system like Redis in performance comparisons.

Benchmarking or stress testing is crucial for testing the bottlenecks and safe lines in any system. …

Understanding Swift’s protocols and how to apply them to improve code performance and modular flexibility

Photo by Brooke Lark on Unsplash


At the heart of Swift’s design are two powerful programming paradigms: protocol-oriented programming (POP) and class-based inheritance. POP helps solve some of the problems arising from class-based inheritance such as intrusive inheritance, implicit sharing, and lost-type relationships.

POP also improves model flexibility with new features such as retroactive modeling using Protocol Extensions. Furthermore, as Swift doesn’t offer multiple inheritances of classes, POP can help achieve that by making classes/structs conform to multiple protocols instead.

In the following sections, we will examine:

  • how to apply protocols to achieve greater code performance, flexibility, and maintainability
  • highlight new features POP brings i.e.

Photo by Franck V. on Unsplash

This article will be a quick guide on how to bootstrap a Graphql server on Google App Engine, using Firestore as a cloud database.

Main libraries used:

  1. Typescript
  2. Apollo Server Express
  3. Firestore Admin
  4. Google Cloud SDK

Access the full code here:

Setup Typescript in your project

  1. Run yarn init and follow the prompts to create your project. The entry point for your app will be dist/index.js.
  2. Install tsc globally to transpile .ts code using yarn add global tsc
  3. Install other dependencies using: yarn add tslint @types/node tslint-config-airbnb typescript ts-node-dev --dev

Both the dev and start script can be used to run…

Melodies Sim

Passionate in building and breaking stuff.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store