[00:51:20] <Ephexeve> Hey guys, I wonder, is there a way to add a password to a database? So the only way to query it is with a password? otherwise there is NO way to access it?
[00:53:00] <Ephexeve> cheeser: Well, that would be when connecting to the server. Anyone could use/create whatever, but when using a certain database, you would need a password for it
[00:53:59] <Ephexeve> say, database foo, anyone would be able to query, but when trying to query something from database x, you would need a password
[00:54:25] <cheeser> sounds like this to me: http://docs.mongodb.org/manual/tutorial/enable-authentication/
[00:55:33] <Ephexeve> cheeser: Could be, but I wonder, for ANY database he would need to authenticate, correct? Isn't there a way to make tis for one database only?
[00:55:47] <Ephexeve> Anyone could connect and do whatever they want, except query database x
[00:55:51] <cheeser> i believe so, yes. read the tut and see.
[01:53:15] <k_sze[work]> I'm trying to perform an inline map-reduce on a secondary of my replication set, but I'm getting the "not master" error message.
[01:53:21] <k_sze[work]> What might I be doing wrong?
[01:54:27] <k_sze[work]> The command I am trying is this: db.my_collection.mapReduce(mapper, reducer, {out: {inline: 1}, sort: {some_key: 1}, jsMode: true})
[02:32:52] <k_sze[work]> And when I do "show collections" on the secondary, I get "not master and slaveOk=false"
[07:08:27] <morfin> how do you think how optimal will be using MongoDB for next task: i need to create interface where some managers will fill out some information for some clients and there will be lots of different client types with totally different fields(only 2-3 will be always same)
[07:10:01] <morfin> also i'll need search by some of fields, and all that does not fit into relational database(i do not want to add new fields each time i need to add new type)
[07:27:36] <kali> morfin: the search is the tricky part
[07:28:18] <kali> morfin: if there is more than a few hundreds records, you'll need indexes
[07:29:00] <kali> morfin: so chances are you'll need indexes on these optional fields
[07:29:17] <kali> morfin: (you may even need full text indexes actually)
[07:29:49] <kali> morfin: you may want to look at: http://blog.mongodb.org/post/59757486344/faceted-search-with-mongodb
[07:39:01] <morfin> i am thinking about making my app scalable\robust application
[08:54:05] <hoczaj> I want to do a query, that will give me the result if in the following document it is matching somehow: {name: 'John Tomas', state: 'California', City:'Test'}
[09:27:18] <hoczaj> ah nevermind... i have 2.4; ) and it is supported in >2.6
[09:40:00] <thanasisk> hi all. I am getting $err" : "not master and slaveOk=false", "code" : 13435 - even if I have configured it as a STANDALONE machine - anyone care to share where the misconfiguration might lie?
[09:40:24] <hoczaj> rspijker: $text wow it is cool and working !
[09:44:08] <hoczaj> rspijker: maybe could you help me with one more thing? When i start my application (node server.js) after the initialization i find this: Failed to load c++ bson extension, using pure JS version. It is working fine, but if I could make this disappear it would be nice.
[09:44:24] <rspijker> thanasisk: that's fairly weird.... What's the command line you're using for the mongod?
[12:45:27] <kali> well, it does preallocate disk space
[12:46:11] <kali> and it will mmap this space. but that is not the same as preallocating physical memory
[12:46:42] <tscanausa> disk space is no problem but I seem to do a large operation, the memory grows then 4 hours after completing the op it still is using 20-200x of ram
[12:47:08] <kali> it's not RAM per se. it's address space
[15:33:23] <herbrandson> I have a question about using composite primary keys in mongodb. specifically around performance.
[15:33:31] <herbrandson> i posted about it on SO here... http://stackoverflow.com/questions/23164417/mongodb-and-composite-primary-keys
[15:34:31] <herbrandson> the unique id for my records is made up of two separate fields. neither one is unique by themselves, but together they will be unique
[15:34:42] <herbrandson> what's the best way to store this?
[15:39:54] <Nodex> 2.6 has some work done for index intersecting
[15:40:06] <Nodex> or another way, using multiple indexes in one uery
[15:49:22] <Nodex> hard to answer without knowing what you're trying to achieve
[15:51:15] <herbrandson> another option is to concatenate them into one field. that option might be easier for "foreign key" type relationships
[15:51:36] <herbrandson> but i'd end up with something like a 256 bit key :)
[15:51:44] <Nodex> you should avoid relationships where possible
[15:51:45] <herbrandson> not sure what implications that might have on perf either
[15:53:30] <herbrandson> hmmmmm. ok, well that raises another question then
[15:54:00] <herbrandson> i have a structure where there is a game that has several hundred plays
[15:54:07] <herbrandson> the game will be edited almost never
[15:54:40] <herbrandson> but the plays will have dozens of edit's per second (for about a week)
[15:55:18] <herbrandson> i'd like to split the "play" documents into their own collection to help ease contention when being edited
[15:55:31] <herbrandson> is this not the correct approach in mongodb?
[15:55:38] <Nodex> the write lock is db wide not collection wide at present
[15:55:38] <cozby> whats best practice for monitoring a replica set...? I have 3 boxes, 1 primary 2 reps - in a production setup how do I monitor all three instance via http console?
[15:55:59] <cozby> do I proxy just the primary web console?
[15:57:27] <Nodex> For some people it's a pain, for others not a pain, it varies app to app
[15:58:13] <Nodex> I notice it every now and again. My app might freeze for 200ms while it's queued
[15:59:03] <Nodex> for anything write burst intensive I just put a cache in the middle (redis) and do all the work in there then move it to Mongodb later
[16:00:05] <herbrandson> ok. that's really good to know
[16:00:06] <herbrandson> i have to say, that might have made me pee my pants just a little :/
[16:00:14] <herbrandson> our app will be very bursty
[16:01:10] <Nodex> generally speaking it's not a problem. A lot of high burst apps use mongodb
[16:04:51] <herbrandson> ok, so there's a global lock when doing writes. so splitting plays into separate documents won't help with contention. what about issues with having to move records on disk as they grow?
[16:05:27] <herbrandson> i guess if everything is just one document, i'd just need to make sure there's plenty of padding for that collection, no?
[16:05:28] <Nodex> you can pad them if you need to
[16:05:39] <herbrandson> i believe that mongo does that automatically?
[16:05:46] <Nodex> but eventually your OS will start paging
[16:06:02] <cheeser> using powerOf2 sizing will help
[16:06:10] <Nodex> a certain amount of padding is done automatically but it's a waste of space for to much
[16:07:33] <herbrandson> ok, this has been REALLY helpful. thanks so much
[16:07:46] <herbrandson> oh, back to the original question...
[16:08:09] <herbrandson> is there a performance hit on inserts for non sequential id's?
[16:09:10] <Nodex> I don't have a clue, I always use ObjectId's
[16:15:34] <thomasreggi> Im trying to query if field "x" doesn't exists or if it does and is false. https://gist.github.com/reggi/11185165 Ideas?
[17:30:31] <rickibalboa> I'm using the node native driver and I want to issue a command which isn't accessible via the api. it's "rs.initiate()", is it possible to do this?
[17:43:46] <Tokenizer> hi, i'm new to mongodb but trying to learn like many by relatating traditional RDBMS type of approach to no-sql object based databases. So imagine if I have a mongo host named "localhost". my connection string is "http://localhost/my_bag". I want to now inside "some_collecion" store objects. But I want to have some soft of orgranization within it. For instance don't dump all objects together
[17:43:46] <Tokenizer> in it in one big bag. I want to be able to have things like db.my_mybag.oranges.find('1') .... (this is the notion of subj collection of types). Where can I find info on this?
[17:48:46] <cheeser> no such thing as sub collections.
[17:52:15] <Tokenizer> so i want to use one mongo server here locally for all dev's
[18:04:16] <Tokenizer> so it all looks like right from the root "db.*" you are dealing with documents..... so let me ask this then. How do you go about using the same mongo server for both staging, and dev
[18:04:37] <Tokenizer> for the same app that puts stuff in let's say a collection name "fruits"
[18:05:03] <Tokenizer> "db.fruits"... or namely "http://myserver/fruits"
[18:26:19] <Tokenizer> thanks for the help that clarified
[18:54:26] <diogogmt> anybody has an example of the yml file config for mongo 2.6?
[18:57:27] <kali> diogogmt: that's not a mongodb thing. it's a mongoose or mongoid or play or whatever you're using. and it's probably the same as 2.4 anyway
[18:59:13] <diogogmt> kali: i’m trying to launch the mongodb deamon, it says on the docs that it accepts a yml file
[18:59:30] <diogogmt> i’m not trying to connect via an app, just to start the db
[19:01:12] <diogogmt> it says excplicitly: “Changed in version 2.6: MongoDB introduces a YAML-based configuration file format. The 2.4 configuration file format remains for backward compatibility."
[19:01:12] <diogogmt> however setting a yml the db fails to starts
[19:02:25] <kali> ha ok, sorry, this is new, I had never heard of it,
[19:02:38] <kali> you get some kind of error message ?
[19:02:47] <Joeskyyy> i didn't know about that either… gonna make ansible even easier to read for deployments haha
[19:27:20] <Acatalepsy> I'm look for some help deciding how to store some records.
[19:30:23] <Acatalepsy> I've got a bunch of (time-sorted) records to filter by. However, some of those records reference other records. When I filter all records and find some record A, I want to also find record B that references record A. The catch is that this is recursive - if there's some record C that references B that references A, I want the query to return A, B,
[19:30:23] <Acatalepsy> and C (sorted by time) whenever my filter conditions match A.
[19:45:21] <Acatalepsy> Since all of this is within one collection I was vaguely hoping that there'd be a way to make it work within a single collection.
[23:13:34] <LucasKA> It was supposed to say: Could someone suggest a mongo data model for this scenario? The use is tracking volunteer hours, I need to track all volunteers and how many hours they volunteered on a given night (shift), but also need to track each shift that a specific volunteer participated in, and be able to access their total hours per month (or any custom date range)
[23:17:07] <redfox_> Not that mongo wouldnt be able to do this, but this sounds like a perfect RDBMS scenario for me.
[23:19:41] <LucasKA> I'm using Meteor, so mongo is already included, I'm not really a backend person so it's already kinda tough for me. I'd like to stick to this, instead of worrying about wiring up another backend.