Prasanth Janardhanan

Background task processor in Go with persistence support using BadgerDB

Goroutines can run tasks concurrently. However, for most practical scenarios, you have to keep track of the status of those tasks. In case the process exited, killed, or power cycled, a mechanism should restart the unfinished tasks. For example, imagine you moved order status emailing to a goroutine. If the process was terminated or restarted we have no way to keep track of the tasks that were in progress. A background task manager can keep track of the task in progress, retry if required, and also manage scheduled and recurring tasks.

Continue Reading →

A Simple Wrapper to BadgerDB Key-Value store in Go

BadgerDB is an embeddable key-value store written in Go. It is a persistent store. In this article, we build a wrapper around badgerDB. The purpose of this wrapper is to make it simple to save simple values to the DB in “virtual tables”. The concept is an adaptation from the Sett project. Much of the code -especially the unit tests - are changed though. Usage import( "github.com/prasanthmj/sett" ) s := sett.

Continue Reading →