我正在考虑使用 redis ( http://code.google.com/p/redis/ ) 来存储这种 ruby 数据结构。
假设:
node1server1 = { "volume1" => 10400, "volume2" => 11221, "volume3" => 13212, "volume4" => 17227 }
node1server2 = { "volume1" => 17450, "volume2" => 14241, "volume3" => 15512, "volume4" => 12427 }
node2server1 = { "volume1" => 17655, "volume2" => 16754, "volume3" => 19877, "volume4" => 10000 }
node2server2 = { "volume1" => 11456, "volume2" => 13776, "volume3" => 18766, "volume4" => 16555 }
使用哪种更好的 redis 数据类型?
数据需要更新,我需要对 node1server1+node1server2 和 node2server1+node2server2 的值进行排序。