1. Caching is not easy — a bit of history Alan is a health insurance platform serving multiple countries, powered by a Python/Flask backend with hundreds of web workers and RQ workers (queuing system). flowchart LR Users(("Users")) --> Web["Web Workers<br/>(Flask/Gunicorn)"] Web <--> Redis[("Redis")] Web -- enqueue --> RQ["RQ Workers"] RQ <--> Redis Cron["Cron"] -- enqueue --> Redis And of course,…
– This post is a compilation of four old posts. They are gathered here in one piece for more clarity, and for archiving purpose. The work described in this post was done over the years 2014-2016 – Riak as Events Storage Booking.com constantly monitors, inspects, and analyzes our systems in order to make decisions. We capture and channel events from our various subsystems, then perform real-time,…
This post is a list of things that I found interesting about Prometheus and its ecosystem while attending PromCon2017, the Prometheus Conference, the 17th and 18th august 2017 in Munich (Germany). Things are not split per talks; instead I have gathered information from all the talks and grouped them by topics, so that it’s more organised, and easier to read. The conference was very nice, well…
A small recap of Perl exceptions Basic Usage Of Exceptions In Perl, exceptions are a well known and widely used mechanism. It is an old feature that has been enhanced over time. At the basic level, exceptions are triggered by the keyword die. Exceptions were initially used as a way to stop the execution of a program in case of a fatal error. The too famous line: open my $fh, $file or die "failed…
This is going to be a short post. I’m the new maintainer of Redis.pm, the most used Redis Perl client. Pedro Melo was the previous maintainer, but due to Real Life, he is unable to continue. I’d like to thank him for all his efforts so far in maintaining and improving this module. I hope I’ll be able to achieve the same level of quality. Pedro will actually stay around for a while, watching over…
I guess that you’ve heard about p5-mop by now. If not, in a nutshell, p5-mop is an attempt to implement a subset of Moose into the core of Perl. Moose provides a Meta Object Protocol (MOP) to Perl. So does p5-mop, however p5-mop is implemented in a way that it can be properly included in the Perl core. Keep in mind that p5-mop goal is to implement a subset of Moose, and. As Stevan Little says: We…
Just a quick note to mention that following Mike Doherty’s bug report, I’ve released a new version of MooX::LvalueAttribute. This release (version 0.12) allows you to use MooX::LvalueAttribute in a Moo::Role, like this; { package MyRole; use Moo::Role; use MooX::LvalueAttribute; } { package MyApp; use Moo; with ('MyRole'); has name => ( is => 'rw', lvalue => 1, ); } my $object = MyApp->new();…
thanks to @yenzie for the picture :P Bloom filters Bloom filters are statistical data structures. The most common use of them is to consider them as buckets. In one bucket, you add elements. Once you’ve added a bunch of elements, it’s ready to be used. You use it by presenting it yet an other element, and it’ll be able to say almost always if the element is already in the bucket or not. More…
Yesterday I was reading Joel’s post, where he lists great Perl things he’s seen done lately. Indeed these are great stuff. I was particulary interested by his try at playing with Lvalue accessors. I thought that it would be a great exercise to try to implement it in Moo, as an additional feature, trying to get rid of the AUTOLOAD. Also, I was willing to avoid doing a tie every time an instance…
UPDATE: I have included a functional API, as per Oleg Komarov request, and amended this post accordingly. I’ve just released a new module called Action::Retry. Use it when you want to run some code until it succeeds, waiting between two retries. A simple way to use it is : use Action::Retry qw(retry); retry { ... }; And the Object Oriented API: Action::Retry->new( attempt_code => sub { ... }…