ruby: All content tagged as ruby in NoSQL databases and polyglot persistence
Tuesday, 2 April 2013
Redis: You Shall Never Be Blamed
Mariano Valles with a story of Ruby, Redis and concurrency:
- Concurrency issues and high loads are best friends.
- When using unicorn or any other app server using forking to have multiple process, be careful, forks are process clones
- Servers used as databases or willing to handle many incoming connections should be tuned accordingly: e.gprlimit —nofile 10000
- Don’t rely on the GC for cleaning up your mess. It might work in Java, not so much in Ruby.
Original title and link: Redis: You Shall Never Be Blamed | (©myNoSQL)
via: http://marianovalles.wordpress.com/2013/04/01/redis-you-shall-never-be-blamed/
Wednesday, 16 January 2013
Using Neo4j Graph Database With Ruby
A two part article by Thiago Jackiw providing a brief explanation of what graph databases and Neo4j are and a quick look at 3 Ruby libraries for Neo4j: Neo4j.rb1, Neography2, and Neoid3
This article demonstrated how to install Neo4j and the basic idea of how to integrate it with a Ruby/Rails application using the different solutions available. Even though the examples given here barely scratched the surface of Neo4j, it should hopefully give you enough knowledge and curiosity to start integrating it on your own projects.
Original title and link: Using Neo4j Graph Database With Ruby (©myNoSQL)
Sunday, 29 July 2012
Redis Failover at Spreecast Based on Apache ZooKeeper
Until Redis Sentil becomes generally available, Spreecast’s Ruby library using Apache ZooKeeper might be the solution for high availability Redis clusters:
We decided to address these concerns by creating the redis_failover gem, which was recently released as open-source for Ruby environments employing Redis. The redis_failover gem aims to be a drop-in replacement for the existing Ruby client for Redis. redis_failover is equipped with the capability to recognize and handle an automatic (or manual) failover gracefully. The client knows to automatically direct write operations to the current master and read operations to one of N slaves. redis_failover is built on top of ZooKeeper, a proven distributed configuration and notification system that handles pushing changes to nodes across the network. We decided to use ZooKeeper since it automatically handles network partitions, quorum management, client discovery, and other difficult distributed computing problems.
Original title and link: Redis Failover at Spreecast Based on Apache ZooKeeper (©myNoSQL)
via: http://engineering.spreecast.com/spreecast-redis-failover/
Tuesday, 29 May 2012
An Overview of Neo4j.rb 2.0
Andreas Ronge writing about using Neo4j in embedded mode with JRuby:
The advantage of the embedded Neo4j is better performance due to the direct use of the Java API. This means you can write queries in plain Ruby! Another advantage of the embedded Neo4j is that since it’s an embedded database there is one less piece of infrastructure (the database server) to install. The embedded database is running in the same process as your (Rails) application. Since JRuby has real threads there is no need to start up several instances of the database or of the Ruby runtime since JRuby can utilize all available cores on the CPU. There is actually even no need to start the database at all as it will be started automatically when needed. Notice it’s still possible to use the REST protocol or the web admin interface from an embedded Neo4j, see the neo4j-admin gem.
So which should I choose ? Well, if you can’t use JRuby or you don’t need an Active Model compliant Neo4j binding then the Neo4j Server is a good choice, otherwise I would suggest using the embedded Neo4j.rb gem (but I’m a bit biased)
As showed also by the earlier [migrating data from Oracle to MongoDB with JRuby], JRuby proves to be an interesting beast for handling data. I’m more on the side of Python, but Jython is not (yet?) as up-to-date as JRuby.
Original title and link: An Overview of Neo4j.rb 2.0 (©myNoSQL)
via: http://blog.jayway.com/2012/05/07/neo4j-rb-2-0-an-overview/
Friday, 6 April 2012
DynamoDB Libraries, Mappers, and Mock Implementations
A list of DynamoDB libraries covering quite a few popular languages and frameworks:

