redis

Is it possible to update model attributes using Ohm and Redis DB is Ruby?

I'm taking a first look at Monk and the Ohm/Redis APIs and I have a simple question. Is it possible to update attributes on model objects using Ohm/Redis? class Event < Ohm::Model attribute :name index :name end Event.create(:name => "A mistake made here...") @event = Event.find(:id, 25) @event.name = "I want to edit my mistake.....

How to deploy resque workers in production?

The GitHub guys recently released their background processing app which uses Redis: http://github.com/defunkt/resque http://github.com/blog/542-introducing-resque I have it working locally, but I'm struggling to get it working in production. Has anyone got a: Capistrano recipe to deploy workers (control number of workers, restarting ...

how to model this ruby structure in redis

hi, i'm thinking use redis (http://code.google.com/p/redis/) to store this kind of ruby data structure. suppose this: node1server1 = { "volume1" => 10400, "volume2" => 11221, "volume3" => 13212, "volume4" => 17227 } node1server2 = { "volume1" => 17450, "volume2" => 14241, "volume3" => 15512, "volume4" => 12427 } node2server1 = { "volu...

nginx/redis and handling tracking params in url

I am using nginx and redis in my website. For several items on my site, I want to add tracking params to their urls so that when a user clicks on an item, I can collect statistics of user usage apart from serving the content user requested. I am looking for methods on how to capture this statistics in redis from nginx, i.e. without hitti...

Redis autocomplete

Hi, How can I implement an autocomplete using redis? Say for example I have an array ["alfred","joel","jeff","addick"]. When I type a I get ["alfred", "addick"] I hope you get the point. How can I implement this using redis commands efficiently(if possible but I think it is). It would be great if I could get some simple commands I can...

Redis - which PHP module to use?

If i check redis php supported language (http://code.google.com/p/redis/wiki/SupportedLanguages), there's 4 PHP ones: Redis PHP Bindings,phpredis,Predis,Redisent. Question is, which is the best and good to use? Thanks! ...

C program stuck on uninterruptible wait while performing disk I/O on Mac OS X Snow Leopard

Hello all, One line of background: I'm the developer of Redis, a NoSQL database (http://code.google.com/p/redis). One of the new features I'm implementing is Virtual Memory, because Redis takes all the data in memory. Thanks to VM Redis is able to transfer rarely used objects from memory to disk, there are a number of reasons why this w...

PHP - Redis/Memcachedb/Mongodb or other persistent storage to store counter

By counter it could be pageviews, downloads, number of votes etc. Basically, not very 'critical' data. What is the 'best' way to store those information? Mysql is not a good option. What do you guys use? ...

key value stores for extendable objects

http://www.infoq.com/presentations/newport-evolving-key-value-programming-model is a video about KV stores, and the whole premise is that redis promotes a column-based style for storing the attributes of an object under separate keys rather than serialising an object and storing it under a single key. (This question is not redis-specifi...

Redis replication and redis sharding (cluster) difference

1) Anyone know the difference between redis replication and redis sharding? 2) What are they use for? Redis stores data in memory, how does this affect replication/sharding? 3) Is it possible to use both of them together? Thank you! ...

Predis sharding (consistent hashing)

Predis claim to have Client-side sharding (support for consistent hashing of keys). http://github.com/nrk/predis I can do sharding using connect to an array of profiles (nodes) but it isn't consistent hashing. When I add another node to the pool, some of the keys can't be found. Anyone has any experience on this? Using php 5.2 (and red...

How to use Redis within a C++ program?

What would be the best way to use a Redis DB within a C++ program? ...

C++ How to use and pass a 3-dimensional char array?

I'm trying to build a char array for storing the return value of a function. In the following function the data is stored in ***valv. How to build a extern variable to access the data? int credis_lrange(REDIS rhnd, const char *key, int start, int end, char ***valv) { int rc; if ((rc = cr_sendfandreceive(rhnd, ...

How do you mix SQL DB vs. Key-Value store (i.e. Redis)

I'm reviewing my code and realize I spend a tremendous amount of time taking rows from a database, formatting as XML, AJAX GET to browser, and then converting back into a hashed javascript object as my local datastore. On updates, I have to reverse the process (except using POST instead of XML.) Having just started looking at R...

What is the easiest way to simulate a database table with an index in a key value store?

What is the easiest way to simulate a database table with an index in a key value store? The key value store has NO ranged queries and NO ordered keys. The things I want to simulate (in order of priority): Create tables Add columns Create indexes Query based on primary key Query based on arbitrary columns ...

Resque or Gearman - choosing the right tool for background jobs

We are developing a web application wherein with about 50% of write requests, we end up pushing data to multiple data stores and inserting and updating significant number of records in those data stores. To improve the response time, we want to process such requests asynchronously in the background. Our web application is being written ...

How to use resque-scheduler and resque-status together?

I have resque-scheduler working fine in a rails app. Now I need to be able to track status and remove jobs from the queue. I had a brief look at resque-status and, from what I saw, if I could get it to play nicely with resque-scheduler then it would be perfect. However, it seems rescue-status uses create which wraps enqueue and resque-s...

Is redis a durable datastore?

By "durable" I mean, the server can crash at any time, and as long as the disk remains in tact, no data is lost (see ACID). Seems like that's what journaling mode is for, but if you enable journaling, doesn't that defeat the purpose of operating on in-memory data? Read operations might not be affected by journaling, but it seems like jou...

Twisted: why is it that passing a deferred callback to a deferred thread makes the thread blocking all of a sudden?

I unsuccessfully tried using txredis (the non blocking twisted api for redis) for a persisting message queue I'm trying to set up with a scrapy project I am working on. I found that although the client was not blocking, it became much slower than it could have been because what should have been one event in the reactor loop was split up ...

Redis, it's memory limit and persistance question?

Hello, I'm rather new to Redis and before using it I'd like to learn some important (as for me) details on it. So.... Redis is using RAM and HDD for storing data. RAM is used as fast read/write storage, HDD is used to make this data persistant. When Redis is started it loads all data from HDD to RAM or it loads only often queried data ...