[00:30:38] <rnickb> if you're using the ScopedDbConnection class for the c++ api, is the connection pool managed automatically for you?
[00:51:56] <platzhirsch> Is there something like a auto-update mechanism for references in MongoDB? My data has references from one document to another, if the latter document gets removed the reference is kept pointing to null. Do I have to clean this up myself or does MongoDB provide something?
[00:52:50] <tychoish> you/your application has to clean up stale references on its own.
[02:14:12] <marekweb> I'm struggling to understand what to do in mongo in situations where I'd use transactions in sql. suppose in a facebook game I want to let users send coins to one another. How is this done without transactions?
[02:37:09] <marekweb> That page mentions this: "for many use cases, this is sufficient – for example many users have built e-commerce systems using MongoDB."
[02:45:39] <kali> marekweb: you can use the tension pattern like this: http://cookbook.mongodb.org/patterns/perform-two-phase-commits/
[02:47:39] <kali> marekweb: it's a bit cumbersome... it's fine if you don't have too many cases, but at some point, if your app requires a lot of transactions, implementing them will tip the balance in favour of SQL
[02:51:41] <marekweb> kali: I see, interesting. In a facebook game there might be a lot of item trading and potential race conditions, maybe mongodb is a bad idea for this
[05:19:56] <ghargoil> Hi all; I can't seem to import the bson module with pymongo -- I mean, it doesn't have p3compat or the son sub-libraries :(
[05:22:15] <ghargoil> nevermind! I had an alt bson library installed
[07:49:08] <dbler_> is there a possibility to prevent redundancy in mongodb?
[07:49:49] <dbler_> it is as in the product catalog example
[07:50:20] <dbler_> i have many attributes, but each product has just some of them, but the possible values of the attributes are the same everywhere, any possibility to put the values in another document and just link them?
[11:54:56] <Bilge> I hope to one day achieve such fame
[17:29:22] <vsmatck> I'm trying to get the current number of documents in a collection in the most efficient way possible (to do pagination). I'm using the "collStats" command now but it won't let me use a field selector to isolate only what I want (which is the "count" field).
[17:31:48] <vsmatck> It does sent OP_QUERY with selector so it seems like it should work.
[17:33:39] <vsmatck> oh!! I missed the "count" command. NVM.
[20:32:56] <vsmatck> Owe, pagination using skip is slow. How do people usually deal with pagination over collection? I'm trying to think if there's a way to do it with ranges using some sort of schema.
[20:33:31] <skot> range based pagination over an index is best.
[20:35:49] <vsmatck> My specific use is I have "topics" sorted DESC by last modified time. Very typical forum setup. The hot part of the data is the newest stuff which works out nicely, but every once and a while a user will want to visit page 6,789.
[20:36:37] <vsmatck> I'm thinking of grouping my documents in to pages and using $inc on a counter to get page numbers which I'd index. But that sounds very hairy.
[20:37:18] <vsmatck> Err.. but wait that won't work.
[20:37:28] <vsmatck> Because stuff on pages changes according to what is modified last.
[20:47:36] <vsmatck> I'm thinking of having a process poll the collection to gather data on what last modified times are close to what pages.
[20:48:31] <vsmatck> Pretty vague idea. Haven't fully thought it out.
[20:51:35] <vsmatck> I've seen some webpages (like hackernews) that do some sort of time aware pagination.
[20:52:05] <vsmatck> Other webpages (like 4chan) don't do it. So you get this effect where you click on page 2, and a bunch of stuff from page 1 is on the top of page 2.
[22:20:25] <vsmatck> Seems like the answer is that mongo doesn't efficiently support pagination across very large collections. I may give up on the idea of true pagination and only do a "next" button that holds where things left off as a GET parameter.
[22:22:02] <vsmatck> I suppose if you shard a collection then pagination can't really work either.