Redis protocol and basic state classes