[02:29:28] <quackslike> looking to run mongo on aws, but doing the numbers the mongo AMI seem to run expensive for my taste
[02:31:31] <quackslike> its seems as though the piops is a large chunk of the cost, wondering if anyone has info to share about minimising the cost by lowering iops and ebs sizes, my requirements are fairly minimal as far as performance and use go.
[02:31:55] <Skaag> can I somehow trigger an action when a document in mongo is updated?
[02:32:12] <quackslike> i know there are other options but i'm currently looking at mongo on aws.
[02:34:05] <quackslike> looks like the minimal cost of the mongo ami per month is about $450 no data xfer inc.
[02:40:37] <Skaag> if you update a few documents once in a while, you can get a super low resources instance
[02:40:47] <quackslike> There are other options besides AWS.. but i'd like to control the infrastructure to some extent.. if you know what i mean.
[02:40:49] <Skaag> I run mongo on an ARM platform with 512mb RAM successfully
[02:41:23] <Skaag> but it isn't doing anything "heavy" by any means
[02:42:10] <quackslike> it's for a service that i'm trying to get off the ground, but i'd need to show that it's "capable" of handling growth if needed.
[02:42:38] <Skaag> to handle growth, you need to automate the creation of instances, and the addition of mongos to a replica set
[02:42:38] <quackslike> its a bit of "show" to some extent.. muscle flexing..
[02:43:31] <Skaag> and there are tricks to make it grow smoothly without affecting service
[02:43:53] <Skaag> my own trick is to use red, orange and green instance
[02:44:02] <Skaag> red is production, and serves queries
[02:44:14] <Skaag> orange is standby, contains a replica, but never serves requests
[02:44:32] <Skaag> when you need another instance, you create a green instance, and you make it replicate from the orange instance
[02:44:33] <quackslike> yeah, the growth wont be much more than i'd need a half decent machine with, but as i say, it's about "showing" that it's deployed on a platform that has the capability and also not controlled by some random paas provider.
[02:44:48] <Skaag> once the green instance finishes replicating, it becomes orange, and the orange becomes red
[02:55:33] <Skaag> but I wouldn't recommend it for any real work
[03:03:29] <Guest84664> joannac: sorry, yes, it looks like from logs, initial clone, build index, catch up oplog, then build index again, then catch up oplog again
[03:03:57] <Guest84664> wondering if the 2nd index build phase is normal
[03:19:33] <quackslike> no, i wouldnt use it for anything real
[03:19:54] <quackslike> i think i'll just use a hosted mongodb instead of dicking around
[03:20:22] <quackslike> the app server will live in aws so i'll pick a mongo provider that plays well with aws
[03:22:46] <Guest84664> quackslike: mongohq is pretty good, they are 2ms to aws as well
[03:43:03] <quackslike> Guest84664: thanks i intend to check them out
[03:46:43] <joannac> Guest84664: I can't reproduce that. I see different indexes being built but not the same index being built multiple times
[03:48:05] <Guest84664> joannac: sorry, it was my mistake, i realized later it was a different index. it was surprising to me though that it would build some indexes, catch up the oplog, then build other indexes - do you happen to have a pointer to some documentation that explains the process in more detail?
[03:48:52] <Guest84664> joannac: these were indexes for the same collection, it built some 2 indexes for it, then did some oplog syncing, then built another index
[03:53:50] <Skaag> ok looks like what I need is tailable cursors
[03:54:09] <Skaag> found this interesting writeup about it: http://shtylman.com/post/the-tail-of-mongodb/
[03:55:37] <Guest84664> Skaag: also check out this: https://cloudup.com/blog/introducing-mydb using similar concepts
[03:57:18] <joannac> Guest84664: well, i only spun up a small test. But I have the index local.replset.minvalid { _id: 1 }, which can only be built once we have finished oplog sync
[03:57:54] <Guest84664> joannac: thanks for looking into it, apologies for the goose chase
[03:57:59] <joannac> Guest84664: Whereas indexes for user collections need to be created as soon as we start cloning data
[03:59:56] <Guest84664> joannac: my logs show, clone first, some indexes built, some op log syncing, then more indexes built. it eventually completed so i think everything is working as it should, I had just thought that all indexes would be built before it tried to catch up on the oplog
[14:17:57] <ron> I may have an opportunity for a part time job that would allow me to work on the project I talked with you about.. that would be cool.
[14:18:58] <remonvv> It would. Is that an "I can say yes if I want it" sort of deal or still in the process?
[14:19:33] <ron> we need to discuss payment and how much 'part time' is.
[14:20:18] <remonvv> Ah, a relatively vital part of the discussion ;)
[14:20:37] <ron> yes, but the 'fit the job' part is behind us.
[14:44:05] <Nodex> you dont need to create an array
[14:45:04] <tiller> I know I could just leave it "unexistant" but it won't stay empty for long, so I thought it would be "better" to create it directly
[16:50:55] <starefossen> dnsdds: looks like you should have used a Geospatial Indexe and Query: http://docs.mongodb.org/manual/applications/geospatial-indexes/
[16:51:50] <starefossen> dnsdds: and then used a $geoWithin query: http://docs.mongodb.org/manual/reference/operator/query/geoWithin/#op._S_geoWithin
[16:52:24] <dnsdds> starefossen: Hmm... looks good, but that'd require rather a lot of rewriting on a framework core that I didn't develop... shouldn't $gt and $lt work on floats just the same?
[17:19:08] <dnsdds> starefossen: Alright, works perfectly on CLI. So probably some bug in the framework. Sorry for wasting your time and thanks for the suggestion :)
[19:04:27] <sikor_sxe> hello, i have the weird problem that on certain numbers the Array.sum calculation results in rounding errors: [0.8, 1.1] results in 1.9000000000000001 :/
[19:04:44] <sikor_sxe> anyone has an idea why this occurs?
[19:05:00] <kali> that's just floating number being floating numbers
[21:09:09] <michael_mbp> the document metadata for files stored in GridFS were trashed by mistake!
[23:39:54] <mst1228> Can someone assist me with some general data structuring? I'm not sure if I want a single collection for what I'm doing with lots of nested docs or if I should seperate them all to individual collections
[23:40:33] <mst1228> I'm building a little site for our office internally, we play a lot of ping-pong and foosball and general office games
[23:41:07] <mst1228> I want to do some kind of league/season/tournament management
[23:42:48] <mst1228> struggling with deciding if a league is a single collection that holds all the players/teams/matches or if I should separate those sub categories into their own collections and just refeference them from a league doc