Upload asynchronously to Amazon S3 using Tornado

TornadoWeb is a great non-blocking web server written in Python and Boto3 is the Amazon Web Services (AWS) SDK for Python, which allows developers to write in a very easy manner software that makes use of Amazon services like S3. Unfortunately boto3 S3 wrapper is blocking and if you would just use it out of the box in a Tornado application it will block the main thread because it uses a synchronous HTTP client.
Continue reading Upload asynchronously to Amazon S3 using Tornado

Create a Cassandra cluster with OpsCenter on Amazon EC2

Today I played a little with Cassandra on Amazon EC2. It was a very user friendly and pleasant experience to deploy a cluster with 2 nodes in one region using DataStax OpsCenter.

First I started a m1.small instance in Amazon EC2 where I installed OpsCenter. For this I chose Centos 6, the official AMI. Before starting to install OpsCenter, we need to configure the firewall in order to be able to access it. In AWS console, under the Security group, there is “CentOS 6 -x86_64- – with Updates-6 – 2014-09-29-AutogenByAWSMP-“. We need to righ-click on it and Edit inbound rules. Here we add a new Custom TCP Rule with port 8888 and the Source IP: My IP.

Anyway, I noticed that the instance has also an iptables firewall and the port 8888 is not open. So, on the instance I did:

iptables -I INPUT 4 -p tcp --dport 8888 -j ACCEPT
iptables-save | tee /etc/sysconfig/iptables

Now, we can install OpsCenter. All you need to do is to follow the installation guide for RPM package from DataStax:

Continue reading Create a Cassandra cluster with OpsCenter on Amazon EC2