PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Sunday the 30th of December, 2012

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[00:23:18] <yakubori> are the mongodb oid values eligible for access via a url route? e.g. example.com/view/oid
[00:24:10] <yakubori> or is it too easy to simply guess other oids based on another, creating an access risk with that approach?
[00:24:58] <yakubori> it'd be ideal if you could, for example, manage a user with example.com/user/oid
[00:30:58] <yakubori> err perhaps not ideal, but cheap and easy :P
[00:35:50] <yakubori> hmm seems too weak. machine id + pid + time...
[01:00:33] <javagoogles> Hi, I have a question about installing the nodejs driver for mongodb on os x
[01:02:10] <javagoogles> "child process exited with code 127 execvp(): No such file or directory"
[01:02:14] <javagoogles> when i run "npm install mongodb" it gives me the error ^
[01:14:55] <javagoogles> is there another place where i should ask this question?
[01:45:43] <j_ayen_green> In a situation such as a dictionary, where the obvious choice of id would be the word itself, but it can have several entries, so is not unique, what would make sense as an id?
[01:46:06] <yakubori> is that the only error line you see, javagoogles?
[01:47:03] <yakubori> j_ayen_green: beyond the oid mongodb uses?
[01:48:28] <j_ayen_green> yakubori: no, exactly, a value for _id. For example, if I were going to have "wind" as a noun, and "wind" as a verb, I would need 2 entries, so the _id could not have a value of "wind"
[01:49:03] <yakubori> and you can't use the mongo oid?
[01:50:28] <yakubori> i ask because you could do something like: insert({ word: wind, type: noun}); and insert({word:wind, type:verb}); and they'd each have different oids
[01:50:47] <j_ayen_green> yakubori: I'm missing your meaning in my ignorance. Do you mean I can insert without providing an _id value?
[01:50:54] <yakubori> ua
[01:50:56] <yakubori> *ya
[01:51:01] <j_ayen_green> ah :)
[01:51:07] <yakubori> mongo oids wile be created if you don't provide one
[01:51:08] <j_ayen_green> perfect. thanks so much
[01:51:11] <yakubori> np
[01:51:25] <yakubori> give it a shot on the command line, you'll see what i am talking about
[01:52:18] <yakubori> or even the 'Try It Out' section on the mongodb website. there's a cool browser based "cli" :)
[01:54:04] <yakubori> javagoogles: check this out -> https://github.com/mongodb/node-mongodb-native/issues/726
[01:54:24] <yakubori> someone had a similar problem a few months ago, apparently
[02:01:44] <javagoogles> yakubori: thanks for that - i saw that before but everything is a fresh installation
[02:02:12] <javagoogles> yakubori: i'm able to install other npm modules fine
[02:57:51] <dangayle> Why does 2to3 tell me to fix this? - print(view(model(), 'template')) + print((view(model(), 'template')))
[02:58:02] <dangayle> whoops, wrong channel
[10:35:06] <kkspy> Is Mongodb still buggy when the dataset is larger than available memory?
[10:35:57] <kali> it's not buggy
[10:36:04] <kali> but it may be slower
[10:36:43] <kali> and even slower when the indexes does not fit
[10:37:07] <kali> but i'm using it in production with a dataset way bigger than memory
[11:40:32] <kkspy> kali: thank you
[11:40:44] <kkspy> kali: older versions were crashing
[11:40:55] <kali> what ? how old ?
[11:41:07] <kkspy> 1.x
[11:41:24] <kali> i don't think so
[11:41:34] <kali> it was probably something else
[11:42:18] <kali> i think i have had this database running this way since 1.0
[11:42:42] <kali> septembre 2009
[14:45:52] <salentinux> hi guys, I'm learnign mongo but till now I'm not able to get all subdocuments in an array that match a query. is it possible?
[14:48:59] <kali> salentinux: queries returns documents, not subdocuments. the aggregation framework may help reformats / refilter a selection of documents
[14:56:21] <salentinux> thank you kali. I'm trying to solve the counter problem. Two collections A and B with a 1 to many relationship and a counter of B's in each records/docuemnt of A. This way counting cannot be atomic. The approach of counting with Bs embedded in A can be atomic but I'm not able to retrieve the subdocuments As that match query. Which is the way to go with mongo with that problem?
[14:57:19] <salentinux> I'd like to counting atomically and also search for B's
[14:58:07] <kali> if you want atomicity, you need to embed
[14:59:51] <kali> searching for Bs, you'll find the parent A, but you can manipulate the A result application side or with the aggregation framework to get the Bs you want
[15:00:11] <kali> if you embed many Bs, this could become inneficient...
[15:02:55] <salentinux> Yes i read about that...so if I choose the 2 collections approach I have to use application lock to ensure atomicity? or is there another way to go?
[15:41:08] <kali> salentinux: not really... but lock are not good. i don't know what your app is, but you may want to reconsider the atomicity requirement at some point
[16:37:26] <bmcgee> hey guys, got a quick question about updates
[16:38:17] <bmcgee> I'm using an optimistic locking pattern whereby on updated i add the current version of the doc to the query I'm using. If the version doesn't match, the update doesn't happen. How do I detect failure though?
[16:38:58] <bmcgee> i.e. how do i detect if the update had an effect or not
[16:40:54] <salentinux> kali: my app is not uncommon, its pretty like post and comments patterns and I want to count comments in a reliable way and also find all comments that match a query not just one like $elemMatch does.
[16:56:17] <kali> salentinux: not being atomic does not imply bein unreliable
[16:57:04] <kali> salentinux: i would think that the consequence of displaying a wrong count once in a very long while are acceptable
[16:58:03] <kali> bmcgee: you need to use findandmodify
[17:00:22] <kali> salentinux: and if you go the embedded way, what's the problem with ĂȘlemMatch ?
[17:00:27] <kali> $elemMatch
[17:00:51] <salentinux> that you get only 1 element not all the subdocuments that match
[17:02:13] <bmcgee> kali: thx
[17:03:48] <kali> salentinux: with the aggregation framework, you can $unwind the comments and find the right ones
[17:12:01] <salentinux> kali, i' m going to implement both solution and stress them with large number as well as with sharding enabled. Thank you for support
[17:15:17] <kali> salentinux: sounds... overkill for a blog :)
[17:18:33] <salentinux> kali: it's not a blog but the pattern is the same and I use it for many models;
[17:20:23] <kali> ok. keep something in mind, then... the static description of the model (how it would be stored in SQL) is usually not enough to choose the right modeling in mongodb
[17:21:15] <kali> salentinux: you need to include the dynamic of if (that is, how the data will be queried, what queries are predominant) to choose right
[17:22:12] <kali> salentinux: if this dynamic change from one model to another, you'll probably need to adjust the model accordingly: that could mean embedding in some cases, or two collections for some others
[17:42:31] <E1ven> Does anyone have any experience, or are there any writeups of single-machine sharding setups that people have widely used?
[17:55:33] <wereHamster> E1ven: it doens't make sense to shard if you have a single machine
[17:55:53] <E1ven> It does if you need more than 2GB on a 32bit machine.
[17:58:33] <kali> 32bit usage is discouraged for production, so don't count too much on it
[17:58:59] <E1ven> I know, but I have a use-case where I need it, so I'm trying to figure out the best method.
[17:59:39] <E1ven> Best I can think of right now is sharding across several DBs on a single system. Not ideal, but it may work.
[21:06:17] <MacWinner> if you are starting a project from scratch, is there any reason to use a regular SQL database anymore? I'm just trying to figure out if MongoDB is right for me.. just a simple pet project
[21:07:05] <ron> yes, if you need to store data in a relational form.
[21:10:07] <MacWinner> I feel like most data is in a relational form.. I think i have some preconceived notion about it.. like what would be example of data that is not relational?
[21:14:30] <LesTR> blah, one big reason are transactions
[21:15:52] <MacWinner> ahh.. oh