Books

Sample gitlab ci pipeline for elixir projects

One of the very thing I like to do when starting a project is having a CI pipeline running. It’s really worth to invest some time at the begining of the project and that will pay off in the future when more people join the project and you want to track history of changes or ensure that builds meet restrictions. I think gitlab is offering the best CI integration at the moment.

Continue reading

What are Goroutines

How does your OS see goroutines?

If you’re beginning your advanture with Go, you’re probably attracted by Go’s support of concurrency. That’s the main selling point of this language. If you know some Go, you probably tell your friends that Go’s model of concurrecy is based on CSP (Communicating Sequential Processes). But how does it look under the hood? Does it use threads, green threads? If someone asked you to explain it how does it look from an OS perspective, what would you say? Let’s have a look closer.

Continue reading

Docker Security

Have you actually ever verified it?

If you are a developer, you probably deal with already set up environment and your only job is to write a Dockerfile and push an image to a registry (or even less work if use Continues Integration). Altough I’m going to focus on production environment where Docker images are pulled and running, which is set up by DevOps or sysAdmiss, there’s still a good few things to check on your end to increase the level of security:

Continue reading

Add libGDX to existing Android (Kotlin) project

LibGDX and Kotlin

Current libGDX version (night build v1.9.8) has issues with generating the boilerplate code when ‘Use Kotlin as the main language’ option is selected.

the error:

Continue reading

RabbitMQ essentials with Go examples

What is RabbitMQ?

RabbitMQ is an Erlang-based implementation of AMQP (Advanced Message Queuing Protocol) which is an open standard that defines a protocol for systems to exchange messages. RabbitMQ provides support for the STOMP, MQTT, and HTTP protocols by the means of RabbitMQ plug-ins.

Ok, simply speaking it’s a message broker (it accepts and forwards messages).

Continue reading

Bonding wifi and ethernet interfaces

How to aggregate multiple network interfaces into a single logical interface?

If you haven’t heard about network bonding - it’s a network setup that allows you to use two or more network devices to act as one interface, giving you expanded bandwidth and some redundancy. Basically you can turn a 1 GiB link into a 2 GiB link for the one virtual interface.

Continue reading

Distributed system design patterns

How to organize multi-container application

Sidecar pattern

Let’s start with a single node. It’s a common practice to seperate concerns also on the container levels. One container could act as a static content server, and the other could perform computations. They both exist on the same node and both have access to the same resources - although you may allocate different CPU and memory consumption.

Another popular scenario is to have a seperate container that handles logs of the other container as both share the same disk volume. This pattern is called Sidecar pattern.

Continue reading

Multiple git accounts

How to associate different git account to different projects?

Let’s say you have two github accounts, one used at work and the other for your own projects but you want to use both from one linux account. You want to work on each project without a need to type in appropriate credentials everytime you push changes. Firstly you need to generate unique ssh keys for each of them:

ssh-keygen -t rsa -C "your-work-email-address" -f NAME_OF_THE_FILE

For instance:

Continue reading

Introduction to Docker container networking

Build your network of containers

There’s a lot of tutorials showing how to link containers using the docker run –link option, but the link flag is a depricated feature of Docker and may be eventually removed. I will show you how to link containers via docker network providing a template of Dockerfile for your Golang application, but the focus here is really on the process.

Continue reading

How to sell Golang to your employer

Can you translate that to human language?

A little over a week ago, Loïc Hoguin, the creator of Cowboy - a very popular web server built in Erlang, published an article about his experience of conviencing people to use Erlang, or rather their reaction when they see the Erlang’s syntax :) It inspired me to write this post.

Continue reading