PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Sunday the 28th of September, 2014

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[12:53:55] <Mick27> howdy folks
[12:54:15] <Mick27> is there a way to get the http interface to return a 200 when master and something else when not ?
[14:14:01] <iksik> guys https://gist.github.com/krzysztofantczak/553a489499f12ce05352 - if my collection schemes are looking like this, what would be the best approach to list ie. 10 movies with marked 'isFavourite':true/false for particular user?
[14:16:01] <iksik> in other words i need to find out if each movie exists in user.favourites array hm
[14:18:54] <salty-horse> hey. it's possible to set up a sharded database where each shard is a replica set, right? top paragraph at the top of this page just doesn't mention it? http://docs.mongodb.org/manual/tutorial/convert-sharded-cluster-to-replica-set/
[14:25:37] <cheeser> yes, it is.
[14:26:15] <salty-horse> is it the same as having a replica set, where each replica is sharded?
[14:30:19] <cheeser> more or less
[16:14:15] <aliasc> what happens and what to do when power goes off unexpecdetly
[16:54:02] <kali> aliasc: bad things. you can loose up to a minute write ops
[18:09:40] <BadCodSmell> I'm using mongodb in node.js
[18:09:49] <BadCodSmell> And I want to handle retries, bufferring, etc myself
[18:10:02] <BadCodSmell> As the documentation is inadequate for me to rely on these features.
[18:10:04] <BadCodSmell> However...
[18:10:13] <BadCodSmell> There is no disconnect event
[18:10:26] <BadCodSmell> That I can find
[18:11:41] <BadCodSmell> Every single example is open, issue command, close.
[18:12:09] <BadCodSmell> There is no example for maintaining a reliable persistent link without memory leaks, uninterrupted (hung) flow control with callbacks, etc
[18:12:19] <BadCodSmell> The thing is much more easier to use and reliable in PHP than in Js
[18:13:47] <BadCodSmell> neutered by poor documentation :(
[18:32:59] <ckwalsh> Asked a question in #mongoosejs and looks like nobody is there at the moment. OK to ask here?
[18:40:26] <aliasc> well everyone's sleeping
[19:02:05] <BadCodSmell> Error: Cannot find module 'bson'
[19:02:19] <BadCodSmell> bug, mongodb npm package does not pull in dependencies
[19:17:04] <aliasc> which driver are you using
[19:17:07] <aliasc> mongoose or mongojs ?
[19:17:36] <aliasc> im working with node and mongodb using mongojs driver
[19:25:43] <BadCodSmell> I'm using mongojs
[19:25:56] <BadCodSmell> mongoose will make an already severe problem worse.
[19:26:39] <BadCodSmell> mongodb*
[19:26:52] <BadCodSmell> The low level driver needs a lot more work on the documentation
[19:27:29] <BadCodSmell> Interestingly it's also not parallel.
[19:27:47] <BadCodSmell> I would expect that from mysql but less from mongo.
[20:45:12] <ttxtt> when I create a new document, I can specify an '_id' string. However I don't see a way to do that when uploading a GridFS file. (1) is there a design or technical reason for this inconsistency? (2) is it usually considered better practice to let mongo create _ids for all documents? (I'm making my own for consistent serialization/deserialization of the data)
[20:59:07] <mjuszczak> MongoDB deals only in BSON and the conversion to JSON is done by the client libraries, correct?
[21:00:24] <kali> mjuszczak: yes (or mongoexport)
[21:00:45] <kali> mjuszczak: or the "rest interface"
[21:00:46] <mjuszczak> kali: So if you're just trying to deal with BSON any way, is there a way to skip the JSON conversion?
[21:01:50] <kali> mjuszczak: it depends on the language client, but there is no automatic conversion from/to json
[21:02:12] <mjuszczak> inside Mongo you mean
[21:02:39] <kali> mjuszczak: neither inside mongo, neither at the mongo client interface with your code
[21:03:03] <mjuszczak> OK.
[21:04:07] <mjuszczak> So I would have to find a client libraries that supported skipping the JSON conversion and/or strip that code out myself
[21:04:19] <kali> mjuszczak: what client are you using ?
[21:04:25] <mjuszczak> PHP
[21:04:55] <kali> i'm pretty sure there is no json conversion in the client
[21:05:29] <kali> bson is mapped to php arrays and associative arrays
[21:06:09] <mjuszczak> But when you use the mongo client from say, a Linux command line, that's converting to JSON
[21:07:34] <kali> it's actually mapped to Javascript rather than strict json, because the command line is actually a js client
[21:25:02] <mjuszczak> kali: Gotcha, thank you!