PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Saturday the 23rd of July, 2016

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[04:20:17] <kenalex> hello
[09:26:46] <obiwahn> any advice on building the c++ driver?
[09:30:46] <Kralian> I haven't "hand built" stuff in years ..
[09:31:02] <Kralian> so used to always have a packaging system to do the work for me
[09:38:10] <obiwahn> but i have a debain satble server and would like to use a recent mongodb
[09:38:21] <Kralian> oh
[09:38:28] <obiwahn> there is no libbson in stable
[09:39:20] <obiwahn> and somehow the driver expects a camke file that helps finding the location of bson on the server
[09:40:12] <obiwahn> i have installe bson in usr/local
[09:40:24] <obiwahn> and pkg-config is available as well
[09:40:47] <Kralian> hmm
[09:41:12] <Kralian> it's gonna take me some hours, because my "test debian" .. kinda ehm.. got fucked up .. by me ;)
[09:41:23] <Kralian> but later today I might have something serious to say
[09:42:09] <obiwahn> mh i think ill look in the mongodb code and see how they include it with cmake there
[09:44:00] <obiwahn> waah build hell Scons:P
[10:02:13] <obiwahn> set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/")
[10:02:18] <obiwahn> fail
[10:02:36] <obiwahn> https://github.com/mongodb/libbson/blob/r1.3/CMakeLists.txt#L14
[10:03:09] <obiwahn> should be CMAKE_CURRENT_SOURCE_DIR
[10:04:12] <obiwahn> that way the driver could be included in another project and the modules would still get added. like this it would look (if included) in the parents source dir.
[10:05:49] <obiwahn> -- Found LIBBSON: TRUE :P
[18:18:24] <Trinity> hi, i'm using Node.Js with it's MongoDB driver and I was curious to what Server.poolSize means
[18:18:32] <Trinity> the documentation states, Number of connections in the connection pool for each server instance, set to 5 as default for legacy reasons
[18:19:02] <Trinity> but from what I understand about Node.js it is single threaded and thus wouldn't that mean only one connection can be used at a time?
[18:19:26] <Trinity> but i'm thinking that because calls are asynchronous they are used temporarily until filled?
[18:19:35] <Trinity> fulfilled*
[18:20:41] <starseed> mongo caches connections that you've already opened as opening new ones is expensive
[18:20:55] <starseed> so where possible it reuses connections
[18:21:12] <starseed> if you have an application that opens a lot of connections, a small pool will result in high churn
[18:21:23] <starseed> which will adversely affect performance
[18:22:03] <Trinity> right, I understand that but i'm not understanding when those connections are used
[18:22:23] <Trinity> for example your typical web application, a request comes in -> a mongoDB lookup is performed
[18:22:44] <Trinity> per the doc, mongoDB would have a default poolSize of 5
[18:22:44] <starseed> any time you open a cursor against a mongod there will be a connection used
[18:22:58] <Trinity> ah, I see. Thanks!
[18:23:33] <Trinity> starseed, wait, but can't node/express only handle one request at a time?
[18:23:48] <Trinity> and i'm currently only using cursors in my routes
[18:23:50] <starseed> I know nothing about node
[18:23:56] <starseed> couldn't really advise you there
[18:24:02] <Trinity> alright, thanks for the help starseed
[18:24:59] <starseed> I'm looking for a way to get information about a cursor, using either pymongo or querying the mongo shell directly
[18:25:16] <Trinity> starseed, how would nested cursor lookups work? Would they be counted as two connections or one connection?
[18:25:39] <Trinity> i.e if I have a max poolSize of 5 and I have more than 5 nested cursors would that mean the pool will run out?
[18:26:36] <starseed> Sorry, don't know the answer to that
[18:26:51] <starseed> the application I deal with at work typically has several thousand connections open and has a huge pool
[18:28:37] <starseed> Trinity this may be relevant to you: http://blog.mlab.com/2013/11/deep-dive-into-connection-pooling/
[18:29:00] <starseed> 'The syntax for using MongoClient is slightly different here than with other drivers given Node’s single-threaded nature, but the concept is the same. You only want to call ‘connect’ once during your apps initialization phase vs. on each database request.'
[18:31:41] <starseed> I'm looking for a way to get information about a cursor, using either pymongo or querying the mongo shell directly. I don't really need specific information about the cursor - I essentially need to be able to ask mongo "does this cursor ID exist?" and get a True/False answer. Any ideas?
[18:32:42] <starseed> All the methods I have found assume you are doing something like db.collection.find().hasNext...but I need to ask it about a specific cursorID and won't know what opened it
[18:36:27] <pr0gi> I am trying to store RAW sensor data from an iphone app to a mongoDB for further analysis. Does it make sense to store the data as JSON and encode it as base64 to store as binary? Or what would be best practise