Python threads synchronization: Locks, RLocks, Semaphores, Conditions and Queues

This article describes the Python threading synchronization mechanisms in details. We are going to study the following types: Lock, RLock, Semaphore, Condition and Queue. Also, we are going to look at the Python internals behind those mechanisms. The source code of the programs below can be found at github.com/laurentluce/python-tutorials under threads/. First, let’s look at... » read more

OpenStack Nova internals of instance launching

This article describes the internals of launching an instance in OpenStack Nova. Overview Launching a new instance involves multiple components inside OpenStack Nova: API server: handles requests from the user and relays them to the cloud controller. Cloud controller: handles the communication between the compute nodes, the networking controllers, the API server and the scheduler.... » read more

OpenStack Nova nova.sh script explained

Update 11/24/2011: Updated article based on the latest nova.sh script. This article describes the internals of the script nova.sh used to get the OpenStack Nova source code, install it and run it. Nova is a cloud computing fabric controller, the main part of an IaaS system. The script can be retrieved using Git: Arguments The... » read more

Distributed messaging using RabbitMQ and Python

This tutorial shows how to distribute messages to multiple servers for processing. We will be using RabbitMQ which is based on AMQP. The way messaging works is that you have producers producing messages and consumers consuming them. We are going to have 1 producer generating random integers and 2 consumers: 1 consuming the odd integers... » read more

Amazon S3 upload and download using Python/Django

This article describes how you can upload files to Amazon S3 using Python/Django and how you can download files from S3 to your local machine using Python. We assume that we have a file in /var/www/data/ which we received from the user (POST from a form for example). You need to create a bucket on... » read more

Facebook oauth and Graph API with Django

In this post, I am going to describe how I integrated Facebook into Gourmious, so users could post their favorite dishes on Gourmious and on Facebook at the same time. I wanted to keep the Gourmious login so the users could decide to login using their Gourmious credentials or using the Facebook login feature. I... » read more