ALL COVERED TOPICS

NoSQL Benchmarks NoSQL use cases NoSQL Videos NoSQL Hybrid Solutions NoSQL Presentations Big Data Hadoop MapReduce Pig Hive BigTable Cassandra HBase Hypertable Couchbase CouchDB MongoDB OrientDB RavenDB Jackrabbit Terrastore Redis Riak Project Voldemort Tokyo Cabinet Kyoto Cabinet memcached Membase Amazon SimpleDB MemcacheDB M/DB GT.M Amazon Dynamo Dynomite Mnesia Yahoo! PNUTS/Sherpa Neo4j InfoGrid Sones GraphDB InfiniteGraph AllegroGraph MarkLogic Clustrix CouchDB Case Studies MongoDB Case Studies NoSQL at Adobe NoSQL at Facebook NoSQL at Twitter

NAVIGATE MAIN CATEGORIES

Close

rails: All content tagged as rails in NoSQL databases and polyglot persistence

High Performance Rails Caching with Redis and nginx

here at rapidrabbit we deliver many 1,000 requests per second. doing this while only using a handful of servers and ruby on rails we employ very clever caching using redis and nginx. once the cache is written, it is directly accessed by nginx via a module, which makes it around 500-2,000 times faster than any rails controller.

Bypassing the slowest component in your stack by using caching might be a good idea. But then you need to answer how you control the lifecycle of your cached data. Taking inspiration from HTTP declarative caching mechanisms could be a start.

Original title and link: High Performance Rails Caching with Redis and nginx (NoSQL database©myNoSQL)

via: http://over9000.org/rails/high-performance-rails-caching-with-redis-and-nginx


Persistent Graph Structures With Ruby/Rails

Summarizing this long thread trying to answer the question in the title: Neo4j + JRuby.

Original title and link: Persistent Graph Structures With Ruby/Rails (NoSQL database©myNoSQL)


Rails Caching Benchmarked: MongoDB, Redis, Memcached

A couple of Rails caching solutions—file, memcached, MongoDB, and Redis—benchmarked firstly here by Steph Skardal and then here by Thomas W. Devol. Thomas W. Devol concludes:

Though it looks like mongo-store demonstrates the best overall performance, it should be noted that a mongo server is unlikely to be used solely for caching (the same applies to redis), it is likely that non-caching related queries will be running concurrently on a mongo/redis server which could affect the suitability of these benchkmarks.

I’m not a Rails user, so please take these with a grain of salt:

  • without knowing the size of the cached objects, at 20000 iterations most probably neither MongoDB, nor Redis have had to persist to disk.

    This means that all three of memcached, MongoDB, Redis stored data in memory only[1]

  • if no custom object serialization is used by any of the memcached, MongoDB, Redis caches, then the performance difference is mostly caused by the performance of the driver

  • it should not be a surprise to anyone that the size of the cached objects can and will influence the results of such benchmarks

  • there doesn’t seem to be any concurrent access to caches. Concurrent access and concurrent updates of caches are real-life scenarios and not including them in a benchmark greatly reduces the value of the results

  • none of these benchmarks doesn’t seem to contain code that measure the performance of cache eviction


  1. Except the case where any of these forces a disk write  

Original title and link: Rails Caching Benchmarked: MongoDB, Redis, Memcached (NoSQL database©myNoSQL)


Arduino Cat Faucet With Mongodb and Rails

I used before the word geeky for the Smalltalk and CouchDB or the Smalltalk client for Riak. But this story is the real geeky thing. You must read it to believe me:

My cat likes to drink fresh and cold water directly from the faucet. We get up and turn on the faucet only to leave it running after she’s jumped down. It’s not really a big problem for us but I saw a fun problem that I could work on. As much as this seems like a weird and freakish oddity, it’s a potential start of a smarthome sensor network that may provide some utility. I also saw an opportunity to learn various things such as MongoDB, mechanical construction with Microrax, Rails3 and more development on Arduino with an Xbee module.

Arduino Cat Faucet with Mongodb and Rails

All parts of the project are described in detail, so even if you are not a cat person I still think you’ll enjoy it.

Original title and link: Arduino Cat Faucet With Mongodb and Rails (NoSQL databases © myNoSQL)

via: http://squarism.com/2011/03/09/arduino-cat-faucet-with-mongodb-and-rails/


Rails Extensions for MongoDB Mongoid

A bunch of Rails addons to enhance Mongoid mapped models timestamps, versioning, history, tagging, search, geo, tree, etc. — note how many of these libraries are calling themselves mapping tools or even ORMs and ask yourself if indeed there’s no impedance mismatch:

