java - One Redis call, Multiple command execution with return types -


I need to execute the following on Redis:

  2 myset1 myset2 out ZINTERSECT ZRANGE 0 -1 (say that it gives a set [20,30,40,50]) MGT User: 20: Blabla User: 30: BlackBerry User: 40: Blabala User: 50: Blabala (This [1,2, 3, 4] ZRANGE blabla: 1: value 0 -1 ZRANGE blabla: 2: value 0 -1 ZRANGE blabla: 3: value 0 -1 ZRANGE blabla: 4: value 0 -1  
< P> This is a transaction for my "list of lists" type structure. My questions:

1- What It is possible to run a call?

2- Should I use transactions or scripting for this?

3- Is it possible to run all these rows without high traffic, without scripting or radis transaction characteristics?

2 - Do I have a transaction or scripting Should use?

Since you have some commands, the subsequent order, a script is the way to go.

The Lua script is usually faster than a script in Radis, with the definition of Transactional .

3 - Is it possible to run all these rows without scripting or radis transaction features under the highest traffic?

It depends on the basis of your idea as "high traffic". Anyway, you should check and see whether your approach is possible or not. An ordinary Lea script will also be faster in most cases.

The most important thing is that you should consider the complexity of time to use every command. They can see them.


Comments