development

Ceph RGW Internals: Cache Coherence & Bucket Life Cycles

RGW Cache Coherence Why RGW have a control pool? We will try to understand its use case and purpose in RGW for cache synchronization. RGWRados::init_watch() Creates watcher objects in RGW control pool $ sudo rados ls -p .in-abc-1.rgw.control notify.1 notify.6 notify.3 notify.7 notify.2 notify.4 notify.5 notify.0 The common assumption is that these objects are watched […]

Read more
development

Design: Brave Device Sync

The Brave Browser offers a sync facility that keeps bookmarks and browsing history across Brave browser installations. So your data from phone, laptop or iPad could all become one. All at the same time respecting your privacy. The current design of sync uses a device ID to identify a client. A client calls Brave server […]

Read more
development

Why Redis Pipelining is a Good Idea?

What is PipeLining? Pipelining is a form of asynchronous task execution. A Pipeline is a task that is composed of many subtasks. Each subtask may be dependent on its previous subtasks. t1 => t2 => t3 ^ t4 =| t2 depends on t1. t3 is dependent on t2 & t4. While we are executing subtask […]

Read more
development

Simplifying go-kit toolkit for Microservices – Part I

Introduction go-kit is one of the most complete and flexible toolkits for developing microservices in Go language. At the same time, the learning curve of go-kit is steep. In this post, I’m trying to explain go-kit fundamental components using general purpose client-server model of Linux. General Purpose Client-Server Architecture A server in Linux binds & […]

Read more
development

Why Using Golang sync Pool is a Bad Idea?

Not an absolutely bad idea, but you need a careful understanding before using sync Pool. Golang sync Pool is used to create a self-managed object pool, with just New/Get/Set functions. The Pool implementation uses a mutex based locking for thread-safe operations from multiple Go routines. Design Principles Golang sync. Pool use garbage collection to manage […]

Read more
development

Notes on Python Decorator

Notes on Python Decorator Python decorator is a function wrapper. It helps you wrap essential tasks around your functions such as logging, ratelimits, metrics updates etc. However, it has a peculiar behavior due to its dynamic implementation. If you run the following code, what is the expected output? def register(func): print(“hello to decorator!”) def another(): […]

Read more
design, development

Why ‘cd’ is not an external command like ls?

cd command changes the current directory to desired valid path. The shell is a process that runs user commands. Each command is run by forking a new process and exec’ing. After exec, the child process dies. cd changes the current environment. If cd is an external command, the usual flow of fork->exec would cause environment […]

Read more