Compare commits

..

No commits in common. "e4a5029d249c99d03be5dd83abb074a30315621d" and "d480ecb5cd0506e086da6409912eb37dad3d7964" have entirely different histories.

8 changed files with 20 additions and 12 deletions

View file

@ -4,7 +4,7 @@ date: "2010-09-15T00:00:00+02:00"
tags:
- Nginx
- Mediawiki
slug: 1-setup-nginx-for-mediawiki
slug: setup-nginx-for-mediawiki
summary: >
A simple configuration to serve Mediawiki with Nginx and FastCGI
---

View file

@ -2,7 +2,7 @@
title: Build the latest PgPool-II on Debian Etch
date: "2010-12-14T00:00:00+01:00"
tags: [Debian, PgPool-II]
slug: 2-build-pgpool-on-debian
slug: build-pgpool-on-debian
summary: >
Building PgPool-II on RHEL 5.5 to avoid the "libpq is not installed or
libpq is old" error

View file

@ -1,5 +1,5 @@
---
slug: 3-aptana-eclipse-and-xulrunner
slug: aptana-eclipse-and-xulrunner
title: Aptana Studio/Eclipse and Xulrunner
tags: [Aptana Studio, Eclipse, Xulrunner, Arch Linux]
date: "2011-12-16T00:00:00+01:00"

View file

@ -1,6 +1,6 @@
---
tags: [Python, Buzhug, Database, Locks]
slug: 4-locking-buzhug
slug: locking-buzhug
title: Locking Buzhug
date: "2012-02-07T00:00:00+01:00"
summary: >
@ -13,7 +13,8 @@ a few gotchas.
[Buzhug]: http://buzhug.sourceforge.net
## Simple Solutions Are Often The Bests
Simple solutions are often the best
===================================
I came to use Buzhug for the following requirements:
@ -36,7 +37,10 @@ After a quick prototyping (1 day), the choice was done.
Then came a few weeks of development and the first stress tests...
## And The Real World Came Back Fast
And the real world came back fast
=================================
A few times a day, the application backed by this database is intensely used:
@ -50,7 +54,9 @@ Using `buzhug.TS_Base` instead of `buzhug.Base` did not solve anything,
as the problem is not thread, but processes. What I need is a system-wide
cross-process lock.
## Here Is The Answer
Here is the answer
==================
First step was to find how to implement a cross-process, system-wide lock.
As it only has to work on Linux, the
@ -58,6 +64,7 @@ As it only has to work on Linux, the
Vmfarms](http://blog.vmfarms.com/2011/03/cross-process-locking-and.html) fits
perfectly. Here is a version slightly modified to make it a context manager :
{{< highlight python >}}
import fcntl
@ -92,6 +99,7 @@ class PsLock:
The second step is to define a new class that inheritates from `buzhug.Base`
that uses `PsLock` (inspired by `TS_Base`):
{{< highlight python >}}
import buzhug
@ -166,4 +174,5 @@ Now I just use
database = PS_Base( ... )
{{< /highlight >}}
And all the errors have vanished.

View file

@ -1,6 +1,6 @@
---
tags: [Sublime Text 2]
slug: 5-automatically-open-sublime-text-projects-in-a-directory
slug: automatically-open-sublime-text-projects-in-a-directory
title: Automatically open Sublime Text projects in a directory
date: "2013-05-15T00:00:00+02:00"
summary: >

View file

@ -1,6 +1,6 @@
---
title: Discourse without Docker
slug: 6-discourse-without-docker
slug: discourse-without-docker
date: "2016-06-27T00:00:00+02:00"
tags: [discourse, docker]
summary: Detailed instructions on how to install Discourse and plugins without Docker.

View file

@ -1,6 +1,6 @@
---
title: 'Prepare for the Next Internet Outage'
slug: '7-prepare-for-the-next-internet-outage'
slug: 'prepare-for-the-next-internet-outage'
date: '2025-06-14T04:05:48+02:00'
tags: [architecture, cloud]
summary: >

View file

@ -20,8 +20,7 @@
<link rel="manifest" href="/site.webmanifest" />
<title>{{ if .IsHome }}{{ site.Title }}{{ else }}{{ printf "%s | %s" .Title site.Title }}{{ end }}</title>
<meta name="description" content="{{ default .Summary .Description }}">
<link rel="canonical" href="{{ .Permalink }}"/>
<meta name="description" content="{{ .Description }}">
{{ template "_internal/opengraph.html" . }}
{{ template "_internal/schema.html" . }}