Introduction to how Laravel Horizon works

Laravel Horizon is a queue manager that gives you full control over your queues, it provides means to configure how your jobs are processed, generate analytics, and perform different queue-related tasks from within a nice dashboard. In this dive we’re going to learn how Horizon boots up and handles processing jobs using different workers as well as how it collects useful metrics for you to have the full picture of how your application dispatches and Read more


There’s a lot of CR(eate)U(pdate)D(elete) apps (especially web apps) in the wild and even worse, the CRUD mindset is prevalent. Even most those fancy OOP, wanna be DDD full of design patterns apps are actually built with that mindset. And then people complain that programing is hard and that entity is huge and scary to modify. There’s a time and a place for each tool so let’s see in what scenarios the CRUD approach make Read more

Which is the best Laravel cache driver for performance?

The Laravel cache can bring speed improvements to your web application. I compare the speed of each Laravel cache driver to see which is the best for performance. If you’re looking to improve the performance of your Laravel web application, then implementing a cache layer could be a good option. As a very high-level overview, using a cache allows data to be stored and then quickly retrieved. Common use cases include replacing slow or repetitive Read more

Conditionally pushing event listeners to queue

Here’s the situation, you’re building an online store that should handle thousands of orders every day, one of the cool things about this store is that customers who make purchases above 10K should receive a gift coupon, let’s see how we can implement such thing in laravel: On every new purchase a NewPurchase event is dispatched, we can easily setup as much listeners as we want to this event from within our EventServiceProvider: class EventServiceProvider Read more

Updating a Maintainable NPM Module with Continuous Integration

Continuous Integration and Deployment with Codeship Continuous integration (CI) is one of those topics that might sound scary and complicated, and of course there are a gazillion aspects of it that could occupy you for years, but getting started doesn’t have to be a major undertaking. The idea of CI is very coupled to using a code repository (usually git) as well as the idea that testing and building on every committed change and releasing Read more

How to reduce your PHP tests execution time up to 85%

We all know that a good test suite — unit and integration — is important to any application. We also know that running all our tests can take some time (especially in large projects). What one may not know is that is possible to reduce this time up to 85% (or even more). In this post, I will show how we did this. Results may vary, but certainly you will notice a great improvement. The Read more

Implementing Domain-Driven Design for Microservice Architecture

services such as the order management service, the customer management service, etc. Services communicate using either synchronous protocols such as HTTP/REST or asynchronous protocols such as AMQP (Advanced Message Queuing Protocol). Services can be developed and deployed independently of one another. Each service has its database to be decoupled from other services. Data consistency between services is maintained using the Saga pattern. As the services are very granular, client applications usually need to interact with Read more

GlusterFS split-brain

Существует 3 типа split-brain 1.Data-spli-brain – информация в файлах отличается на разных кирипичиках реплики(т.е. разное содержимое файлов, находящихся в каталоге /gluster-storage на нодах) 2.Metadata-split-brain – аналогично,но не информация/содержимое отличается, а метаданные(группа,владелец,права,атрибуты) 3.Entry/gfid-split-brain – GlusterFS-иденитификаторы(GFID) различаются для одного и того же файла на разных кирпичиках одной реплики Entry/gfid — этот тип split-brain НЕ МОЖЕТ бать исправлен с помощью автоматического heal Проcмотр всех файлов,которые требуют healing ( и будут обработаны демоном self-heal) # gluster volume heal gvolume1 Read more

Docker Swarm Cheatsheet

I’ve been studying docker-swarms lately and wanted to write a cheatsheet of setup and commands to maintain a swarm both for my reference and yours. These commands are for docker version: 17.03.0-ce as of August 2017. Install docker with curl -ssl | bash Preparing the server Create several instances of the one-click docker image on Ubuntu 14. Initialize the swarm Log into the server you want to be your manager and run: docker swarm Read more

Nginx, Php-Fpm и что это вообще?

PHP-FPM — это разновидность SAPI для PHP. Чтобы понять, что это такое, стоит рассказать о понятии SAPI. FPM SAPI, он же Server API. В php есть несколько таких API для разных вариантов его работы: CLI SAPI — в качестве консольной команды `php` для запуска наших кронов и других cli-программ (Command Line Interface) apxs2 SAPI — в качестве модуля к apache2 CGI SAPI — в качестве запускаемого на каждом запросе CGI (сейчас так почти никто не Read more

Любишь мемасики?

Подпишись на мой телеграм-канал!