Menu

Dev Blog

Setting up Galera Cluster is somewhat tricky at first, however there are many tutorials describing the process. Minimum cluster size size is two, so we need at least two servers running MariaDB instances, configured to interchange data with each other.

Cluster Configuration

In this example configuration of two nodes, we assume that the servers are connected over private network. This allows direct connections without requiring SSH tunnels. The most important parts is to enable listening on IP protocol and to configure addresses and names of the cluster nodes. The config files are similar for each nodes. To avoid editing distribution provided configuration files, the new files are added to /etc/mysql/mariadb.conf.d directory, and on both servers are named 70-cluster.cnf. This layout is provided on Ubuntu system, different operating system or other Linux distributions might have different layout. The number 70 at the beginning ensures, that the file will be included last. In fact configuration files could be split into even more chunks, as only last three lines differ.


One of the tasks I've stumbled upon was to generate a set of Word documents based on template. The template itself was a Microsoft Word document with special tokens enclosed with curly braces. These were added just in word processor by inserting some word wrapped with said braces, for example {address}, which later were replaced with proper address en-masse from CSV data. For each row of CSV data, the tokens were replaced with corresponding value and one document was created. This article is mostly based on DOCX format, however similar technique can be used to process ODT format as well similar ones.

Normally, when you use computer, there are numerous background processes which allows you to use them as a services. That is, these processes are always ready to be used. Most obvious examples for web applications are HTTP Server, Database servers - MySQL, PostgreSQL, MongoDB, ElasticSearch or many, many other. When developing web application it is sometimes desirable to have strictly application-related service which cooperates with web application in some way. The use case I plan to describe here is a service that will react on RabbitMQ messages sent by front-end. The messages are generated by using web application and the reason for using message queue is that often these tasks require additional permissions or are time consuming. 

The messages are the kind of triggers for batch processing, which might include:

  • Generating configuration files
  • Dumping database backups
  • Getting SSL certificates

Total Commander is great file manager, however renaming files is annoying requiring slow double click. The fix for this issue is to create shortcut.

  1. From top menu navigate to Configuration > Change Settings Directly 
  2. Ensure that opened file is wincmd.ini
  3. Search for [shortcuts] in this file

If you have [shortcuts] part then add F2=1002 in next line to have something like the following:

[shortcuts]
F2=1002

If you don't have [shortcuts] part in configuration file just add the above snipped to the end of file.

Restart Total Commander - from now on, pressing F2 will trigger in-place rename.