Menu
  • HOME
  • TAGS

SignalR Scale out using a backplane

sql-server,redis,scaleout-hserver

Yes, you can use Redis as the backplane for scaling out SignalR and also use SQL Server as your app database. I'm sure you've looked at this site which explains the various ways to scale out SignalR. There's a multiple-step process described on the SQL Server page on how to...

Redis ServiceStack Native Client Instantiation Specifying connection settings

c#,redis,stackexchange.redis

I have seen examples where people use PooledRedisClientManager and passes a connection string but the overloads I have access don't accept a String (v2.2.0.20691). This Constructor does accept a string: public PooledRedisClientManager(params string[] readWriteHosts); Where you can create a new instance with a Redis Connection String, e.g: var connStr...

how get all keys who answer value conditions

node.js,redis

Redis is not really designed for queries like this. You will have to scan through every entry and check the values: redis.keys('user:*', function(err, results) { results.forEach(function(key) { redis.hget(key, 'statut', function(err, statut) { if (parseInt(statut) === 2) { console.log(key, statut); } }); }); }); An alternative approach would be to store...

node.js redis and how to use promise when using a module

javascript,node.js,redis,promise,q

like @brad said, you could use Q.all, it would take an array of promises as input and then return an array of results when all the promises are finished: there is a mistake in your answer: Redis.prototype.exists = function (key) { return this.client.exists(key) // CHANGED, you still need to return...

Where is the correct place to store ConnectionMultiplexer in stackexchange redis

c#,asp.net-mvc,redis,stackexchange.redis,stackexchange

I am storing multiplexer in static variable and did not ancountered any problem. Based on creators document https://github.com/StackExchange/StackExchange.Redis/blob/master/Docs/Basics.md it is not recommended to use using statement cause multiplexer designed to be reused. Find it in beggining of the document. Hope it will help.

Error starting sidekiq on Heroku, missing sidekiq.log file crash

ruby-on-rails,ruby-on-rails-4,heroku,redis,sidekiq

Remove the pidfile and logfile lines from your config.yml. You're running on Heroku, they don't make any sense.

Redis: intersection of sorted sets by score

node.js,google-app-engine,redis,node-redis,sortedset

I'd like to ignore the use case (locations paths/distances) itself because there are multiple proven ways to address this challenge, also with Redis (search for geospatial and ye shall find), and focus instead on the technique. So, assuming you're going to invent and implement your own geo logic, the most...

I'm trying to import an external Redis database (.RDB file) on a Redis installation on Windows but the new data is not being loaded?

database,import,redis,nosql

The following line from your log suggests that the RDB is indeed loaded: [9480] 07 Jun 10:34:11.290 * DB loaded from disk: 3.540 seconds And this line begotten from INFO tells the whole thing: db2:keys=457985,expires=0,avg_ttl=0 Your keys are sitting in the database numbered 2, so to access them you'll need...

What is the fastest way to read multiple hashes from Redis?

redis,predis

If you're just storing article data, I find that you should store each article property in a per-article hash but you should build a single hash where key should be the article identifier while the value should be a JSON-serialized object string. Usually you use hashes when you need to...

Unpack redis set bit string in Go

go,redis,bit-manipulation,bit

There is no such helper in redigo. Here is my implementation: func hasBit(n byte, pos uint) bool { val := n & (1 << pos) return (val > 0) } func getBitSet(redisResponse []byte) []bool { bitset := make([]bool, len(redisResponse)*8) for i := range redisResponse { for j:=7; j>=0; j-- {...

nginx uwsgi websockets 502 Bad Gateway upstream prematurely closed connection while reading response header from upstream

django,nginx,websocket,redis,uwsgi

I found the issue. My [runserver] socket (app.sock) should be pointed under upstream django and my [wsserver] socket (django.sock) should be pointed under location /ws/ like so: upstream django { server unix:/opt/django/app.sock; } server { listen 80 default_server; charset utf-8; client_max_body_size 20M; sendfile on; keepalive_timeout 0; large_client_header_buffers 8 32k; location...

How to understand text language in utf8 encoded text?

node.js,utf-8,character-encoding,redis,language-detection

Do a google search for "language detect node". This turned up https://github.com/FGRibreau/node-language-detect and https://github.com/dachev/node-cld.

JedisMovedDataException (When using sadd with pipeline)

redis,jedis

MOVED indicates that you're using Redis Cluster. ShardedJedis is not for Redis Cluster, so you should use JedisCluster instead. Please note that JedisCluster doesn't have pipeline mode, so you may want to send your operation one by one. Hope this helps....

Redis - linux / Error when Installing redis on linux: `cc: command not found`

linux,redis

You are trying to install redis from source code. What this process do is to compile and create executable on your machine and then install it. For doing this you need various tools like gcc etc. Best way is to install all of them together by installing that group. Run...

Celery worker with Redis broker can't execute Django task

redis,celery,django-celery,celery-task,celerybeat

Wrong task name. This got fixed by changing the task decorator to @celery_app1.task(name='tasks.rank_all') and tweaking my beat schedule to include the correct name: CELERYBEAT_SCHEDULE = { 'tasks.rank_all': { 'task': 'tasks.rank_all', 'schedule': timedelta(seconds=30), }, } ...

Spring Session – Support for other Backend Implementations other then Redis [closed]

spring,redis,spring-boot,couchbase,spring-session

AFAIK only redis and hazelcast is supported but maybe you can find some 3rd party. Or you might want to implement it by yourself (and make it open source). It does not seems to be that complicated - see https://github.com/spring-projects/spring-session/blob/1.0.1.RELEASE/samples/hazelcast/src/main/java/sample/Initializer.java It looks like you just need to implement your SessionRepository...

RESP formt for HMSET in REDIS

redis

I suspect that line endings are broken in your test1.dat file (that is, they aren't ASCII \r\n). I was able to successfully do this. Prepare the file (from ruby script) s = "*6\r\n$5\r\nHMSET\r\n$4\r\nkey3\r\n$4\r\ncol1\r\n$1\r\n1\r\n$4\r\ncol2\r\n$1\r\n2\r\n" file = File.new("/Users/sergio/redis_test.txt", 'w') file.write s file.close Run it % cat redis_test.txt | redis-cli --pipe All data...

Can RPUSH and LPUSH in Redis race?

transactions,redis,race-condition

Since Redis is single threaded, there is no such thing as them happening at the "same time", one will always arrive ahead of the other, though the timing is often beyond your control. Now if you have two processes can be coordinated in some way you can have one defer...

Camel Thread Id changing when calling http component

java,redis,apache-camel

camel-ahc component is using non-blocking invocation, so the thread could be change in your camel route. You can consider to store the thread id as the exchange property (you can use it to release the redisLock in redisLockReleaseProcessor) or use other camel http component such as camel-http which is using...

Cache invalidation strategy

caching,redis

to invalidate the cache during the update stage is a viable approach, and was extremely used in the past. You have two options here: you may try to set the new value when the UPDATE happens, or just delete the old one and update during a read operation. If you...

Not able Scan using redis template

redis,spring-data-redis

You can use a RedisCallback on RedisOperations to do so. redisTemplate.execute(new RedisCallback<Iterable<byte[]>>() { @Override public Iterable<byte[]> doInRedis(RedisConnection connection) throws DataAccessException { List<byte[]> binaryKeys = new ArrayList<byte[]>(); Cursor<byte[]> cursor = connection.scan(ScanOptions.NONE); while (cursor.hasNext()) { binaryKeys.add(cursor.next()); } try { cursor.close(); } catch (IOException e) { // do something meaningful } return binaryKeys;...

Using Redis to store array of hashes

arrays,ruby,redis,hashes

You could Redis Hash to store a user info and Redis Set to store all these hashes together. Steps: Make a redis Hash with HSET command:HMSET userId_653 username "Tom" password "gd36e3hd38d3jdj3yd3hd38" Add this hash in the set called users: SADD users userId_653. This set contains all the users. Get a...

Redis Cache .Net Client

.net,redis,server

Either .NET, NodeJS, Ruby, even C/C++ don't require a server component to work with a Redis server. This is why they're clients. It would be required if Amazon would develop an own branch of Redis which would change standard communication protocol defined by official Redis implementation......

Azure Redis Cache vs Redis Cloud service on Azure

azure,redis,stackexchange.redis

Disclaimer: I work for Redis Labs, the company providing Redis Cloud. 1) Can I choose any of Azure Redis cache or Redis cloud service if I interface through stackexchange.redis nuget? Yes - both Azure Redis and Redis Cloud provide a Redis database that you can use with the StackEchange.Redis client...

Docker - Cannot start Redis Service

redis,docker

In general, you can't use an init script inside a Docker container. These scripts are typically designed to start a service "in the background", which means that even if the service starts, the script ultimately exits. If this is the first process in your Docker container, Docker will see it...

Getting values with jedis pipeline

java,redis,pipeline,jedis

I guess what you want to achive is done like this. List<Response> responses = new ArrayList<>(); Pipeline p = jedis.pipelined(); for (int id: ids) { records.add(p.get(id)); } p.sync(); for(Reponse response : responses){ Object o = response.get(); } ...

Node.js: Redis security clarification

javascript,node.js,security,redis

based on my experience with node and redis, I think this is might be a good solution for your case, but if you have too many requests, I suggest to have 2 redis servers -very easy to setup-, one on each server, whereby serverA is master, and serverB is slave,...

Querying in redis from node.js

mysql,node.js,redis

Also while inserting into the database, is inserting the object as a whole the best way to go about? No, not for the sample query you propose. Redis is not a traditional database, it's more like a key value store, it doesn't understand your object's structure. If you want...

in redis-py , is redis.StrictRedis.pipe thread safe?

python-3.x,redis,redis-py

Looks like it is not, according to the documentation: "It is not safe to pass PubSub or Pipeline objects between threads." Therefore I assume you either need some sort of synchronisation mechanism. I have to admit I haven't tested any, but if I were to implement one I would try...

Naming Convention and Valid Characters for a Redis Key

redis

Part of this is answered here, but this isn't completely a duplicate, as you're asking about allowed characters as well as conventions. As for valid characters in Redis keys, the manual explains this completely: Redis keys are binary safe, this means that you can use any binary sequence as a...

Django, socket.io, node.js - Manage private messages and group conversations

django,node.js,websocket,redis,socket.io

Private messages Node keeps track of which sockets that are currently connected with an array of socket ids keyed with some user identifier. You pretty much said it there. Django does not need to know the socket id of the target user, but node.js does. If you want to...

node js redis pubsub

mysql,node.js,redis,publish-subscribe

Redis is a advanced key-value cache and store.Its operations cannot be directly mapped to mysql. In redis you can set either key value pair or a hash under a key. That is : If you want to store your name in redis it can be done by: var client =...

Redis KeyExists then GetValue Optimization

c#,redis,stackexchange.redis

Actually Redis throws errors for very edge cases, and trying to get a string key value using StackExchange.Redis won't throw an exception if the key doesn't exist. Since you're using StackExchange.Redis to work with Redis, when you call IDatabase.GetString the return value is a RedisValue (it's a struct! it can't...

Sidekiq keeps rebooting Cloud66

ruby-on-rails,redis,sidekiq,bluepill,cloud66

I'm adding another answer to make this solution clearer. I had a closer look, and your Sidekiq configuration is actually daemonizing the process, while the processes should run in the foreground for us to control them. This is why you were seeing so many Sidekiq processes running - our bluepill...

Disable Laravel Redis Cache

laravel,redis

You should have an environment file (.env) where you can set up the cache driver. Use the array or file driver on the development environment and redis on your production environment. http://laravel.com/docs/5.0/configuration#environment-configuration...

Can I use lpop/rpop to create a simple queue system with Redis?

redis,queue,message-queue

Yes you can. In fact there are a number of package which do exactly this ... including Celery and RQ for Python and resque for Ruby and ports of resque to Java (Jesque and Javascript (Coffee-resque). There's also RestMQ which is implemented in Python, but designed for use with any...

Inadequate RAM usage by Redis

python,memory,go,redis,redigo

You have lots and lots of small HASH objects, and that's fine. But each of them has a lot of overhead in the redis memory, since it has a separate dictionary. There is a small optimization for this that usually improves things significantly, and it's to keep hashes in a...

Using SORT command to get HASH fields from a sorted set in Redis

sorting,redis,hashmap,sortedset

Essentially, you are right but the current implementation of the SORT command only accepts wildcards on the left side of the hash dereference (see lookupKeyByPattern in sort.c). That being the way it is atm, instead of SORT, use a Lua script to this. For example, here's a dirty quick one:...

Can Bluebird Promise work with redis in node.js?

javascript,node.js,redis,promise,bluebird

You were trying to use Promise.resolve wrong, it expects a Promise and session.get by default doesn't return a Promise. You first need to promisify it. (or promisifyAll) session.getAsync = Promise.promisify(session.get); // OR Promise.promisifyAll(session); //=> `session.getAsync` automatically created // OR Promise.promisifyAll(redis); //=> Recursively promisify all functions on entire redis Then use...

Using redis as a DB for some values

node.js,redis

Store the data in a hash, and create indices using sorted sets. For example: HSET key1 createday value HSET key1 size value And so on. For example, to sort on createday, store it as a Unix timestamp. On adding the entry, also add the ID of the entry (key1 in...

Why A single Jedis instance is not threadsafe?

redis,thread-safety,pool,jedis

A single Jedis instance is not threadsafe because it was implemented this way. That's the decision that the author of the library made. You can check in the source code of BinaryJedis which is a super type of Jedis https://github.com/xetorthio/jedis/blob/master/src/main/java/redis/clients/jedis/BinaryJedis.java For example these lines: public Transaction multi() { client.multi(); client.getOne();...

Is exists check required before calling StringSet method of StrackExchange.Redis

c#,redis,stackexchange.redis

yes, you can savely remove that. We also don't check for existence as that would lead to have two access points to the cache where only one is necessary. This would really slow down cache access. You may want to consider three other things: you may have to make the...

nodejs Kue job processing logic

node.js,redis,kue

See the documentation - https://github.com/Automattic/kue#processing-jobs While there is a queue, it will continually run, and pick off jobs. As per the example: var kue = require('kue') , queue = kue.createQueue(); queue.process('email', function(job, done){ email(job.data.to, done); }); function email(address, done) { if(!isValidEmail(address)) { //done('invalid to address') is possible but discouraged return...

Can't connect to redis on heroku

ruby-on-rails,ruby,heroku,redis,sidekiq

Set REDIS_PROVIDER to the name of the env var with your Redis URL. Type this: heroku config:set REDIS_PROVIDER=REDISTOGO_URL. Restart. Explained here: https://github.com/mperham/sidekiq/wiki/Using-Redis#using-an-env-variable...

Which maxmemory policies allow expiration in Redis?

redis,nosql,ttl

See here from redis.conf: MAXMEMORY POLICY: how Redis will select what to remove when maxmemory is reached. You can select among five behaviors: volatile-lru -> remove the key with an expire set using an LRU algorithm allkeys-lru -> remove any key according to the LRU algorithm volatile-random -> remove a...

How to determine there are no running jobs or consumer process exit

data-structures,redis

No one answer my question, but I came up a solution on my own. step 1. Before the producer starting to put jobs into the queue, I set a flag key: SET dispatch.finished 0. step 2. After the producer finished putting all jobs into the queu, change the flag: SET...

Why do I need a broker for my production ELK stack + machine specs?

elasticsearch,redis,logstash,kibana

As for Redis, it acts as a buffer in case logstash and/or elasticsearch are down or slow. If you're using the full logstash or logstash-forwarder as a shipper, it will detect when logstash is unavailable and stop sending logs (remembering where it left off, at least for a while). So,...

Redis AUTH command in Python

python,redis

Thanks to the hints from the comments. I found the answer from https://redis-py.readthedocs.org/en/latest/. It says class redis.StrictRedis(host='localhost', port=6379, db=0, password=None, socket_timeout=None, connection_pool=None, charset='utf-8', errors='strict', unix_socket_path=None) So AUTH is in fact password passed by keyword argument....

php implememnt a queue with redis

php,mysql,redis

the easiest solution: while (true) { if ($res = fetch(data)) { //do your staff } else { sleep(10); } } But long running PHP script may cause memory leaks, so the best way might be cronjob, with script like this: //do not forget to check if process is already running,...

Using Redis as a session state provider

asp.net,session,redis,stateless

You could use Redis as a cache to hold various pieces of state about the user. The idea is that when the user logs in, you probably need to load a bunch of information about them from your database (name, address, etc...) at that point, you know the user will...

How change redis to be persistent

redis

Regarding your test, you should wait 5 minutes before killing the process if you want it to be snapshotted. This is the default config for Redis (2.8 - 3.0): ################################ SNAPSHOTTING ################################ # # Save the DB on disk: # # save <seconds> <changes> # # Will save the DB...

Redis Sentinel - How to get Config Value?

redis,redis-sentinel

There is currently no way to do this, since Sentinel does not export a CONFIG command. However if you reach the connection limit, Sentinel will be able to reply with an error about the limit reached, so you can kinda understand if the limit was reached in this way. Of...

How to connect to the same redis db with Predis and redis-cli?

php,redis,predis

The solution was simpler than I imagined. Apparently I had another redis-server running because while installing through homebrew I had inadvertently added a plist file to run a redis daemon by default. Checking all redis instances with ps aux | grep "redis" cleared up the matter....

Loop until i get correct user

ruby,redis

Change if to while: while ["user_4", "user_5"].include?(@randUser = @redis.spop("users")) do @redis.sadd("users", @randUser) end $user_username = @redis.hget(@randUser, "username") $user_password = @redis.hget(@randUser, "password") Please note, that you actually mixed up receiver and parameters on Array#include?...

Default Redis behaviour on graceful shutdown

linux,database,redis

Redis is configured for data persistence as a default, so yes - the keys would still be there after a reboot. If you want to change this behavior, review your redis.conf file after reading this blog post: http://oldblog.antirez.com/post/redis-persistence-demystified.html

Update Dictionary object in redis cache using StackExchange.Redis client

c#,caching,redis,stackexchange.redis,azure-redis-cache

Have you looked at the Hash data structure supported by Redis? http://redis.io/topics/data-types-intro#hashes IDatabase.HashGet("diagnostics", "MyKey"); IDatabase.HashSet("diagnostics", "MyKey", "My Value");...

Redis: Delete user token by email ( find Key by Value )

node.js,express,redis

You basically have to choose one of two approaches: a full scan of the database or an index. A full scan, as proposed in another answer to this question, will be quite inefficient - you'll go over your entire keyspace (or at least all the tokens) and will need to...

Redis Serialization and Deserialization

redis,deserialization,spring-data,serializable,spring-data-redis

what causes deserialization problems? I would like to give you bit of background before answering your question, The serialization runtime associates with each serializable class a version number, called a serialVersionUID, which is used during deserialization to verify that the sender and receiver of a serialized object have loaded classes...

Rails, Redis and Sentinel

ruby-on-rails,redis,redis-sentinel,redis-rails

I may have missed it, but I wasn't aware that you could configure it to read from the slaves? However, this is my master + 2 slave configuration: config.cache_store = :redis_store, { url: 'redis://prestwick/1', sentinels: [{host: 'prestwick.i', port: 26379}, {host: 'carnoustie.i', port: 26379}, {host: 'birkdale.i', port: 26379}], role: 'master', expires_in:...

Redis Cluster: Find which master holds particular key/slot

lua,redis

I still have to read the entire docs, but already found this: There are 16384 hash slots in Redis Cluster, and to compute what is the hash slot of a given key, we simply take the CRC16 of the key modulo 16384. There is a command for that op already:...

Session State with Azure Redis Cache not working on multiple instances

asp.net,azure,redis

i found the problem. i had different machineKeys on the servers so the authentication cookie could not be decoded on the other Webserver.

Implementing following stream

redis

This is a simple fan-out problem which you can not easily do with Redis directly. You can do it with Lua but YOU WILL block Redis during the action. I have an open source project which does the same thing but I do it in code as someone creates a...

How does Redis Cluster handle replication for sorted sets ZSET (and others)?

data-structures,redis,sortedset

Redis' replication is operation-based, meaning that the slaves get the stream of write commands from the master. The replication mechanism isn't related to the clustering functionality and works the same whether used in a cluster or by a standalone Redis server. The replication is extremely reliable but note that it...

NodeJS: Cannot start connect-redis with Express 4.12.2

node.js,session,express,redis

1.4.7 is a pretty old version of connect-redis. The signature has changed since that version. Before it accepted a connect object, but since the 2.0 update with express 4 it now accepts a session object. Your code is already using the new signature so for this to work all you...

hmset redis with result from mysqlDB

php,arrays,redis

I'm using Predis to store your array, code tested $data = array( 'userid' => 1, 'username' => 'test', 'password' => 'example2222', 'health' => 120 ); Predis::instance()->hmset('uid-' . $data['userid'], $data); die(); ...

Predis: Pros and Cons of the two cluster strategies

php,session,redis,cluster-computing,predis

IIUC you're debating internally between using Predis' client-side sharding vs. having it leverage Redis v3's clustering abilities. Client-side sharding is a great to have clustering when a database doesn't support it and this approach is usually the easiest implement initially. However, when a database does provide native clustering functionality -...

Expiration of HashMap in Redis python?

python,database,python-2.7,redis,hashmap

Thanks, Following is what I want to do, I guess it is right: def put_data(name=hash_name, key=hash_key, value=hash_data): import redis r = Redis.get_connection() ttl = datetime.today() + timedelta(hours=72) r.hset(name=name, key=hash_key, value=hash_data) r.expire(name=hash_name, time=ttl) ...

Facing issues while migrating to Redis session state

c#,asp.net,asp.net-mvc-4,session,redis

We went through such a change and there is no other way to do it. It is just marking your classes with an attribute, so it is not such a big thing. The big thing can come when you find some types which are not serializable at all - like...

Connecting to a remote Azure Redis Cache using Redis CLI

.net,windows,azure,redis,stackexchange.redis

You need to turn on the non SSL port. Read this for more information http://azure.microsoft.com/en-us/documentation/articles/cache-faq/#how-can-i-run-redis-commands

Use cases for Redis SETBIT, GETBIT, BITCOUNT?

bitmap,redis

The answer is: it depends. In the above usecase it depends for example on how many logins you have per day (how many bits are active in the bitmask). If you have for example 2 logins or random user ids, it might be better to just store an LIST of...

How To Restore a Missing Redis Service

linux,redis,centos

Do you want to remove redis old package you can use yum remove command as below. yum remove redis then check it still available as below rpm -qi redis and also check files rpm -ql redis if its there you can remove as below. rpm -e redis (or you can...

NoSQL DB for searching in vector space

vector,redis,cassandra,nosql,distance

As far as I know, there are no databases with out-of-the-box support for non-(2|3)D spatial indexes yet, but you can implement your own inside your application layer. In general, you would like to have an efficient algorithm for N-dimensional nearest neighbour search like these: KD-Tree with overall O(log N) complexity...

Set options for ZADD command in laravel redis

php,laravel,redis,set

Until Predis' zAdd method is updated to support the changes in Redis v3.0.2, your best bet is to explore the wonderful world of RawCommand: https://github.com/nrk/predis/blob/master/src/Command/RawCommand.php It should let you construct your own commands, including the ZADD NX ... variant....

Redis - How to expire key daily

node.js,unix,redis,timestamp,sails.js

If you want to expire it 24 hrs later client.expireat(key, parseInt((+new Date)/1000) + 86400); Or if you want it to expire exactly at the end of today, you can use .setHours on a new Date() object to get the time at the end of the day, and use that. var...

Low level caching for collection

ruby-on-rails,caching,redis

So should I use a cached_books method in the controller like this: Yes, you can. Although there's some gotchas you have to be aware of. Book is ActiveRecord. When you call Book.something (e.g. Book.all, or just even Book.order(:title) it returns you a ActiveRecord::Relation, which is basically wrapper for array...

using Go redis client (Redigo)

go,redis

An application must call Receive to clear the responses from the server and to check for errors. If the application is not pipelining commands, then it's best to call Do. Do combines Send, Flush and Receive. If you don't care about errors, then start a goroutine to read the responses:...

Socket.io redis How data stored and cleared

redis,socket.io,socket.io-redis

Assuming that you are referring to https://github.com/Automattic/socket.io-redis/blob/master/index.js, it appears that the plugin uses Redis' PubSub functionality. PubSub does not maintain state in the Redis database so there's no need to clear any data.

Why use Flask's Redis extension?

python,flask,redis

Current maintainer of the package here, hi! I think the two (admittedly minor) conveniences that the package provides are: Integration with Flask's configuration management, so you can organize all your app configuration in the same place. You can add your Redis database URL next to the one for PostgreSQL or...

Openshift redis cartridge with strange exceptions ETIMEDOUT on socket.io script

node.js,redis,socket.io,openshift,openshift-cartridge

Are you using the rhc port-forward command so that you can connect to redis on OpenShift? Otherwise that port is not publicly available.

Never ending stream with Baconjs

javascript,node.js,redis,reactive-programming,bacon.js

A simple solution is to call process.exit inside your onValue handler. ).onValue(function(value) { console.log(value) process.exit(0) }) EDIT: You could write a custom redit source, which closes the connection when it is no longer needed. Bacon.fromBinder(function(sink) { var client = redis.createClient() sink(new Bacon.Next(client)) return function unsubscribe() { client.quit() } }).flatMap(function(client) {...

Laravel Redis configuration

php,redis,laravel-5

As Robert says in the comments, it looks like there is this error because there is no support for Redis as database for laravel.

Should redis zscan on sorted set return my results sorted by score order?

redis,sortedset

The order of reply from the [HSZ]SCAN family of commands is based on the internal data structure that Redis uses, whose order is determined by several factors but most importantly by the updates made to the data. Excluding engineered tests and random coincidences - disordered reply is the expected behavior.

How to check Resque worker status to determine whether it's dead or stale

ruby-on-rails,ruby-on-rails-3,heroku,redis,resque

The only way to determine whether a worker is actually working is to check on the host machine of the worker. After a restart on Heroku, this machines no longer exists so if the worker didn't unregister itself Resque will believe it still to be working. The decentralized nature of...

predis: ZADD with NX keeps throwing error 'Predis\ServerException'

redis,predis

ZADD's NX switch was added only to the recent version of Redis, see here: https://groups.google.com/forum/#!topic/redis-db/4Y6OqK8gEyk In all likelihood you aren't running the recent version - use INFO to find out your server's version....

Redis Cluster in multiple threads

multithreading,redis,thread-safety,connection-pooling,jedis

JedisCluster is thread-safe. It contains JedisPool for each node internally, so you don't need to worry about dealing JedisCluster instance with multithread.

What is the use of privdata argument in redisAsyncCommand?

c,redis,hiredis

As I understand by reading the code on gihub, the purpose of privdata is to send your callback some predefined data (which can be anything; that is why void* is used). In your callback (fn pointer to redisCallbackFn) you will recieve that privdata as parameter (for example look at cb->fn(ac,reply,cb->privdata);...

Travis gives me Redis connection to localhost:6379 failed - connect ECONNREFUSED

node.js,redis,travis-ci

I had a look at your problem and it seems the problem is due to the format of your .travis.yml file. I forked your project and removed the leading spaces in front of the language and node_js fields. I have created a pull request here that shows the changes I...

StackExchange.Redis - best way to wait for a lock

redis,stackexchange.redis

After taking @Marc's comments into consideration and meeting with my team about the benefits of Task.Delay() over Thread.Sleep() in this context I decided on this as a final solution: /// <summary> /// wait up to 3 seconds to achieve a lock! /// The lock is good for a maximum of...

ServiceStack Redis latest list by date

c#,model-view-controller,redis,servicestack

You can do this by maintaining an index of ids in a sorted list, sorted by date. As an example well store a list of articles with different modified dates, e.g: var articles = new[] { new Article { Id = 1, Title = "Article 1", ModifiedDate = new DateTime(2015,...

Docker-compose , anyway to specify a redis.conf file?

redis,docker,docker-compose

Yes. Just mount your redis.conf over the default with a volume: redis: image: redis volumes: - ./redis.conf:/usr/local/etc/redis/redis.conf ports: - "6379" Alternatively, create a new image based on the redis image with your conf file copied in. Full instructions are at: https://registry.hub.docker.com/_/redis/ However, the redis image does bind to 0.0.0.0 by...

Redis remote connection security concern

php,node.js,redis

From http://redis.io/topics/security Note that it is possible to bind Redis to a single interface by adding a line like the following to the redis.conf file: bind 127.0.0.1 It's also recommended to configure your firewall to close whatever port redis is listening on....

SncRedisBundle not working, what am I doing wrong?

symfony2,redis,symfony-2.6

In your config.yml file, try to add this: # config.yml snc_redis: clients: default: type: predis alias: default dsn: redis://%redis_address% logging: %kernel.debug% session: type: predis alias: session dsn: redis://%redis_address%/1 logging: true session: client: session prefix: %project_name% use_as_default: true This will set 2 clients, default and cache. You could use default to...

Can I use Pivotal's Redis and RabbitMQ for Cloud Foundry on Pivotal Web Services

redis,rabbitmq,cloudfoundry

the PCF data services such as mysql, rabbitmq, and redis are currently only available for enterprise PCF customers when using PWS. if you contact pivotal-cf-feedback at pivotallabs dot com we can provide more details on the services roadmap for PWS.