I am considering using Redis' protocol to do mass insertions as described here: http://redis.io/topics/mass-insert Before I get busy write code to handle this I just want to be sure that I am clear on what is required by Redis to make this work.
The above link suggests that to call the SET operation [SET myKey Value myValue] using mass insertion I need to create a command that can be done in either several lines in a file or a single quoted string.
Assuming I don't want to use the SET command instead I want to use the SADD command to add to a set. Is what I have here valid for a quoted string format?
"*4\r\n$4\r\nSADD\r\n$2\r\n80\r\n$5\r\n1,2,34\r\n"
Essentially what I am storing is a key: 80 whose value is 1,2,34
In the end what I want the capability to do is this:
Key Value
80 1,2,34
90 4,8,34
Get the intersection (SINTER) and/or union (SUNION) of the two sets. i.e. SINTER = 34 or SUNION = 1,2,4,8,34
Any helpful information you can provide is appreciated. I just want to make sure I'm on the right path this.