mongodb

Spring framework + NoSQL

Hey folks, It's already 18 hours that i'm playing with Spring framework. It's beautiful, really amazing. As far as i can see spring knows how to work rdbms databases . Can anyone tell me about experience of spring + NoSQL ( cassandra , couchdb\mongodb, redis or even HBase ) ? thanks ...

Using combination of MySQL and MongoDB

Does it make sense to use a combination of MySQL and MongoDB. What im trying to do basically is use MySQl as a "raw data backup" type thing where all the data is being stored there but not being read from there. The Data is also stored at the same time in MongoDB and the reads happen only from mongoDB because I dont have to do joins an...

Can't get PHP to load mongo.so extension

I've tried building the library with PECL, I've tried downloading it from github. I've tried MAMP, I've tried XAMPP. I always get the same error: PHP Warning: PHP Startup: Unable to load dynamic library '/Applications/XAMPP/xamppfiles/lib/php/php-5.3.1/extensions/no-debug-non-zts-20090626/mongo.so' - dlopen(/Applications/XAMPP/xamppf...

Calling stored JavaScript function in MongoDB from PHP

I have this function stored in db.system.js function SomeFunc(o) { x = db.Collection; while( 1 ) { var c = x.find({},{_id:1}).sort({_id:-1}).limit(1); var i = c.hasNext() ? c.next()._id + 1 : 1; o._id = i; x.insert(o); var err = db.getLastErrorObj(); if( err && err.code ) { ...

mapping to value in deep hash

Hi all, I'm doing an application using mongodb and mongoid and I'm facing a problem where I need to map something in one document to something in another document. My plan is to store something in a document that I can then use to figure out what value for it to fetch from a different collection. But, this is more generally a ruby quest...

How do I implement an atomic stack with mongoDB and Ruby

I want to push and pull things off of a stack in an atomic way using ruby and mongoDB. The push I can do atomically via the following code example: collection.update({"_id" => document["_id"]}, {"$push" => {field_name => value}}) Example code for pop: value = collection.update({"_id" => document["_id"]}, {"$pop" => {field_name => -1...

Munin Mongodb Plugin Not Showing. . . ?

I have installed munin and munin-node on my monitoring server and installed munin-node on my mongodb server, I have set them both up and all is working great. But, the mongodb plugins aren't showing on my monitoring server. I see the node listed and "Disk, Network, Processes, System", but not the mongo stuff. If I execute one of the plug...

MongoDB: Terrible MapReduce Performance

Hi all, I have a long history with relational databases, but I'm new to MongoDB and MapReduce, so I'm almost positive I must be doing something wrong. I'll jump right into the question. Sorry if it's long. I have a database table in MySQL that tracks the number of member profile views for each day. For testing it has 10,000,000 rows. C...

Querying associated collection using MongoMapper scopes?

class Comment include MongoMapper::Document scope :by_rating, lambda { |minimum| where(:rating.gte => minimum) } key :rating belongs_to :user end class User include MongoMapper::Document many :comments end User.first.comments.by_rating(3) What does the query on last line actually do? Is MongoMapper intelligent enough ...

How can I use Capifony to deploy a symfony 1.4 project that uses Mongo

I have a symfony 1.4 project that uses Mongo db, but now I come to set up the deployment tasks with Capifony I can't get deployment to work as Capifony seems to take for granted the fact that I will be working with the databases.yml file, and either Doctrine or Propel - which I'm not in this case. Is there an easy way to work round this...

How to set NSManagedObjectID manually?

I want to sync the Core Data on iPhone with MongoDB on Sinatra server. When the iPhone gets a message from the Node.js chat server, the message contains the sender's BSON ObjectId (a string). For the iPhone to store this message, I find the user with that same Id in Core Data. I want to be able to do something like objectWithID. In othe...

capistrano failing to clone git submodules on http

I have a web project set to deploy from a git repo. If I set up the project with http submodules (e.g. http://github....etc) it fails to deploy, with: ** [my-dev-server.com :: out] Synced lib/vendor/odm ** [my-dev-server.com :: out] Cloning into lib/vendor/odm... ** [my-dev-server.com :: err] fatal: Unable to find remote helper for 'ht...

Mongoid / Mongodb and querying embedded documents

Hi, I have an Author model and a Book model. When the Author has many embedded Books, is it possible to query for all Books in mongoid (rails 3.0.1) or do I always have to fetch the Author to get the Books? Best regards, sewid ...

Indices and capped collections with MongoMapper

What is the best way to set up an index or configure a capped collections in a Rails project? From what I've found, it seems that a good way would be to keep this configuration in an initializer. The command for setting up an index is ModelName.ensure_index :key, but what is the command for a capped collection? ...

Document Databses: Redundant data, references, etc. (MongoDB specifically)

It seems like I run into lots of situations where the appropriate way to build my data is to split it into two documents. Let's say it was for a chain of stores and you were saving which stores each customer had visited. Stores and Customers need to be independent pieces of data because they interact with plenty of other things, but we...

DateTime with MongoDB/Mongoid and Rails 3 Not Populating

Here is the code in my Model include Mongoid::Document include Mongoid::Timestamps field :message, :type => String field :send_at, :type => DateTime Here is the code for my form partial <%= f.label :send_at %><br /> <%= f.datetime_select :send_at %> But the date and time is never populated. I made sure that Mongo and Mongoi...

Comparison of geospatial support for mongodb and postgis

I am in the process of creating a consumer facing location based mobile app that will heavily need GIS support. I have narrowed down the databases to Postgres (PostGIS) and mongodb. I was wondering how someone who has experience with both would rate the geospatial support particularly in the area of: Performance Query expressibility ...

Best practice for updating a MongoDB collection with unknown modified fields.

Hey guys, So I'm building an app using PHP and MongoDB which will have a fair bit of traffic in both reads and writes.. After a couple of months there should be around 2500 reads a second and 200 writes per second (not sure how that really rates in terms of traffic compared to others, though). I'm a bit curious on what to do when upda...

Should I rebuild my PHP website with a document database in order to improve performance?

Hello, We have a website developed in PHP with MySQL and sometimes facing problems when traffic increases. We have almost optimized the site in all ways to handle more requests but still facing problems at peak hours. One of my friends suggests to rebuild the site using HBase / MongoDB as back-end to improve the performance. Also he su...

Mongodb on solaris10 64bit - I'm getting 'Invalid argument' when trying to run ./mongod

I've unzipped and detarred the solaris install package from the mongo site - version 1.6.3. When I try to run the ./mongod command I get the following (running as root): $ ./mongod bash: ./mongod: Invalid argument Same thing happens for the rest of the executables. I've created the data folder as per the instructions, but I'm prob...