Middle+
Tell us about the last project you worked on. What is your current role?.
sobes.tech AI
Answer from AI
In my last project, I worked on a monitoring and alerting system for a distributed application in Go. My main task was to develop microservices responsible for collecting and aggregating metrics from various sources. I implemented REST APIs for frontend interaction and integrated with a database for storing time series.
I also focused on optimizing service performance, implemented caching, and wrote unit tests for key components. During the project, I used goroutines and channels for efficient handling of concurrent requests.
Here's an example of a simple HTTP server in Go that I could use for API:
package main
import (
"fmt"
"net/http"
)
func metricsHandler(w http.ResponseWriter, r *http.Request) {
fmt.Fprintf(w, "{\"cpu\": 0.75, \"memory\": 512}")
}
func main() {
http.HandleFunc("/metrics", metricsHandler)
http.ListenAndServe(":8080", nil)
}