PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Sunday the 17th of May, 2015

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[01:02:59] <louie_louiie> hey guys quick question, how do you mongoexport on an aws EC.micro server
[01:03:07] <louie_louiie> the mongoexport command doesnt work...
[01:08:30] <Boomtime> louie_louiie: what do you mean the mongoexport command doesn't work? mongoexport is a binary contained in the mongodb-org-tools package
[01:11:36] <louie_louiie> i think my bin path is wrong
[01:12:18] <louie_louiie> the bash command for 'mongoexport' cannot be found, however the command 'mongo' is found
[01:12:37] <Boomtime> what packages did you install?
[01:12:55] <Boomtime> for reference here is the ubuntu package names: http://docs.mongodb.org/manual/tutorial/install-mongodb-on-ubuntu/#packages
[01:16:41] <StephenLynx> GothAlice you know anyway to detect the last time a file was modified on gridfs besides unlinking it and rewriting?
[01:18:29] <louie_louiie> sweet!
[01:18:40] <louie_louiie> that worked... Thanks!
[01:19:31] <louie_louiie> so what happened was i installed node/mongodb using the proctocls found here:
[01:22:23] <louie_louiie> http://github.com/SIB-Colombia/dataportal-explorer/wiki/How-to-install-node-and-mongodb-on-Amazon-EC2
[01:22:40] <louie_louiie> however the command used is sudo yum -y install mongo-10gen-server mongodb-org-shell
[01:22:57] <louie_louiie> this does not include the mongo-tools module like you said
[01:23:22] <louie_louiie> so i had to install sudo yum -y install mongodb-org-tools
[01:23:41] <louie_louiie> greatly apprecate the help man
[01:29:52] <StephenLynx> I recommend using mongodb official instructions.
[01:30:15] <StephenLynx> http://docs.mongodb.org/manual/tutorial/install-mongodb-on-red-hat/
[02:37:21] <styles> I'm running mongodb locally on Archlinux (the offical package in pacman), but I don't see mongoimport or mongoexport
[02:51:08] <cheeser> not in the bin dir at all?
[03:02:51] <styles> cheeser, nope
[03:03:14] <cheeser> weird
[03:03:24] <styles> only see mongo, mongod, mongopref, mongos, mongosniff
[03:03:33] <styles> MongoDB shell version: 3.0.3
[03:04:57] <styles> https://www.archlinux.org/packages/community/x86_64/mongodb/
[03:04:59] <styles> there's the package
[03:05:03] <styles> greattt
[03:06:23] <Boomtime> you need this: https://www.archlinux.org/packages/community/x86_64/mongodb-tools/
[03:06:57] <styles> crap
[03:06:58] <styles> derp
[03:07:06] <cheeser> :D
[04:04:32] <sabrehagen> hey guys, i'm having trouble connecting to my mongodb 3 instance. my config file has auth=true and bind_ip=0.0.0.0 on default port (27017). i can connect via the mongo shell on the box and auth to my database using db.auth() but using the same credentials in robomongo i can't why might this be? http://i.imgur.com/1ktF419.png
[04:15:31] <Boomtime> @sabrehagen: default auth method in 3.0 uses scram-sha1
[04:15:32] <Boomtime> https://github.com/paralect/robomongo/issues/766
[04:48:37] <sabrehagen> Boomtime: thanks, much appreciated
[10:26:45] <donCams> so I'm doing a real-time analytics app. I created a sort of tracking pixel. wondering if I should insert each event to mongodb and just listen to the oplog for the real-time visualization or separately listen to the event for the real-time visualization?
[13:32:32] <l403> /part
[15:18:03] <jamiel> Is initial sync for a replica set member really a blocking operation?
[16:23:05] <loadh> hello
[16:23:17] <loadh> is it possible / wise to do the following:
[16:23:54] <loadh> if i persist in Mongo information about shops e.g. opening / closing time / days
[16:24:19] <loadh> these times / dates would include their GMT offset
[16:24:41] <loadh> what i'd like is to return a Google like 'open now' 'closed' string
[16:26:51] <StephenLynx> hm
[16:26:57] <StephenLynx> is not wise.
[16:27:02] <loadh> ok :)
[16:27:13] <StephenLynx> its better to perform that on the front-end.
[16:27:19] <loadh> but why?
[16:27:25] <loadh> Google perform it server side
[16:27:39] <loadh> and performing it client side is a burden on the client
[16:27:41] <StephenLynx> yeah, but do they use mongo?
[16:27:53] <StephenLynx> and is much less of a burden on the client than you think.
[16:27:54] <loadh> not sure, i guess not
[16:28:02] <StephenLynx> the client has to do it for a single client
[16:28:07] <StephenLynx> a server has to do it for all clients.
[16:28:13] <loadh> good point
[16:28:37] <StephenLynx> I remember trying something similar, regular projection couldn't do it.
[16:28:50] <StephenLynx> I ended up using pre-aggregation, which is not possible in your case.
[16:28:52] <loadh> regular projection?
[16:29:08] <StephenLynx> yeah, like find(query, projection, callback)
[16:29:09] <loadh> the client in this case is an App
[16:29:18] <loadh> the server is NodeJs
[16:29:29] <StephenLynx> even better, because it probably runs on native(ish) code.
[16:29:31] <loadh> I have control of both
[16:29:47] <loadh> the problem is, these shops are in different time zones..and so are the clients
[16:29:53] <StephenLynx> no problem
[16:30:20] <StephenLynx> you just can't save the store time on their local time.
[16:30:24] <loadh> so a client might have a device in the shop's time zone but the device is still in another time zone (if they traveled to tht country say)
[16:30:25] <StephenLynx> you save it on UTC time.
[16:30:33] <StephenLynx> and inform this date in UTC
[16:30:42] <StephenLynx> the client converts to his local time and compares
[16:31:36] <loadh> hmm!
[16:33:44] <loadh> yeah but if the client's time is wrong, ..if they travel for example...
[16:34:01] <loadh> whereas if i compute it server side, the the "is open" or "is closed" string will always be correct
[16:34:08] <StephenLynx> them they will figure its wrong because their clock is wrong.
[16:34:15] <loadh> regardless of the client's time
[16:34:32] <StephenLynx> well, you could do that, but at a cost of increasing server load.
[16:35:41] <StephenLynx> and not only server load, but CPU load.
[16:35:51] <StephenLynx> which is the aquiles heel of node/io.
[16:36:02] <StephenLynx> achilles*
[16:36:55] <StephenLynx> I don't know if this increase would be significant, though.
[16:37:12] <StephenLynx> but it would be an increase in CPU load, that is for sure.
[16:39:03] <loadh> you're right!
[16:39:18] <loadh> thank you :)
[17:22:27] <johnnyrs> Hi. Quick question that I'm hoping you can answer: what is a driver for MongoDB in laymen's terms. I know each language can have one to many different drivers for MongoDB, but I'm not sure what exactly they do. Thanks for your help!
[17:23:39] <StephenLynx> they perform the low level operations on the database by providing a high-level interface.
[17:24:14] <StephenLynx> among other things. the node.js driver gives you a connection bool by default, for example
[17:24:25] <johnnyrs> Like, CRUD actions?
[17:24:41] <StephenLynx> they also resolve dbrefs and perform the multiple queries needed to obtain the correct results.
[17:24:50] <StephenLynx> the whole database interface.
[17:25:06] <StephenLynx> every single functionality implemented.
[17:25:41] <johnnyrs> Ok, thanks for your help. I get it!
[17:25:55] <StephenLynx> its no different than hardware drivers for your OS.
[17:26:25] <StephenLynx> it implements a high-level standard interface for that kind of hardware so other applications can easily interact with the hardware.
[17:27:09] <johnnyrs> Perfect. thanks again.
[17:56:13] <jamiel> For a DB 60 million rows, where users can do many filtered queries, recommended hardware be 16GB RAM + ?
[17:56:29] <jamiel> Index size is currently 20GB :S
[17:57:35] <jamiel> s/rows/documents/
[20:05:41] <jamiel> The documentation for index intersection states "involves two indexes; however, MongoDB can employ multiple/nested index intersections to resolve a query." but it doesn't elaborate on the performance implications or how that relates to sorting. If I'm querying on 5 fields and sorting on one, if I have all 6 fields indexed individually will MongoDB 3.0 be
[20:05:41] <jamiel> smart enough to plan correctly and use all indexes in groups of two? Or is index intersection purely for queries of 2 fields and we should use compound indexes for the rest?
[20:08:21] <Derick> in general, use compound indexes when you can
[20:46:37] <skullcrasher> how do I track schema changes properly? Is it possible with mongodb itself or do I depend on other tools (using nodejs here)
[20:46:58] <skullcrasher> sry, if I'm asking totally wrong in here
[21:07:58] <girb1> moveChunk directory consuming huge space on a sharded cluster is it safe to remove the directory ?
[22:11:37] <nodeNoob> Hi
[22:11:42] <nodeNoob> Is there anyone familiar with mongoose?
[22:12:07] <nodeNoob> I am trying to use bluebird promises to map findOne() to console.log everything at once
[22:12:45] <nodeNoob> http://pastebin.com/ggkLwRix
[22:18:02] <StephenLynx> I am familiar enough to know it is buggy and cripples performance an I never hesitate to tell people its should be avoided at all costs.
[22:18:17] <StephenLynx> nodeNoob
[22:18:57] <StephenLynx> I saw a benchmark where the node.js driver performed 600% faster
[22:20:24] <StephenLynx> I would also advice against promises until they don't have a crippling performance and are on ES6.
[22:25:28] <nodeNoob> StephenLynx: interesting
[22:25:34] <nodeNoob> StephenLynx: what about callback hell
[22:25:41] <StephenLynx> what about it?
[22:25:46] <nodeNoob> How do you deal with it
[22:25:51] <StephenLynx> I don't nest callbacks.
[22:26:23] <nodeNoob> What if you wanted to get all the users and for each user find their pet
[22:26:37] <StephenLynx> you call a separate function inside the callback.
[22:26:45] <StephenLynx> sec, I will link some code of mine
[22:26:52] <nodeNoob> Coolio
[22:27:30] <StephenLynx> https://gitlab.com/mrseth/LynxChan/blob/master/src/be/boot.js#L159
[22:27:58] <StephenLynx> notice that inside the callback I do nothing but check simple conditions and in each condition I just write a single line of code.
[22:28:20] <StephenLynx> I nest a second if there, small slip
[22:28:38] <StephenLynx> will fix now
[22:28:40] <nodeNoob> i'm too baked to understand it
[22:28:45] <nodeNoob> bookmarking for tomorrow
[22:28:46] <StephenLynx> lol
[22:28:49] <nodeNoob> Should be interesting thanks
[22:28:50] <nodeNoob> :D
[22:29:01] <StephenLynx> do you got the felix style guide?
[22:29:08] <nodeNoob> Nope
[22:29:21] <StephenLynx> https://github.com/felixge/node-style-guide
[22:30:22] <nodeNoob> "Use 2 spaces for indenting your code and swear an oath to never mix tabs and spaces - a special kind of hell is awaiting you otherwise."
[22:30:31] <nodeNoob> I'm curious what sort of hell
[22:31:32] <nodeNoob> The author's writing is pretty good
[22:31:38] <nodeNoob> Thanks for the link StephenLynx
[22:34:09] <StephenLynx> np
[22:35:12] <StephenLynx> I personally just use nodeclipse to auto format my code.
[23:04:27] <nodeNoob> StephenLynx: please don't stop with giving me golden nuggets to chew on :D
[23:04:43] <StephenLynx> uh
[23:04:48] <StephenLynx> don't use any web framework ever.
[23:04:53] <StephenLynx> they are all garbage.
[23:05:43] <StephenLynx> keep your dependencies to a minimum, I personally just use dependencies to handle with protocols. like db drivers, email, DOM, websockets
[23:06:23] <nodeNoob> No express?
[23:06:27] <nodeNoob> :(
[23:06:30] <StephenLynx> especially express.
[23:06:48] <nodeNoob> But... that's what i've always used for the past 2 months
[23:06:53] <StephenLynx> I saw a benchmark where it ate around 20% performance.
[23:07:04] <StephenLynx> express is a hellspawn
[23:07:13] <nodeNoob> Haha
[23:07:17] <StephenLynx> completely changes the workflow and mechanics for no good reason
[23:07:35] <nodeNoob> I will try to do it basic on my next project.
[23:07:54] <nodeNoob> Dunno if i'm going to need a web system though
[23:08:03] <nodeNoob> I'm supposed to do an erlang application
[23:08:13] <StephenLynx> write the best documentation possible for stuff that is meant for external interaction.
[23:08:33] <nodeNoob> I can understand why
[23:08:46] <StephenLynx> also document db schemas.
[23:09:06] <nodeNoob> part of my node.js ride so far had that as one of the issues
[23:09:29] <StephenLynx> don't hesitate to put load on the client. keep in mind the client handles code for a single user, the server for all users.
[23:09:42] <nodeNoob> Here's what i don't get. Why am i using mongodb and not an SQL dmbs
[23:09:46] <nodeNoob> dbms*
[23:09:54] <StephenLynx> i dunno.
[23:09:59] <StephenLynx> why?
[23:10:12] <StephenLynx> mongo is not a one-size-fits-all
[23:10:28] <StephenLynx> and you can screw up big time doing a wrong pick regarding databases.
[23:10:46] <StephenLynx> is not like runtime environments where you will just lose some performance most of the time.
[23:10:57] <StephenLynx> in the end is just a http machine.
[23:11:31] <nodeNoob> I basically need to record users (drivers, fleetmanagers), jobs, truck states and truckdata of each truck every 300ms (speed, location). The app is supposed to be used as live monitoring, job assigning, HQ-Truck chat and notifications, and report generating (average fuel consumption)
[23:11:34] <StephenLynx> not with databases. there are multiple scenarios where each type of database might suit you better of completely screw you.
[23:11:48] <nodeNoob> Almost all the itneraction with the data supposed relational stuff
[23:12:01] <StephenLynx> yeah, mongo is not the thing you need there.
[23:12:13] <nodeNoob> I just picked it up because it went along with node everywhere
[23:12:18] <nodeNoob> or express
[23:12:22] <StephenLynx> if you have to have a join, for example, you are screwed.
[23:12:44] <StephenLynx> it goes along with node because js goes along with everything.
[23:12:57] <StephenLynx> I use mysql with io.js, it just clicks perfectly.
[23:13:13] <nodeNoob> I meant in the way that most articles or tutorials i read initially involved mongodb
[23:13:25] <nodeNoob> Is it the hype?
[23:13:26] <StephenLynx> heres the thing with the web development community
[23:13:35] <StephenLynx> they don't know how to develop software.
[23:13:41] <StephenLynx> they will learn ONE thing
[23:13:47] <StephenLynx> and try to fit this one thing into everything.
[23:14:12] <StephenLynx> anything that falls into the taste of the web development community is like that.
[23:14:14] <StephenLynx> EVERYTHING
[23:14:21] <StephenLynx> node, mongo, apache, javascript, html.
[23:15:15] <StephenLynx> anyone that I find that is like me, a general developer that started doing web development along with previous experiences shared this opinion.
[23:15:28] <nodeNoob> If i only had to record truckdata and just display the most recent information on the screen live, i think mongodb would have been perfect
[23:15:35] <StephenLynx> yes.
[23:15:47] <StephenLynx> but since you told me you have a strong relational need, that is not the case.
[23:16:01] <nodeNoob> But at least i learned something
[23:16:05] <StephenLynx> mongo will not check for relational integrity and will not support joins.
[23:16:09] <nodeNoob> Because in the end it's not a real application
[23:16:21] <nodeNoob> I know i need to normalize server side
[23:16:24] <nodeNoob> which is a PITA
[23:16:26] <StephenLynx> also mongo doesnt have transactions.
[23:16:55] <StephenLynx> as a rule of thumb I avoid coupling technologies.
[23:17:09] <StephenLynx> ever saw people promoting crap like MEAN stack?
[23:17:37] <StephenLynx> Mongo, Express, Angular, Node
[23:17:45] <nodeNoob> Oh yes transactions. I have some nasty flaws on that as i haven't covered them at all
[23:18:02] <nodeNoob> StephenLynx: you're dismantling my dream
[23:18:04] <StephenLynx> without failure, expect nothing but a clueless idiot if they promote stuff like this.
[23:18:15] <nodeNoob> That's what i was setting my goal to
[23:18:20] <StephenLynx> if you are working with web development, expect only a nightmare.
[23:18:40] <StephenLynx> especially from the community. web development is the single worst community in IT.
[23:19:33] <nodeNoob> Because of ease of development and deployment?
[23:19:36] <StephenLynx> no.
[23:19:58] <StephenLynx> because they are arrogant yet ignorant.
[23:20:28] <nodeNoob> That's harsh :"D
[23:20:30] <StephenLynx> they don't know the single basics of HTTP but think they know stuff because they have been playing with their crayons for over 15 years.
[23:20:37] <StephenLynx> I had this friend
[23:20:43] <StephenLynx> web developer for 10 years or so
[23:21:00] <StephenLynx> didn't know you could just open hyper text files sitting on your HD on your browser.
[23:21:15] <StephenLynx> thought he had to have a server for development.
[23:21:21] <nodeNoob> 10 years
[23:21:25] <nodeNoob> are you joking
[23:21:29] <StephenLynx> nope
[23:21:33] <StephenLynx> and heres the cherry on the cake
[23:21:45] <StephenLynx> he moved to canada, to some multi million company
[23:21:50] <StephenLynx> he instantly became the guru there.
[23:21:53] <StephenLynx> vancouver, the city.
[23:22:07] <nodeNoob> it's understandable
[23:22:09] <StephenLynx> and every single person I met that did nothing but web development were the same, or worse.
[23:22:09] <nodeNoob> I mean
[23:22:26] <nodeNoob> You don't need to know how the engine works exactly to be a racer
[23:22:53] <StephenLynx> as I said, if it were just ignorance, would be fine
[23:23:01] <StephenLynx> but they think they actually know stuff.
[23:23:16] <nodeNoob> I think i'll never reach that point
[23:23:32] <nodeNoob> I already know i'll never know everything there is about something
[23:23:37] <StephenLynx> it happens because they are always using training wheels.
[23:23:40] <StephenLynx> jquery, express
[23:23:45] <StephenLynx> mongo
[23:23:47] <StephenLynx> angular
[23:24:17] <StephenLynx> so not only they always add immense amounts of bloat to their projects, but they never learn the basics of the technologies.
[23:24:36] <StephenLynx> that is why so much stuff you see on web is incredibly slow.
[23:25:04] <StephenLynx> I saw once a framework of sorts that depended on a dozen or 20, don't remember, of modules.
[23:25:24] <StephenLynx> people think that just because they are writing few lines, that their program are executing few commands.
[23:25:32] <nodeNoob> :D
[23:25:47] <StephenLynx> they think a dependency works like magic, you just add, call a function and thats it.
[23:26:36] <StephenLynx> and they will always defend said bloat, they will talk like its impossible to develop without them without never trying to work without them.
[23:27:01] <StephenLynx> they are probably too busy blogging over starbucks with their macs and buying skinny jeans.
[23:27:08] <nodeNoob> ^^
[23:27:39] <StephenLynx> so if you want to be a good web developers, first of all you have to avoid the community like the plague.
[23:28:13] <nodeNoob> StephenLynx: this is being very educational thanks for the rant and good pointers
[23:28:49] <StephenLynx> np
[23:29:12] <StephenLynx> ranting is my favourite pass time after programming