Sobes.tech

There is a hot table in the database that is constantly read. How to work with indexes in this case?

187

Does your team have mobile development?

187

// Find the maximum even number package main import "fmt" func main() { var max int for i := 1000; i > 0; i-- { go func() { if i%2 == 0 && i > max { max = i } }() } fmt.Printf("Maximum is %d", max) } func maxEvent(n, workers int) int { var wg sync.WaitGroup results := make(chan int, workers) jobs := make(chan int, workers) for w := 0; w < workers; w++ { wg.Add(1) go func() { defer wg.Done() localMax := -1 for num := range jobs { if num%2 == 0 && num > localMax { localMax = num } } result <- localMax }() } go func() { for i := 1; i <= n; i++ { jobs <- i } close(jobs) }() go func() { wg.Wait() close(results) }() globalMax := -1 for localMax := range results { if localMax > globalMax { globalMax = localMax } } return globalMax }

187

What non-standard situations can occur during booking and how to handle them?

187

What synchronization methods do you know in Go?

186

What criteria do you use to select companies, what do you focus on?

185

Is there a way to manage and tune the stop-the-world garbage collector in Go?

185

Have you measured the RPS of services?

185

Does the size of the channel buffer affect anything in a worker pool?

183

What tasks have you been involved in on the project from your side?

183

How to monitor the correctness of the system operation (monitoring)?

183

After fixing something, what else do you do?

182

How does the seat reservation mechanism work at the database level? How to ensure that a seat is not sold twice?

182

What happens when you append if the slice's capacity is insufficient (allocating a new array)?

181

How to implement message sending in a gRPC service?

Junior — Middle
181

If there are 500-1000 URLs, will all GET requests be executed in parallel?

179

What are interfaces in Go? Why are they needed? How are they implemented under the hood?

179

How many services read the Kafka topic?

178

Tell us about indexes in databases: why they are needed, what types exist, and how to choose them correctly.

177
/12