MeloSpace

Written by Melodies Sim who lives and works in the Bay Area, California turning novel ideas into reality. Check out her projects on Github.

First Look at Hazard Pointers

October 23, 2021

Hazard pointers are a solution to safe memory reclaimation to lock-free concurrent objects. To motivate the use of hazard pointers, let us consider a problem: we want to implement a concurrent key-value map that satisfy the Write-Rarely-Read-Many (WRRM) property...

Lessons Learnt from Scaling Memcached in Production

April 22, 2021

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

Connection Pooling: 3 things you need to know to build a Connection Pool from scratch

January 01, 2021

A complete guide on how to build a connection pool to optimise inter-services communication.

Testing Python3 Context Managers

September 14, 2020

Python3 Context managers are beneficial tools for resource handling that involves locks and files. However, it might not be straightforward to test/mock...

Swift: The Power of Protocols

September 08, 2020

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

Lessons learnt from Hosting a Graphql server on GAE with Cloud Firestore

May 07, 2020

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

Building a Physics Engine from Scratch - Swift Series Part 2

February 17, 2020

MSpriteKit strives to be a general-purpose framework for drawing edges, and volume based nodes in two dimensions. It includes an in-built view renderer, while offering a simple programming interface...

Protocol-Oriented Programming - Swift Series Part 1

February 04, 2020

After watching WWDC talk on Protocol-oriented programming in Swift [2], I'm convinced there must be a better way than subclassing the pegs for three reasons. Here I'll summarise the 3 points I've gathered about classes...

Import images dynamically using require.context

December 27, 2019

The problem was trying to display an arbitrary number of images, each with a filename not known before hand ...

My Reflection on Startup Financing

October 07, 2019

Given that 70-90% of startups fail, from an investor's perspective, he needs to consider whether a startup can eventually scale up to 10x rewards. The VC model is hence, not to hope that all startups they invest in will succeed but ...

My Reflection on React Native vs Flutter

September 01, 2019

React Native allows one to utilise native components by running code through the native JS Engine and a Native JS Bridge, where Flutter uses virtual components. ...

Implement Password Reset Using JWT

August 12, 2019

This article aims to give a high-level overview of implementing password reset flow using JSON Web Tokens (JWT). ...

How to use Promise.all for multiple async functions

August 01, 2019

Consider this case: I have an array where I want to perform an async function on each element of the array. ...

Interesting Tech Meetups

July 31, 2019

Some of the ways I get to keep myself updated with the technology in the field is through atending tech meetups and listening to podcasts. ...

Hello World

July 30, 2019

This is my first post on my new personal website! As some of you might already know, I have created this website using Gatsby which is so awesome! ...