03:24:02 GMT how do i properly implement line 59-63 - https://bpaste.net/show/55ace41b3230 03:24:32 GMT wrong room 13:19:05 GMT hi all 13:19:17 GMT i have several questions about redis clusters 13:19:49 GMT anyone available to help? 14:32:06 GMT shouldn't a lua script like redis.call("AUTH","password") work? 19:58:38 GMT Heyo guys. I'm currently using Redis with Laravel and I'm doing something like Redis::mget($keys) where the $keys is an bunch of keys (duh) 19:58:57 GMT I was wondering, if I can somehow get paired results, which would be something like $key => $value instead of just $value 19:58:58 GMT thanks :) 20:01:39 GMT dict(zip(keys, redis.mget(keys)) if you were using a proper language. sorry for not being more helpful 20:04:59 GMT minus I can try that (I've been working with Redis for about 20 minutes, so it'll be fun) 20:05:01 GMT thanks tho :) 20:05:33 GMT well, that's python, not gonna work in PHP; google says PHP has no zip function 20:05:55 GMT oh, I thought those were Redis methods 20:06:12 GMT I mean, I could iterate those keys when I'm creating value objects 20:06:21 GMT I was just hoping I could force redis to return them instead 20:06:32 GMT since I'm converting the redis mget result into an array 20:06:48 GMT http://redis.io/commands/mget has no options to do so 20:07:05 GMT it wouldn't make sense; since you already have the keys and know their order 20:07:27 GMT just write a little utility function and you're golden :) 20:07:40 GMT minus well true, I can technically just pair it somehow 20:07:47 GMT let me google how to do that in PHP :) 20:13:31 GMT minus we did it :) https://gyazo.com/d42349269c86c591a9eecc2113189fdb 20:13:46 GMT basically what I did was soemthing like - collect($keys)->combine(collect(Redis::mget($keys))) 20:14:01 GMT collect is just a collection implementation in laravel 20:14:08 GMT thanks again :) 20:14:20 GMT ah, laravel has some nice stuff, i see 20:16:50 GMT looks like you're managing some giant storage array 20:21:07 GMT minus not really, I'm just doing this tool for work. Basically, what it does is it's managing volumes/storage on OpenVZ machines. I needed to store the volumes I got from command line utility somewhere, so they don't have to be reloaded every time :) 20:21:50 GMT so I store them in Redis with something like key = vmId-slugged-mount-point; value = jsoned/serialized size and mountpoint 20:29:43 GMT minus just out of curiosity, since I'm new to all this stuff - is it more common to store the value as let's say json and have single key 20:30:02 GMT or have keys like something-something-size = size 20:30:10 GMT something-something-active = 1 20:30:12 GMT well, redis has hashes 20:30:26 GMT it depends on the access pattern really 20:30:43 GMT if you need everything at once all the time json is the simplest thing 20:31:01 GMT everything at once mostly 20:31:10 GMT are those hashes in terms of keys or in terms of how the value is stored? 20:31:20 GMT then again if you put it in a hash you pretty much get it in the same format 20:31:22 GMT I've seen something like something:something and something:something:else 20:31:35 GMT I use something a lot, don't I 20:32:05 GMT namespacing in the key name doesn't mean anything to redis 20:32:27 GMT gotcha. So it's not like a nested array or map in terms of how it's stored/accessed 20:32:54 GMT hashes in redis are stored as a simple, flat key-value map in a key 20:33:55 GMT minus I see. So basically if I used hash, the only difference would be I'd have to store everything in a single key, but with option to manipulate the data better 20:34:00 GMT lpush and rpush and stuff like that 20:34:07 GMT yeah 20:34:14 GMT l/rpush are for lists 20:34:20 GMT hget/hset is for hashes 20:35:18 GMT and lists are just hashes without keys, if I'm correct 20:35:29 GMT sorry for such an ignorant question, I uses PHP, everything is an array 20:35:35 GMT and don't even get me started on Javascript lol 20:36:36 GMT no, lists are different types from hashes 20:37:36 GMT maybe take a look at the commands available for lists and for hashes to get more of an idea of the difference 20:37:55 GMT i know php and js treat them kinda the same 20:38:04 GMT no other languages i know do 20:38:15 GMT well, except lua 20:40:04 GMT minus alrighty, I'll go through the docs, I kinda want to know all of this stuff :) Thanks again so much for help 20:49:40 GMT you're welcome 21:00:46 GMT oh lordy, no hmget for multiple keys :D