Questions tagged [node-redis]

node-redis is a complete Redis client for node.js. It supports all Redis commands, including many recently added commands like EVAL from experimental Redis server branches.

756 questions
0
votes
1 answer

Converting processes from mysql to Redis

I'm coming from mysql, trying to wrap my head around redis. Some things were very obvious but a couple have me stumped. How would you go about implementing such things in redis? First I have a sort of first come/first serve reservation system. When…
Roger
  • 4,249
  • 10
  • 42
  • 60
0
votes
1 answer

Node & Redis queue

I am trying to create a queue of JSON objects using Redis. I currently use ZADD to create an ordered set: var entry = {"name": "Hank", "question": "Where am I?"}; client.zadd("entries", 1, JSON.stringify(entry)); How can I increment the score each…
0
votes
1 answer

node_redis callback arguments

Super basic question- how do I know what format I should give my callback for various node_redis calls? Seems like some examples out there have two arguments (err, res) while others have one (res) Is there a definitive way to know what the callback…
davidkomer
  • 3,020
  • 2
  • 23
  • 58
0
votes
1 answer

Multi-stage autocomplete with nodejs & redis call. How to make sure returns after everything done

I am working on a auto-complete prototype. I've looked at the several examples around the web that are auto-completes of a simple list. My business case is multi step in the fact that the auto-complete has to handle people with same names but…
Chris Morgan
  • 431
  • 1
  • 5
  • 10
0
votes
0 answers

Node Redis EC2 errconnrefuced

There's some strange behavior i've found with node_redis on Aws EC2. Let's say i have two EC2 instances. First one is used for DB (Redis, MYSQL, etc.) and it has an IP like so ip-1-1-1-1.eu-west-1.compute.internal Second one is for app based on…
nick.skriabin
  • 873
  • 2
  • 11
  • 27
0
votes
1 answer

Insert data into REDIS (node.js + redis)

How, i can insert (store) data something like this (node.js + redis): var timestamp = new Date().getTime(); client.hmset('room:'+room, { 'enabled' : true, timestamp : { 'g1' : 0, 'g2' : 0 …
napalias
  • 1,145
  • 1
  • 10
  • 21
0
votes
1 answer

node.js and redis : is a redis store accessible across node connections?

A very basic question, but I couldn't find the answer anywhere (maybe because it's too obvious) : In node.js (i.e. 'redis' npm module), is a redis store, like other databases, accessible across node.js connections ? Suppose I set my node.js server…
Petrov
  • 4,200
  • 6
  • 40
  • 61
0
votes
1 answer

node-redis reports "EXEC without MULT"

Error Output: [Error: ERR EXEC without MULTI] Nodejs Script: client = redis.createClient(REDIS_SOCK); client.keys(['*'], function(err, keys) { client.multi(); keys.forEach(function(key) { count = start; while(count <= end) { …
aXqd
  • 733
  • 5
  • 17
0
votes
0 answers

Most efficient way to store and retrieve sockets in Node.js

Currently I am storing the actual socket object in an array in each process. I then store socket data in redis for all processes (workers) to access. Is there a more performance/efficient way to store and retrieve sockets, or is this pretty much…
Mikt25
  • 695
  • 1
  • 9
  • 18
0
votes
1 answer

Dealing with asynchronous node_redis functions, awkward using INCR on two keys at once

Say my server is preparing a new object to send out in response to a POST request: var responseObj = { UserID : "0", // default value ItemID : "0", // default value SomeData : foo } Now, when I create this new object, I want to…
strugglingcomic
  • 117
  • 1
  • 5
0
votes
1 answer

Fastest Finger First App Architecture - Redis?

I'm writing a "fastest finger first" Node.JS app using smartphones as buzzers. I intend to use Socket.IO to handle the answers coming into the app but don't know what is the best way to store the data for comparison at the end of the round. My…
0
votes
1 answer

node.js and redis (hiredis) on windows

I am using that code on my chat application using node.js and redis but without hiredis as I cannot install it on windows machine var app = require('express')() , redis = require('redis') , client = redis.createClient() , server =…
Remon Amin
  • 1,506
  • 2
  • 19
  • 44
0
votes
2 answers

TypeError is not thrown in Redis message event

I'm trying to implement an event system. Node subscribes to Redis channel, receives message and calls non-existent method in object. Complete code is here. Simple. http://pastebin.com/8XnbaepE Why error is not thrown? I don't understand this…
Tigran Tokmajyan
  • 1,937
  • 7
  • 25
  • 36
0
votes
1 answer

Redis in node dbase structure

I need to store some values. First is post data like: {postid,text,room_name} where postid will be incremented automaticly. and after collecting some posts I need to put them into username so I will have: Thomas 1,text,room_name …
Kriss
  • 435
  • 1
  • 10
  • 22
0
votes
1 answer

how to understand the parameters in node_redis?

all I am studying node_redis, in examples/simple.js, there is the following code: 1 client.hset("hash key", "hashtest 1", "some value", redis.print); 2 client.hset(["hash key", "hashtest 2", "some other value"], redis.print); 3 …
abelard2008
  • 1,984
  • 1
  • 20
  • 35