In this PR I add the support of using Redis as an alternative storage.
In electLoop function I don't used Redis subscribe command, because the expiration of the key is not real-time. I have used get command every 2s to check the key status.
Others is same as Zookeeper storage impl.
In addition, I have made adjustments to the configuration structure to make it clearer. And, I have written compatibility code for the old version of the configuration structure.
I think we can keep this compatibility code until the 1.0 release.
In this PR I add the support of using Redis as an alternative storage.
In
electLoop
function I don't used Redissubscribe
command, because the expiration of the key is not real-time. I have usedget
command every 2s to check the key status. Others is same as Zookeeper storage impl.In addition, I have made adjustments to the configuration structure to make it clearer. And, I have written compatibility code for the old version of the configuration structure. I think we can keep this compatibility code until the 1.0 release.