Queueing with SKIP LOCKED

In 2018, at last, MySQL (version 8) decided to add support to the famous “SKIP LOCKED” feature. Other RDBMS like Oracle and SQL Server support this feature for more than 15 years and PostgreSQL added support in 2016. If this is the first time you hear about this, it is a flag that tells the…

Passing…Traits

Let’s start with a definition: “a trait is a concept used in object-oriented programming, which represents a set of methods that can be used to extend the functionality of a class” (Wikipedia) So, a set of methods. No properties. No extra state representation. After all, as you may know, this is the fundamental difference between…

Removing code literals

Every software code contains literals (usually numbers, strings, booleans or characters). They are values related to application configuration, parts of the business logic, natural or language constants, etc.. We have learned to replace many of these values with variables, constants or function calls for various reasons (security, manageability, readability, expressivity,…), which we are not going…

A long cheatsheet for Redis

Setting up Redis: (on Ubuntu 16.04) Install Redis server apt-get install redis-server Enable Redis as service (start on system boot) systemctl enable redis-server.service Note:  The service configuration can be found at: /etc/systemd/system/redis.service There you can see that Redis will be running as user redis: User=redis Group=redis The Redis server will always restart after reboot: Restart=always…