Rewriting all the samples logic to use redis as a backend