This is all made possible by the fact that MongoDB documents don’t need a schema and that mongoid has a very simple callback mechanism that can invoke your function when an object is created, modified or destroyed.

The reverse of the coin is that the more you add the more magic is happening behind the scenes. And magic doesn’t usually play well with performance.

Original title and link: Rails Extensions for MongoDB Mongoid (NoSQL databases © myNoSQL)

via: http://code.dblock.org/ShowPost.aspx?id=210


Rails to XMPP with Redis

Now, whenever we need to pass a message to the XMPP server from the webapp, we stick it into a special Redis list. The proxy-component is now connected to the XMPP server and also connected to Redis. Using Redis’ BLPOP feature, the proxy-component ‘listens’ to the list, and forwards any new messages to the XMPP server. BLPOP is especially suited for this setup since it blocks the redis connection till a new item shows up in the list, making it quite zippy (otherwise you’d have to poll the list every few seconds, not as great or fast). 

Why not using Redis Pub/Sub?

Original title and link: Rails to XMPP with Redis (NoSQL databases © myNoSQL)

via: http://blog.receivd.com/stack-glue-using-nodejs-redis


Easy IP Geotargeting with Geokit and MongoMapper

There are several cases in which it might make sense to tailor your app’s content based on a user’s physical location. But asking them directly is a bit of a pain. Luckily, it’s extremely simple to find a user’s location knowing only something you will always know about a visitor: their IP address. Today I’ll walk you through how to use IPs to geolocate your visitors in a Rails application using Geokit and MongoDB’s geospatial indexing with MongoMapper.

And a couple of days ago it was Rails with Geocoder and MongoDB with Mongoid.

Original title and link: Easy IP Geotargeting with Geokit and MongoMapper (NoSQL databases © myNoSQL)

via: http://intridea.com/2011/4/6/easy-ip-geotargeting-with-geokit-and-mongomapper


Geolocation, Rails and MongoDB- a recipe for success

‘Geolocation’ seems to be the best dish being served today. Every web-portal, every mobile app wants to be sensitive to a persons location. Everyone wants to see information that is ‘relative’ or location sensitive. Whether its a deal portal, travel portal, social network – giving users information that is relevant to their location bring not only a personalized touch but also keeps tuned in to the portal.

Combining Rails with Geocoder, MongoDB with Mongoid and mongoid-geo, and Google Maps Javascript API.

Original title and link: Geolocation, Rails and MongoDB- a recipe for success (NoSQL databases © myNoSQL)

via: http://blog.joshsoftware.com/2011/04/13/geolocation-rails-and-mongodb-a-receipe-for-success/


Using Redis with Ruby on Rails

TL;DR: Redis is fucking awesome.

Title and quote says it all. Added to the getting started with NoSQL guides.

Original title and link: Using Redis with Ruby on Rails (NoSQL databases © myNoSQL)

via: http://jimneath.org/2011/03/24/using-redis-with-ruby-on-rails.html


MongoDB for Gathers.us

Ethan Gunderson talking about their experiments with Ruby on Rails and MongoDB for building Gathers.us:

Mongo Chicago: Sneak Preview by Ethan Gunderson

Original title and link: MongoDB for Gathers.us (NoSQL databases © myNoSQL)


MongoDB and Security via Diaspora

When asked why MongoDB is using their own query language instead of SQL, the answer was that using JSON for both data and queries made more sense. Plus, it helped avoid injection attacks. As showed by Patrick McKenzie’s post on recently released Diaspora, turns out this is not quite true:

Diaspora uses MongoDB, one of the new sexy NoSQL database options. I use a few myself. They have a few decades less experience getting exploited than the old relational databases you know and love, so let’s start: I claim this above code snippet gives me full read access to the database, including to serialized encryption keys.

The conclusion is quite obvious: as long as developers continue to use string concatenation and interpolation, the query language doesn’t really matter. So you might be better off with something that people feel familiar with.

Original title and link: MongoDB and Security via Diaspora (NoSQL databases © myNoSQL)

via: http://www.kalzumeus.com/2010/09/22/security-lessons-learned-from-the-diaspora-launch/


Diaspora, The Open Source Social Network, Uses MongoDB

Diaspora — the project started as an open source alternative to Facebook at the time Facebook was facing user complaints to their changes to the user privacy — has published its first alpha version on GitHub. According to the README, it sounds like Diaspora is using MongoDB.

I am pretty sure that the decision was not made based on the recent MongoDB scaling features, but rather on the feature set that made the initial developers feel comfortable and familiar to develop this first alpha version. On the other hand, seeing Rails 3 in the same list may just mean they tried their hands with the latest and greatest.

Original title and link: Diaspora, The Open Source Social Network, Uses MongoDB (NoSQL databases © myNoSQL)