A couple of things I’ve noticed (and that could be helpful to other NoSQL database companies):
- Amazon provides official libraries for a couple of major programming languages (Java, .NET, PHP, Ruby)
- Amazon is not shy to promote libraries that are not official, but established themselves as good libraries (e.g. Python’s Boto)
- The list doesn’t seem to include anything for C and Objective C (Objective C is the language of iOS and Mac apps)
Original title and link: DynamoDB Libraries, Mappers, and Mock Implementations (©myNoSQL)
Tuesday, 27 March 2012
Tutorial: Building Backbone.js Apps With Ruby, Sinatra, MongoDB and Haml
A tutorial mostly about Backbone.js and Sinatra, but using MongoDB. It’s quite comprehensive on all aspects so it can be a good intro guide for newbies to any of these tools:
In this post, we looked at creating a Backbone application backed by an API powered by Ruby, Sinatra, Haml, MongoDB and the MongoDB driver. I personally found developing APIs with Sinatra a relatively painless experience and one which I felt was on-par with the effort required for the Node/Express implementation of the same application.
Original title and link: Tutorial: Building Backbone.js Apps With Ruby, Sinatra, MongoDB and Haml (©myNoSQL)
via: http://addyosmani.com/blog/building-backbone-js-apps-with-ruby-sinatra-mongodb-and-haml/?g
Tuesday, 21 February 2012
Amazon DynamoDB Is Not Production Ready
Timothy Cardenas reports on his experience with Amazon DynamoDB and the Ruby SDK:
Problems i have had include:
- Write capacity hanging in create mode for over an hour
- Inability to simply count my records
- Inablity to loop through records without huge read costs
- No asyncronous support for writting
- Can only double read/write capacity per update
- Ruby SDK is written like a labyrinth with very little ability to extend without knowing every little detail about the rest of the library. I couldnt even understand how a request was created it was so convoluted.
Basically with the ruby client you can put data in but can’t get it out efficiently without paying a ton for beefed up read operations.
I think that only the lack of support for async writes and the complexity of the Ruby SDK are really Amazon DynamoDB related issues; I assume the first one has been a temporary issue. Everything else is DynamoDB’s documented behavior and so one is supposed to be aware of these when designing their applications.
As far as I know, Amazon DynamoDB has been in private beta for a while with real production users. But that doesn’t mean that DynamoDB will be the right solution for everyone. And that’s not equivalent with saying that DynamoDB is not production ready.
Original title and link: Amazon DynamoDB Is Not Production Ready (©myNoSQL)
via: http://timcardenas.com/amazons-dynamodb-is-not-production-ready
Wednesday, 8 February 2012
Redis Pipelining Explained with Ruby Code
Albert Callarisa Roca demoes pipelining in Redis using some basic Ruby code. Remember that saving round trips equals reduced latency => happier users.
Original title and link: Redis Pipelining Explained with Ruby Code (©myNoSQL)
via: http://acroca.com/blog/2012/02/04/redis-pipelined-queries/
Fulltext search your CouchDB in Ruby
When having to choose what library to use for full text indexing of CouchDB data for a Ruby application, Taylor Luk looked at from Sphinx, Lucene, Ferret, Xapian and decided to go with Xapian with Xapit . Besides the fact that Xapian with Xapit offers a clean interface and customization of the indexing process, there seem to be quite a few important limitations:
- Xapit is still under active development
- You need to trigger Index update manually
- It doesn’t Incremental index update at the moment
I know some are afraid of managing a Java stack, but in the land of indexing, Lucene, Solr, ElasticSearch, IndexTank are the most powerful tools.
Original title and link: Fulltext search your CouchDB in Ruby (©myNoSQL)
via: http://taylorluk.com/post/17255656638/fulltext-search-your-couchdb-in-ruby
Wednesday, 1 February 2012
Neo4j on Heroku: Building a Movie Recommendation Website for $0.00
Recently Max de Marzi has published sort of a getting started with Neo4j on Heroku guide. Here is how Max described it:
It takes a lot less effort to build a website these days than it used to. All it takes is a clever dwarf standing on the shoulders of the right giants. In a series of blog posts, I walk you through creating a movie recommendation website using Neo4j, Heroku, themoviedb.org, Processing.js, GroupLens, Marko Rodriguez and Michael Aufreiter. Free database, free hosting, free movie posters, free visualization, free dataset, free recommendation algorithm, just need to add a little code to bring them all together and BYOP (bring your own popcorn).
This will not get you a Netflix or Amazon like recommendation engine, but using a similar approach could definitely tell if Muhammad Ali is truly the greatest.
Original title and link: Neo4j on Heroku: Building a Movie Recommendation Website for $0.00 (©myNoSQL)
Wednesday, 11 January 2012
Friend Recommendations Using Gremlin With Neography
Max De Marzi:
Gremlin is a domain specific language for traversing property graphs. Neo4j is one of the databases that can speak the gremlin language, and as promised I’ll show you how you can use it to implement friend recommendations as well as degrees of separation.
Original title and link: Friend Recommendations Using Gremlin With Neography (©myNoSQL)
via: http://maxdemarzi.com/2012/01/06/gremlin-with-neography/
Thursday, 5 January 2012
Getting Started With Ruby and Neo4j Using Neography
Getting started with Ruby and Neo4j is very easy. Follow these steps and you’ll be up and running in no time.First we install the neography […]
The traversal API looks really nice and comes in two flavors: the Neo4j REST API and a Ruby-esque one.
Original title and link: Getting Started With Ruby and Neo4j Using Neography (©myNoSQL)
via: http://maxdemarzi.com/2012/01/04/getting-started-with-ruby-and-neo4j/
Most Popular Articles
- Translate SQL to MongoDB MapReduce
- Tutorial: Getting Started With Cassandra
- CouchDB vs MongoDB: An attempt for a More Informed Comparison
- Cassandra @ Twitter: An Interview with Ryan King
- A Couple of Nice GUI Tools for MongoDB
- NoSQL benchmarks and performance evaluations
- Ehcache: Distributed Cache or NoSQL Store?
- Document Databases Compared: CouchDB, MongoDB, RavenDB
- Quick Review of Existing Graph Databases
- NoSQL Data Modeling
