Cache: The more the data grows, the more the data database transactions grow, and the importance of cache grows.

Introduction

While scaling our microservices, we might have a question about whether we should implement caching mechanisms or optimize our database layers. Both have their own pros and cons depending upon our requirements and architecture. In this article, we would mainly be discussing caching and implementing simplistic

Implementing a caching mechanism or cache store helps us reducing the load on our database engines (indirectly saving us some money as well!!)

Why caching?

Even though horizontally scaling the application would add more resources and…


In this article, we would be discussing implementing a stack in Golang.
It would be a continuation of my series of implementing Data Structures in Golang

Introduction

What is Stack?

Stack is a simple data structure used for storing data. In a stack, the order in which the data arrives is of the most importance.

Stack is an ordered list in which insertion and deletion are done at the end, known as the . The last element inserted in the stack is the first element to be deleted/removed first.
It is known as Last In First Out (LIFO).

Stack

Implementation

We…


In this article, we would be discussing the implementation of Queue(backed by Array/Slice) in Golang
This would be a follow-up to my recent article:

Introduction

A queue is an abstract data structure (ADT) that follows a particular order in which the operations are performed.
It follows the First In First Out (LIFO) order for operations.
In a layman example, a queue is any queue of consumers for a resource where the consumer that came first is served first.

The difference between a queue and a stack is the removal order, in a stack, we remove the item…


Introduction

If a reader with a basic understanding of Golang might know that it has data structures like array, slice, map.
But being accustomed to Java, I missed the support of the Collections framework, its simplicity in usage, and multiple options like HashMap, TreeMap, ConcurrentHashMap, etc. which we can use as per our requirements.

Thus it led me to the question of whether if we can implement the same Java Collections in Golang from a curiosity perspective.
I am starting with the first of such implementation with LinkedList.

Let’s start with our implementation.

LinkedList

LinkedList

A linked list is a linear data structure…


Why GraphQL?

That’s the first question I had asked myself when my team had the requirement to expose GraphQL endpoints along with already existing RESTful APIs.
Upon some brainstorming (which is nothing but Google, StackOverflow articles) we reached our conclusion.


Introduction

We would be developing an application that exposes a basic REST-API server for CRUD operations for managing Persons Before we start, lets us make a check that the reader might have basic knowledge of SQL and Golang.
In case of learning more about Golang, would suggest going through Go By Example

So let’s dive in!!

Setting up the application

Let’s start with creating our root folder

mkdir rest-go-demo &&…

Vishal Jain

Learning a new thing at a time, problem solver and a knowledge seeker , SDE-II at Bookmyshow, ex-Connectwise, Zycus

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