Hi there!

Welcome to my blog. This is not yeat another tech-blog. It’s my notes and conspects about things I learned recently or how I did something on my job.

XMPP Presense

Presense is the technology allowing you choose what informations of your network availability you want to share. This is happening by subscription “handshake” To request someone’s presence you send him a subscruption request: <presence from="george@im.company.org" to="mary@im.company.org" type="subscribe" /> The recepient can approve it or denied by sending presence stanza of type subscribed or unsubscribed: <presence from="mary@im.company.org" to="george@im.company.org" type="subscribed" /> This is bidirectional process. So the recepient also send you a subscription request and you also can subscrube or unsubscrbe to it....

June 24, 2024

Basic xmpp

Domains Every JabberID (JID) contain domain portion. It’s an server address. Every JID looks like this: test@test.com worker@chat.company.org admin@chat.application.com Users User name is case insensetive ACII characters string without special characters Resources When you connect your client to an XMPP server server ( or manualy ) assign resoirce id for that particular connection. This is using for routing trafic to connection instead of any other open connection ( if exists )....

June 23, 2024

Semantic Release

I was messing around with semantic releases for a while and came to the solution that I will replace in this article. What a twist! :) Basically, my solution was this: name: Create New Tag on: push: branches: - master jobs: tag: runs-on: ubuntu-22.04 permissions: contents: write steps: - uses: actions/checkout@v3 with: fetch-depth: '0' - name: Bump version and push tag uses: anothrNick/github-tag-action@1.66.0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} WITH_V: true BRANCH_HISTORY: full INITIAL_VERSION: 1....

December 10, 2023

Rabbitmq Concepts

Before we delve deeper into RabbitMQ concepts, let’s set up this app on our computer. In my opinion, the best approach is to utilize Docker. I prefer to avoid writing lengthy commands in the terminal, so we will opt for a Docker Compose file. Create folder project folder and create this file: # ./docker-compose.yml version: "3.7" services: rabbitmq: image: rabbitmq:3-management-alpine container_name: rabbitmq_learn ports: - 5672:5672 - 15672:15672 Notice that I used management-alpine version that include web management console in it, available in port 15672....

September 10, 2023

Ejabberd config

IMPORTANT! I’m not an expert in setting up ejabberd in a proper and most important secure way. This config is my first attempt to set up things in a way I want to setup. So this article will be updated soon… Ejabberd is an amazing platform allowing you to setup communication between users fast. In my case it should be as an microservice ( cuz' why should I need to reinvent the wheel and write chat from scratch ?...

September 9, 2023

Simple Database Backup

Recently I was needed to make daily backup of database. This is always a good idea to have most reacent backup of data or source codes. But daily backups… Sound like a perfect task for automation! Most of a time I’m working with PostgreSQL database. And example implemets backups for same db. The bash script: #!/bin/bash date=$(date '+%Y-%m-%d') PGPASSWORD="database_password" \ pg_dump \ --host 127.0.0.1 \ --port 5432 \ -U database_user \ --verbose \ --file "backups/DB_backup_$date....

August 15, 2023

Alembic - Basic Usage

This is not tutorial - it’s my understanding! If I’m worng - let me know. Before dive into the tutorial - first read Alembic getting started manual. Setup After you setup your working enviroment ( env, pip, sqlalchemy etc. ) run: $ alembic init alembic This command will add alembic folder ( with banch of folder and files in it ) and alembic.ini file. In alembic.ini change sqlalchemy.url variable in [alembic] section to your database connection string....

August 12, 2023