WhatsApp or not

June 18, 2016

I am not using WhatsApp. I also do not have a Facebook account. For Facebook it is easy: I'm just not into sharing my personal life online and keeping in touch with friends can be done without it. WhatsApp is somewhat different. It's basically a replacement of text messages on steroids because you can have groups.

My primary reasons for not using it are: encryption, sharing my phone number with Facebook and open source. For this reason I was and still am promoting Signal. The code is available for anyone to read and audit and cryptography scientists have reviewed it. You can run your own server so you don't rely on any organization to run the server for you.

Continue reading →

Continuous delivery with automatic failover

June 7, 2016

This post is kicking of a little blog series about my adventures into building a fault tolerant Python based web site. The goals are simple:

  • two VMs with automatic failover and floating IP
  • shared filesystem
  • Debian packages for the Python project
  • continuous integration
  • continuous delivery
Continue reading →

Varnish all the things

February 1, 2016

My usual web application stack for the past years was based on a nginx as reverse proxy in front of a number of Python processes. Static resources were served by nginx. Each Python process was stateless, state was stored in some kind of database. If the processes needed some shared ephemeral state like counters a local redis instance solved that. A battle tested common ground for Python based web applications.

What I have added to this lately was Varnish, a powerful proxying cache. The first that comes in mind could be "there are two problems in computer science: naming things and cache invalidation". Agreed, invalidation is tricky. But there are several tricks at hand that make this not so bad at all.

Continue reading →

Elasticsearch DSL-DSL

July 29, 2015

Elasticsearch is a search server based on Apache Lucene. As a developer it is easy to use, has an expressive query DSL and all is based on JSON serialization. Often though I find myself in a position where I need to adapt queries frequently and non-trivially, say in a demonstration in front of customers or product owners.

The questions are mostly similar: "what if I also filter for X", "how does the ranking change, when I add a freshness function", "do I get a better result if I boost document types Y" and so on. While these are easy to add, two things bother me: first, I need to come up with the queries during a presentation, which adds pauses to the meetings. When I'm finished with the query the discussion has evolved. Second, I don't want to be the enabler. If they can find out what they want without me it also means a faster feedback loop for them. In brainstorming sessions it is easy to focus on arguments and skip the sometimes lengthy query finding pauses. Win win for everyone it seems.

Continue reading →

Start a blog

June 10, 2015

This is my blog. I haven't really blogged ever. Few people near me do. I so far did not think that I have something interesting to say. And there are already tons of blogs out there which probably have the same contents as this one.

So why do I blog now? First, maybe I'm wrong. And by not blogging I will just never find out. Also, occasionally leaving your comfort zone might not be the worst idea.

Continue reading →