I'm trying to set up mongodb on webfaction. It works fine, currently running on port 36505 on the server. I can connect to it on the server just fine. But per the firewall, I can't connect to 36505 on the server from the 'net.
I can expose the port by mapping the port to port 80 under a sub-path. So I can make 1.1.1.1:36505 to 1.1.1.1:8...
When I do a find query from the mongodb JavaScript console, I get a beautiful JSON response. However, when I do a find with the ruby driver, it stores the JSON as some Ruby object. How do I convert this back to JSON? Or, better yet, how do I just get the JSON without doing the extra conversions?
...
For putting together a site from scratch, what are the advantages and disadvantages of using external database services, e.g. MongoHQ, Amazon RDS?
...
Greetings,
I'm building my personal website using php. My standard approach is to use MySQL as a database backend. I've been hearing a lot about document orienting databases and I'm wondering if these ( couchDB, mongoDB) might be a better option for me.
I understand that a low traffic site such as my personal homepage isn't going to se...
I just read a few articles on data modeling and relationships in document oriented databases (... anti pattern, CouchDB article, MongoDB article ...). There are certain "issues" about which I would like to talk and hopefully find a solution/pattern to stop them deluding me.
There is a common saying that you should stop thinking like you...
i want to store all my assets in mongo gridfs. i was trying to get
carrierwave setup with mongomapper and gridfs but seems carrierwave
supports mongoid now instead.
I need to be able to save different size versions / cropped versions
of an image so thats why i was going to use carrierwave. Currently
its set up to store on file ...
What scenario makes more sense - host several EC2 instances with MongoDB installed, or much rather use the Amazon SimpleDB webservice?
When having several EC2 instances with MongoDB I have the problem of setting the instance up by myself.
When using SimpleDB I have the problem of locking me into Amazons data structure right?
What diff...
I've got a simple model object:
class UserRating
include MongoMapper::EmbeddedDocument
key :idea_id, ObjectId
key :rating, Integer
end
I'm trying to set an Idea_Id on this object with:
user_rating.idea_id = ObjectId.new
This throws: "illegal ObjectID format"
This sure seems like simple code... The only oddity I am noticing ...
I've got a group of messages in mongo which I am retrieving in rails with
@messages = current_user.user_messages(@user)
I now want to select the number of messages which were created in the last week, so I thought I could take the @messages and query that directly with
@countRecent = @messages.count(:conditions => {:created_at =>{'$...
I have a collection of items in mongodb that look like this (I'm using pymongo):
{'type':'_sometype', 'name':'_somename', 'date':datetime, 'incoming':bool}
type and name are not unique across items, so it is possible to have items with the same type and name but differing dates.
The issue: sometimes I'll need to determine if an it...
Are there any disadvantages to storing dates as integers (timestamps) in MongoDB rather than its MongoDate format?
Because I'm having problems with Zend Framework and Doctrine ODM to read the data, since I get them returned as an array as DateTime object. Internally MongoDB seems to save them as Timestamps, but has its own object for it...
Does GridFS have an upsert?
For example, if i want to save an image with a specified _id, and one with that same _id already exists, i want it to overwrite (update) it. Otherwise, insert it.
Thanks!
Matt
...
Hi guys,
I'm running mongodb server as a windows service. How can i connect to it via console to trace executed queries?
Best regards,
Alexey Zakharov
...
I develop a new website and I want to use GridFS as storage for all user uploads, because it offers a lot of advantages compared to a normal filesystem storage.
Benchmarks with GridFS served by nginx indicate, that it's not as fast as a normal filesystem served by nginx.
Benchmark with nginx
Is anyone out there, who uses GridFS alrea...
I am starting to study map-reduce databases. How can one implement a reference in a map-reduce database, such as CouchDB or MongoDB? For example, suppose that I have drivers and cars, and I want to mark that some driver drives a car. In SQL it's something like:
SELECT person_id, car_id FROM driver, car WHERE driver.car = car.car_id
(T...
I'm new to Mongo DB and Mongoid (and still kinda new to Ruby on Rails). Since Ryan Bates dosen't happen to have a Mongoid Railscast, I need pointers to other good tutorials/screencasts.
Thanks!
...
I'm just starting a project where I need to return POJOs from our mongo db. I did a quick search and found a few mappers in development but nothing extremely solid.
What I'm looking for:
1) Ideally, as little additional code as possible to map POJO to mongodb (and vice versa)
2) Recommended strategy/pattern for access (regarding conne...
I have a collection of the following sort of documents (taken from Mongo DB Docs: Schema Design for familiarity):
db.students
{ name: 'Jane',
scores: [
{ course: 'math', grade: 'A'},
{ course: 'biology', grade: 'B'},
{ course: 'english', grade: 'C'}
]
}
If I already have the docume...
I am trying to execute this MongoDB command in Node.js:
db.events.group({
key : {
'timestamp.d' : true
},
cond: { 'event_name': 'search' },
initial : {
'count' : 0,
'empty' : 0,
'redos' : 0
},
reduce : function(item, summaries){
summaries.count++;
if (item.result_count == 0){
summaries.empty++;
...
I've got MongoKit structure like this:
structure = {
...
'plugin': {
'id': unicode,
'title': unicode,
'description': unicode,
...
}
However, not all documents will have the plugin key. If they do, I'd like it to be validated against the structure.
required_fields does not include plugin. (plugin isn't a required k...