Implement Go version manager

development golang

Introduction In this post, we will learn more about Go programming language by implementing a Go version manager CLI tool. The goal of this CLI tool is to manage different versions of Go installed on our development machine. As part of implementing the tool, we will learn about command-line flags, bash completion, HTTP client to download archives and interaction with files or directories. Let’s dive into the requirements and the features we will support with the tool and the implementation of the tool using Go.

Implementing mTLS in Go

development golang microservices

Introduction Mutual authentication with Transport Layer Security (mTLS) is a method for mutual authentication. It is often used in securing network communication between two services and ensures that the parties at each end of this communication are who they claim to be by verifying that they both have the correct private key. It has been a standard security and authentication mechanism in a service mesh like Istio, Linkerd, AWS App Mesh and others.

Union Find in Python

algorithms python

Introduction According to Wikipedia, dynamic connectivity structure is a data structure that dynamically maintains information about the connected components of a tree. Once the the dynamic connectivity structure is built, it should adapt itself such that it can give quick answers to queries of the form “is there a path between x and y?”. The Union-Find algorithm is one approach build this connectivity structure. There are multiple approaches the Union-Find algorithm, the most optimal approach is the Weighted Quick Union algorithm.

Background Tasks in Go

development golang workers

When you design a software system or REST API, there are times when you would want to process large amounts of data or do time consuming computations that cannot be completed within a decent amount of time. You cannot expect your users to make an HTTP call that takes several seconds or minutes to respond while the backend server handles the request by doing some time consuming task. Often the load balancer or the HTTP server will enforce a timeout for a request after which the connection is terminated and results in a gateway timeout error.

Read More




Receive Messages from AWS SQS using Go

development golang aws sqs

In order to work with AWS SQS using Go, we will use github.com/aws/aws-sdk-go-v2. In this gist, we will use the aws-sdk-go-v2 package to receive messages from a queue in AWS SQS. The complete source code for the snippet is available here https://github.com/abvarun226/blog-source-code/tree/master/receive-messages-from-aws-sqs-using-go

In order to test the snippet, we will use localstack to run SQS emulator in a docker container on the laptop. The container exposes SQS endpoint on port 4566. The snippet will then receive a message from queue first-queue in SQS.

Send Messages to AWS SQS using Go

development golang aws sqs

In order to work with AWS SQS using Go, we will use github.com/aws/aws-sdk-go-v2. In this gist, we will use the aws-sdk-go-v2 package to send messages to a queue in AWS SQS. The complete source code for the snippet is available here https://github.com/abvarun226/blog-source-code/tree/master/send-messages-to-aws-sqs-using-go

In order to test the snippet, we will use localstack to run SQS emulator in a docker container on the laptop. The container exposes SQS endpoint on port 4566. The snippet will then send a message to queue first-queue in SQS.

Delete Queues in AWS SQS using Go

development golang aws sqs

In order to work with AWS SQS using Go, we will use github.com/aws/aws-sdk-go-v2. In this gist, we will use the aws-sdk-go-v2 package to delete queues in AWS SQS. The complete source code for the snippet is available here https://github.com/abvarun226/blog-source-code/tree/master/delete-queues-in-aws-sqs-using-go

In order to test the snippet, we will use localstack to run SQS emulator in a docker container on the laptop. The container exposes SQS endpoint on port 4566. The snippet will then delete a queue first-queue in SQS.

List Queues in AWS SQS using Go

development golang aws sqs

In order to work with AWS SQS using Go, we will use github.com/aws/aws-sdk-go-v2. In this gist, we will use the aws-sdk-go-v2 package to list queues in AWS SQS. The complete source code for the snippet is available here https://github.com/abvarun226/blog-source-code/tree/master/list-queues-in-aws-sqs-using-go

In order to test the snippet, we will use localstack to run SQS emulator in a docker container on the laptop. The container exposes SQS endpoint on port 4566. The snippet will then list all queues in the AWS SQS account.

Read More


About

Bharghava Varun Ayada is a Staff Software Engineer at Walmart Labs, living in Bangalore, India. This blog is about software engineering, system design, distributed systems and DevOps.


Github / Twitter / LinkedIn / Dev.to / Stackoverflow


Recommended Books
Designing Data-Intensive Applications / Staff Engineer / Building Microservices / Site Reliability Engineering

Get new posts by email