How BigCache avoids expensive GC cycles and speeds up concurrent access in Go

A few days ago, I read an article about BigCache and I was interested to know how they avoided these 2 problems: concurrent access expensive GC cycles I went to their repository and read the code to understand how they achieved it. I think it’s amazing so I would like to share it with you. ‘Fast, concurrent, evicting in-memory cache written to keep big number of entries without impact on performance....

October 29, 2019 · 6 min · Me

Implementation of Dijkstra using heap in Go

Simple implementation of Dijkstra using heap in Go. What is Dijkstra? MEGA SHORT DESCRIPTION: Dijkstra’s algorithm to find the shortest path between a and b. It picks the unvisited node with the lowest distance, calculates the distance through it to each unvisited neighbor, and updates the neighbor’s distance if smaller. Mark all nodes unvisited. Create a set of all the unvisited nodes called the unvisited set, in our case we are going to use a set for visited nodes, not for unvisited nodes....

July 21, 2019 · 6 min · Me

Golang: capturing logs and send an email

In my company we have an ETL wrote in Golang to process the integrations with our partners, each integration is executed in an unique and isolate POD using cronjob k8s, each one print a bunch of data and metrics for each step executed using log the package in the standard library, all these logs are useful to monitor the integrations with different tools. In my team now we want to receive an email when some integration is failed with the logs of the process, so for that, we use a feature of log to change the output destination for the standard logger called SetOutput....

June 30, 2019 · 3 min · Me

Let's talk about Health Checks

According to the azure documentation in this excellent article, they state that. “It’s a good practice, and often a business requirement, to monitor web applications and back-end services, to ensure they’re available and performing correctly. However, it’s more difficult to monitor services running in the cloud than it is to monitor on-premises services.” “There are many factors that affect cloud-hosted applications such as network latency, the performance, and availability of the underlying compute and storage systems and the network bandwidth between them....

January 12, 2019 · 4 min · Me

Tracking Service with Go and Redis V2

Do you remember my last article where I wrote a service to look for a driver like uber? If not, you can check here So now, we going to write the V2 of our service. The current state of our service, when a user consumes the resource ‘search’, the user receives a response with the closer driver to him. But what would happen if there are no drivers close to the user?...

October 5, 2018 · 10 min · Me