How to: inheritance in SQL
 sql
sql
When building our applications, we often try to identify some problem and transform it into a programming language by creating appropriate data structures and relations between them. Then, when we want to store that data in an SQL database, things sometimes get tricky. In this post, I want to show three ways we can represent real-life inheritance in an SQL database.
gRPC-Gateway Error Handler
 grpc
grpc
Exposing gRPC server in a form of HTTP API is pretty easy using grpc-gateway, but when it comes to returning errors, the default behavior is something that might be bothering us. Let's see how can we improve that.
Watching Metrics With Prometheus
 prometheus  golang
prometheus
Have you ever noticed your web application working a bit slower than you expected? Or maybe it looks OK, but some client complains that it's slow for them? If you don't monitor your app, it's virtually impossible to verify if this is true. That's why you should use Prometheus to find out.
Building Go on CircleCI
 golang
golang
If you've been around the IT industry for more than a few moments, you probably already know that "it works on my machine" is no longer a valid excuse for your product misbehavior. In order to achieve the highest level of quality, we as a community of professionals have embraced an idea of Continuous Integration, and for all of you that think it's too much effort to set it up, I introduce CircleCI.
Advanced Queue in Redis
 redis  golang
redis
We've already seen how you can implement a simple queue in Redis using a list key and smart pushing and popping the elements. But is there any better, cleaner and more suitable way to do such a thing? Does Redis provide any other possible approach? You bet! Enter Pub/Sub.
Implementing queue in Redis
 redis  golang
redis
As you probably already know, Redis goes well beyond getting and setting values. One of the less often used features in the database is the ability to implement a pretty simple task queue and share it between a producer and a consumer. Let's take a look how you can do that in a few steps.
Counting stuff in hashes
 redis  golang
redis
Having implemented counting in Redis using one counter per value seems the way to go, as long as we know about all the things we want to keep track of. Once we want to monitor some more dynamic structures, this quickly becomes an issue. There is, however, a way to do this smart. We need to know what are hashes.
Counting stuff with Redis
 redis
redis
Being one of the most popular key-value databases, Redis has been perceived my the majority of their users as a dictionary that is used for two operations: setting values and getting them. What is less popular, yet very useful is the way we can keep track of some count values, by simply incrementing them. Let's implement a small "pagehit" summary page then.
Using Redis as sessions store in Go
 redis  golang
redis
Since its initial release in 2009, Redis has become one of the most popular NoSQL solutions and almost a synonym for a key-value database. Thanks to being around for some time, there are a few use cases that it is more than suitable for. One of them is a persistent store for users' sessions in a web application. While it has already been implemented and available using various open source libraries, let's see if we can do it by ourselves.