Using pysocket to real-time update graphs with redis as database