REST API Requests in Go

What is REST? REST (REpresentational State Transfer) is an architectural style for designing and developing APIs that could be used for client and server interactions. REST defines 6 architectural constraints for APIs: Uniform interface: API requests for a resource should look the same irrespective of its origin client. The Uniform Resource Identifier (URI) allocated to resources should be unique. Client-server: Changes on the client side should not affect the server and vice-versa....

September 15, 2023 · 6 min · Avnish

Concurrency in Go

We can make a program concurrent if we can split it as multiple independent tasks executed at the same time. In concurrency, we execute different portions of a program at the same time (on single or multiple CPU threads) whereas in parallelism a singular task (or subtasks) is executed parallelly on multiple CPU threads. Concurrency is about dealing with lots of things at once. Parallelism is about doing lots of things at once....

September 12, 2023 · 8 min · Avnish

File Handling in Go

Reading and writing files is one of the most common tasks in programming projects. Using this skill we can store data persistently and decrease the memory consumption of our program. Paths The path/filepath package provides filepath.Join() function to create filesystem paths for files and directories. The same could also be achieved with string concatenation in Go but it won’t be interoperable between different operating systems (Linux uses the forward slash (/) for separators in the path whereas Windows uses the backward slash (\))....

June 27, 2023 · 10 min · Avnish

Go Programming Language

Go is a compiled language developed by Robert Griesemer, Rob Pike, and Ken Thompson at Google. It is primarily used in cloud-native and web development projects. Some of the popular projects created with Go Docker: Container Engine Kubernetes: Container Orchestrator Hugo: Static Site Generator (Also used to generate this blog) Helm: Package manager for Kubernetes Packages A Package abstraction is created in Go to group functions that are related to each other or associated with a specific task....

June 21, 2023 · 17 min · Avnish

Network Functions

Telcos (Telecommunication companies) deploy networks that have high availability, are scalable, and resilient covering entire countries. Components like routers, firewalls, and DHCP servers (called Network Functions) are the building blocks of such large network deployments. Traditionally, network functions were deployed on proprietary hardware with application-specific integrated circuits and installed on the telco’s premise (baremetal deployment). Such network functions are called Platform Network Functions (PNFs). PNF deployments present the following challenges:...

June 7, 2023 · 6 min · Avnish