study and analyse code of redis