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.
Started to implement commands for PUBLISH and SUBSCRIBE
Implemented Subscribe functionality of redis 2.0.
I still need to add code for psubscribe, and find a method to handle
Added Log statement for SubscriptionWorker method
Code reformatting. Also modified Dispose() to check for the running
Implemented tests for publish and subscribe
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.
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.
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..
Did some refactoring to allow for a truly multi-threaded client library.
I still need to work on cleaning up once Dispose() is called. I'll
eventually break everything out into separate files for maintainability
Fixed Dispose method for Redis
Broke the redis library out into separate files for maintainability.
Re-worked the Keys commands to work with redis 2.x.x. Also maintained
backward compatiblity with redis 1.x.x
Created the namespace RedisSharp and moved all of the classes into that.
Also started creating extension methods for getting and setting of
Reimplemented how lists are handled through the client library.
Added more methods to support IList methods/properties. I still need to
work on GetEnumerator()
Fully implemented IList for RedisList.
Also starte reimplementing Set commands
Implemented Intersect, Store, and Diff commands. Also Fixed a couple of
Added an assembly key to the project. Also updated the Makefile to
reflect these changes
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.