Significant Updates #4

wants to merge 16 commits into


None yet
3 participants

nHurD commented Dec 2, 2010


I did some slight refactoring of the code to facilitate support for the publish and subscribe commands that are available in Redis 2 and above. I also added a couple of extension methods that will serialize (or deserialize) objects to (or from) a given key in redis. I also created C# classes that represent sets and lists within redis.


Jonathan R. ... and others added some commits Sep 26, 2010

Jonathan R. Steele Started to implement commands for PUBLISH and SUBSCRIBE f40825c
Jonathan R. Steele Implemented Subscribe functionality of redis 2.0.
I still need to add code for psubscribe, and find a method to handle
Jonathan R. Steele Added Log statement for SubscriptionWorker method 1b4f48f
Jonathan R. Steele Implemented PSubscribe 4746d09
Jonathan Steele Code reformatting. Also modified Dispose() to check for the running
worker thread.
Jonathan R. Steele Implemented tests for publish and subscribe 199c73f

this doesn't seem to work. you are polling on the same socket used by other threads. if another method sends something and expects a return, this method may intercept the return instead it seems.


nHurD replied Sep 29, 2010

You're absolutely right. My initial line of thought was that once the class has started subscribing to a channel, that that instance should only be used to subscribe or unsubscribe from a channel...

Thanks for your input!

I started work on a port to gut the core so that you can handle all the commands in an async fashion with a processing queue so that I can use this with Manos and not tie up the event loop.


nHurD replied Sep 29, 2010

I just facilitated the needed changes so that one instance can handle subscriptions and other commands at the same time. It needs to be broken into separate files for maintainability (which I'll get to either later tonight, or sometime tomorrow), but it's all there..


migueldeicaza commented Dec 3, 2010

I looked through the changes and I noticed some significant changes in the refactoring.

Usually it is best if you separate "refactoring" from "feature development" so they can be reviewed independently. For instance, the file "redis.cs" is gone, and the code has gone elsewhere. Now, I could sit down and compare each line and figure out what you did, but it would be best if you describe to me one-by-one all of the changes that are included in this patch.

You did split redis.cs into a few files, and I would like to have an explanation of the rationale for the split. I see that the Redis class is now a front-end to RedisBase, why were some methods kept in RedisBase and why could the other ones not be added there and were left in Redis?

That sort of thing.

In general, smaller commits, with small explanations of the changes are easier to merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment