In this blog I will be explaining about the basics of DNS which will include:

  • What is DNS?
  • What services does it provide?
  • How does it work?
  • Different types of DNS records.

What is DNS

Humans can have different identifiers. Within a context, one identifier can be more appropriate than others. Like humans prefer to use “name” identifier, because they are more convenient to remember and refer to. Similarly in networks, hosts can have different identifiers. One of them is hostnamesuch as google.com, amazon.in, etc. Hostnames are easy to remember and refer hence are appreciated by humans.
But the…


An overview of how we did feature rollouts at GOJEK, and the framework we built to make it better.

gojek.jobs

The GOJEK app has been downloaded over 130 million times in Indonesia, and millions use it every day. In order to cater to the needs of our users, we release new features at a rapid pace. However, when you have such a massive audience base, it becomes difficult to gauge what new features will be useful and make genuine impact. So how do we approach the problem?

As Steve Jobs famously said, “People don’t know what they want until you show it to them.”

The best way to approach this then is to release multiple variations of a feature and…


How slices offer a dynamic, resizable alternative to arrays in Golang

gojek.jobs

If you’ve used Golang, you might be familiar with the concept of arrays. In this post, we’re addressing slices. Why do slices exist when you already have arrays, you ask? We’ll talk about that, and a few more ideas, like:

  1. What are slices and why do we need them?
  2. How do they work in Golang?
  3. What mistakes are made using slices and how to avoid them.

To understand the importance of slices, we need to talk arrays first. If you are familiar with arrays, then go ahead and jump directly to the section on slices.

Arrays

Similar to cpp, an array…


Why do slices exists if you already have arrays in golang? Let’s see why we need slices in golang.

So in this blog, we will talk about

  1. What are slices and why do we need them?
  2. How do they internally work in golang?
  3. What mistakes can we make while using slices and how to avoid those mistake.

For understanding the importance of slices, first, let's see what are arrays in golang? You are familiar with arrays then you can directly jump to slice section.

Arrays

Similar to cpp arrays in golang is the collection of the same type with continuous memory…


1. Explain the go workspace. (src , bin , and pkg in GOPATH)

In go you have to first specify the location of your workspace before any development and GOPATH is an environment variable which specifies the location of workspace of your go projects. By default, it is assumed to be $HOME/go.
GOPATH has src , bin and pkg directories.

  • src contains your go source files as packages.
  • bin contains executable commands like golint , gocov , glide , dep etc.
  • pkg contains package objects (suppose your project is in location $GOPATH/src/X/Y then the binary of the package with import path X/Y will be inpkg/{some-directory}/X/Y . {for more read this and this}

2. What are goroutines and how are they different from threads?

For…


When we want things to be done concurrently in Golang, we use Goroutines.

But wait. What is Concurrency?

Here’s an example: I’m writing this article and feel thirsty, I’ll stop typing and drink water. Then start typing again. Now, I’m dealing with two jobs (typing and drinking water) by some time slice, which is said to be concurrent jobs. Point to be noted here is that these two tasks (writing and drinking) are not being done at the same time. When things are being done at the same time it’s called parallelism.(Think checking your mobile AND eating chips).

So concurrency…


When we want things to be done concurrently in Golang, we use Goroutines.

But wait. What is Concurrency?

Here’s an example: I’m writing this article and feel thirsty, I’ll stop typing and drink water. Then start typing again. Now, I’m dealing with two jobs (typing and drinking water) by some time slice, which is said to be concurrent jobs. Point to be noted here is that these two tasks (writing and drinking) are not being done at the same time. When things are being done at the same time it’s called parallelism.(Think checking your mobile AND eating chips).

So concurrency…


In software development we often transfer data among servers or between servers and clients. And for the same we use different mechanisms and data formats. Protocol buffer is one of them. It is like JSON and XML but much faster than both. So here I will be talking about what it is, why is it faster than the others(JSON/XML) and why people are shifting towards it for most of the cases.

Initially proto buff was developed by google in early 2001 for internal server request/response protocol. Prior to this they were using marshalling and unmarshalling of request/response.(If you are curious…


It is a library which is mainly used for the defence mechanism in the distributed environment and making system more resilient. I wanted to know the reason behind its name and came to know that Netflix wanted a name which would keep the theme of resilience, defence and tolerance mechanism while being short and not already taken, and they come with the name of this mechanism as Hystrix(To know more click here).

In any distributed environment (with lot of dependencies), inevitably some of the many service dependencies fail. So Hystrix library is used to control the interaction between these distributed…


What is a Docker? Docker is a technology that allows us to run the self-contained applications without worries about dependencies and libraries. It follows the concept of containerization. Then what is a container? A container is an is an abstraction at the app layer and is a lightweight, stand-alone, executable package of a piece of software that includes everything needed to run it: code, dependencies , system libraries, settings etc.

Docker containers are light weight because while running on a single machine it shares that machine’s operating system kernel; they start instantly and use less compute and RAM. It isolate…

Riteek Srivastav

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