<    March 2017    >
Su Mo Tu We Th Fr Sa  
          1  2  3  4  
 5  6  7  8  9 10 11  
12 13 14 15 16 17 18  
19 20 21 22 23 24 25  
26 27 28 29 30 31
00:06 YoY joined
00:11 gentunian joined
00:17 Number6 joined
00:39 YoY joined
00:48 _yoy_ joined
00:49 Gwayne joined
00:49 Gwayne joined
01:05 Axy joined
01:47 svm_invictvs joined
01:58 Siegfried joined
02:00 Sasazuka__ joined
02:07 jaequery joined
02:19 BlueProtoman joined
02:20 <BlueProtoman> I'm in a situation where it's useful to explicitly set a document's ID (because I'm storing data originating from elsewhere that has a unique ID already). Is it acceptable for two documents in two separate collections to have the same _id?
02:50 jwd joined
02:51 BlueProtoman joined
02:51 mdorenka joined
02:51 svm_invictvs joined
03:03 sspreitz joined
03:15 svm_invictvs joined
03:30 BlueProtoman0 joined
03:55 fels joined
04:01 fracting joined
04:28 madprops joined
04:28 <madprops> hi
04:28 <madprops> i have some questions
04:29 <madprops> if i have multiple "objects" of "type" 'room' .. and i have the same but with type 'user' .. whats the proper way of saving those in the db?
04:29 <madprops> db.collectiontype.collection ?
04:30 <madprops> db.getCollection(x).getCollection(y) /
04:30 <madprops> ?
04:30 <madprops> i was wondering if that's how i would get them
04:30 <madprops> also im not sure if im supposed to create them, or if they're created on first retrieval
04:33 <BlueProtoman> madprops: You mean you have two sets of documents with the same structure but different "type" fields?
04:33 <madprops> I have room information, with its own set of fields, and user information, with different fields
04:34 <BlueProtoman> Ideally they'd go in separate collections (in your case, titled "rooms" and "users"). You *could* put them all in the same collection, but that would be messy and missing the point of collections
04:35 <BlueProtoman> You don't need to create collections explicitly; when you try to access it for the first time, it will be created (same with databases too, I think)
04:35 <BlueProtoman> What do you mean exactly by "save"?
04:35 <madprops> Im not understand exactly what a collection is then ... if i want to get information about room "blue" .. how exactly would i retrieve it?
04:36 <madprops> I don't*
04:36 <madprops> by save i mean updating the information in the db
04:36 <BlueProtoman> Assuming your collection is named "rooms" and that the value "blue" would be stored in a field named "name":
04:38 <madprops> I should use find?
04:38 <BlueProtoman> db.rooms.find({ name: "blue"}), I think, yes
04:39 <madprops> ok and it would retrive a 'document' if im correct?
04:39 <BlueProtoman> It would retrieve any amount of documents
04:40 <BlueProtoman> Ultimately, MongoDB stores JSON. So imagine a document as a JSON file, and a collection as a directory holding multiple JSON files
04:40 <madprops> i see
04:40 <madprops> i like how flexible it seems to be
04:40 <BlueProtoman> It is, but it's better for some use cases than others.
04:40 <madprops> right now im using a couple of json files that update in the filesystem every 5 minutes
04:40 <madprops> but i fear it might not be "scalable"
04:41 <madprops> since the files could get too big
04:41 <BlueProtoman> I don't know the details of your project, but it smells like MongoDB would be a good candidate
04:42 <BlueProtoman> MongoDB is good for when documents stand alone. But if you have different types of data (aka documents with different structures in different collections) maintaining references to one another then some form of SQL is likely the better choice
04:44 <BlueProtoman> For example, MongoDB would be a good candidate for storing responses to a survey, or for storing someone's personal art gallery (a la DeviantArt).
04:45 hays joined
04:46 <madprops> right now i just have 2 "types" (room and user) each piece of those will have the same fields
04:47 <madprops> according to their type
04:47 <BlueProtoman> I *think* you'd be fine, but without knowing more about your goals I can't say for sure
04:48 <BlueProtoman> What kind of relationships are there between rooms and users? One room, many users? One user, many rooms? Many rooms, many users?
04:48 <madprops> none at all
04:48 <madprops> they have no relation
04:48 <BlueProtoman> Then it's looking good for MongoDB, especially since you already have JSON (MongoDB lets you import JSON directly)
04:49 <madprops> nice
04:49 <madprops> im just wondering about the saving part now
04:49 <madprops> if i get a collection, and update some fields in the code, i still ahve to update the collection in mongo right?
04:49 <madprops> if i get a document i should say
04:49 <madprops> i ask because a lot of javascript references work like magic
04:50 <BlueProtoman> Probably, but the details will depend on the framework you use. I assume you're using something like node.js?
04:51 jwd joined
04:51 <madprops> node yeah
04:51 <BlueProtoman> You probably wouldn't want to update the underlying MongoDB document *every time* you change its application-level (aka JavaScript object) fields. Otherwise, updates to multiple fields would require multiple database updates (even if they're abstracted away from you).
04:52 <BlueProtoman> So generally there is a notion of saving an object separately from changing its fields
04:53 <madprops> not sure what you mean, I was planning on updating the document at the end of whatever function i use where data needs to be updated
04:53 <madprops> with all the fields that changed
04:57 <BlueProtoman> Oh, okay, good.
04:58 <madprops> hmm im now trying to get this: db.rooms.getCollection(room)
04:58 <madprops> I get: ypeError: Cannot read property 'getCollection' of undefined
04:58 <madprops> i thought rooms would be autocreated
04:59 <madprops> oh wait
04:59 <madprops> nvm
04:59 <madprops> i had to use find there
05:00 <madprops> still i get TypeError: Cannot read property 'find' of undefined
05:01 <madprops> and this way i get http://i.imgur.com/jghRtXd.jpg
05:01 <BlueProtoman> rooms *is* the collection, so just do db.rooms.find
05:02 <BlueProtoman> Ah, wait, I see
05:02 <madprops> yeah i tried that
05:02 <BlueProtoman> You might actually have to create collections explicitly, then. I might have been wrong about that
05:02 <madprops> http://i.imgur.com/YOVEsAL.jpg
05:02 <madprops> hm that's a bummer
05:03 svm_invictvs joined
05:03 <madprops> "Because MongoDB creates a collection implicitly when the collection is first referenced in a command, this method is used primarily for creating new collections that use specific options. ."
05:03 <madprops> i think it should just create it though
05:03 <BlueProtoman> That might be referring to the mongo shell, I don't know how behavior changes in external JavaScript code
05:05 preludedrew joined
05:13 <madprops> ok i have to call db.collection('rooms') first
05:13 <madprops> i think it's specific to the node mongo driver
05:20 <madprops> it seems synchronous queries are possible if i use var = query
05:21 <madprops> but im not sure if it's something wrong going on
05:23 ayogi joined
05:35 <BlueProtoman> I don't know anything about the node driver, sorry
06:08 jwd joined
06:18 rendar joined
06:20 lpin joined
06:22 Waheedi joined
06:32 igniting joined
06:35 Silenced joined
06:37 Silenced joined
06:40 fels joined
07:04 VeeWee joined
07:04 tildes joined
07:10 jwd joined
07:23 mounibec joined
07:39 Folkol joined
07:39 bob joined
07:41 rodmar_ joined
07:41 akagetsu01 joined
07:55 mounibec joined
08:04 <madprops> maybe a dumb question but, is it necesary to set a user and password to a local mongodb? is it accesible remotely?
08:05 fels joined
08:10 mounibec joined
08:18 <kali> madprops: you can tweak which interface it listen too (0.0.0.0 or 127.0.0.1)
08:19 <kali> madprops: iirc, the default setting is not unified, it depends on the package
08:19 <madprops> im reading this
08:19 <madprops> "Look for the net line and comment out the bindIp line under it, which is currently limiting MongoDB connections to localhost:"
08:19 <madprops> i think it doesnt allow remote connection by default, which is good
08:28 fels joined
08:33 evil_gordita joined
08:34 Lujeni joined
08:52 <madprops> im wondering about how efficient find is
08:52 <madprops> in relation to how big a db can get
08:52 <madprops> i have a chat application and on every message a find is made
08:53 <madprops> that searchs by a keyword
08:54 tundebadmus joined
08:54 <tundebadmus> Hello
08:55 <tundebadmus> mongo and mongod commands works on my computer but all the othe daemons don't
08:56 <tundebadmus> I have set the path to the bin folder but problem still persist, please what could be the problem
08:58 yeitijem joined
09:11 SkyRocknRoll joined
09:13 bweston92_ joined
09:14 <madprops> Im curious about this. When a room hasn't been accesed before roominfo from findOne returned null. So I made that if(!roominfo) insertOne portion, which seems to add a _id to it, and i used that. But im wondering how that _id got there, reference? is insertOne synch hmm
09:14 bweston92 joined
09:14 <madprops> http://gsick.com/paste/201/
09:16 watmm joined
09:20 <tundebadmus> madprops
09:21 <tundebadmus> I have my path set to the bin directory but only mongo and mongod commands work
09:21 <tundebadmus> All the other daemons are not working
09:21 <tundebadmus> Please what could be the problem
09:21 <madprops> what distro?
09:22 <madprops> in debian i just do service mongod start
09:22 <tundebadmus> mac os
09:22 <madprops> also im pretty new to mongodb lol
09:22 <tundebadmus> lol
09:23 <tundebadmus> have you used mongorestore
09:23 <madprops> but i'll try to help with my google skillz
09:23 <madprops> no
09:23 <tundebadmus> Aww thanks
09:23 <madprops> have you seen this? https://docs.mongodb.com/manual/tutorial/install-mongodb-on-os-x/
09:24 <tundebadmus> I have done all that and have been using mongodb for sometime now
09:25 <tundebadmus> I am trying to push my database to a remote with mongorestore and it won't work
09:29 <madprops> are you using homebrew to start the service?
09:29 YoY joined
09:30 <madprops> http://stackoverflow.com/a/5601077/661424
09:31 <madprops> read that answer and its comments
09:50 Silenced joined
10:02 okapi joined
10:21 undertuga joined
10:31 Letze joined
10:32 ahr3n joined
10:33 mrkirby153 joined
10:43 michaeldgagnon joined
10:47 fels joined
10:56 fels joined
10:57 fels joined
11:08 gfidente joined
11:08 gfidente joined
11:16 Siegfried joined
11:51 StephenLynx joined
11:53 Siegfried joined
12:10 itaipu joined
12:26 okapi joined
12:52 gentunian joined
13:00 geoffb joined
13:01 Guest95 joined
13:04 AvianFlu joined
13:07 fels joined
13:12 stelarcf___ joined
13:22 felixjet joined
13:29 theotherguy joined
13:41 Guest95 joined
14:01 Bizkit joined
14:06 igniting joined
14:26 Letze joined
14:35 Derperperd joined
14:49 xaep joined
14:52 itaipu joined
14:58 Guest95 joined
15:03 michaeldgagnon joined
15:06 kexmex joined
15:11 neuro_sy1 joined
15:11 neuro_sy1 left
15:12 neuro_sys joined
15:12 <neuro_sys> http://mongodb.github.io/node-mongodb-native/core/api/MongoError.html#comment-2629831558
15:12 <neuro_sys> Does anyone know the answer to this question?
15:15 silenced joined
15:20 Mia joined
15:20 Mia joined
15:23 nanohest joined
15:26 RickDeckard joined
15:30 cslcm joined
15:30 edrocks joined
15:31 <cslcm> Allo - "Cannot accept sharding commands if not started with --shardsvr" does this come from mongos?
15:37 michaeldgagnon joined
15:49 Derperperd joined
15:52 <cslcm> arrrgh fuckkkk.. the upgrade to 3.4 totally borked my configuration. Is there anyone around who might be able to assist?
15:52 FatNoLife joined
15:54 Siegfried joined
15:56 <cslcm> ah i think it's not as bad as i thought :P
16:02 <cslcm> used --shardsvr instead of --configsvr on the wrong instance, that's all. All working now. *panic mode cancelled*
16:04 Siegfried joined
16:18 Frostman joined
16:21 itaipu joined
16:22 lpin joined
16:27 Siegfried joined
16:34 SkyRocknRoll joined
16:42 nanohest joined
16:47 edrocks joined
16:59 itaipu joined
17:02 ayogi joined
17:03 blizzow joined
17:16 Siegfried joined
17:19 orbyt_ joined
17:24 theotherguy joined
17:24 YoY joined
17:29 michaeldgagnon joined
17:29 nanohest joined
17:31 theotherguy joined
17:32 Derperperd joined
17:43 svm_invictvs joined
17:48 itaipu joined
17:50 silenced joined
17:52 tildes joined
18:00 michaeldgagnon joined
18:01 point joined
18:03 edrocks joined
18:14 silenced joined
18:30 silenced joined
18:32 rendar joined
18:32 rendar joined
18:32 edrocks joined
18:38 nanohest joined
18:44 raspado joined
18:46 ahr3n joined
18:59 RickDeckard joined
19:06 Sasazuka__ joined
19:19 nanohest joined
19:21 fels joined
19:37 jrmg joined
19:43 rendar joined
19:43 rendar joined
19:47 sunoano joined
19:47 sunoano joined
20:02 timg__ joined
20:03 sQVe joined
20:09 itaipu joined
20:12 edrocks joined
20:13 okapi joined
20:23 timg__ joined
20:24 timg__ joined
20:24 edrocks joined
20:29 timg__ joined
20:52 silenced joined
20:55 itaipu joined
20:58 einseenai joined
21:03 jrmg joined
21:05 timg__ joined
21:11 denissalem joined
21:11 <denissalem> hi everyone, does someone use mongodb with libressl?
21:12 <denissalem> I tried to emerge the package on gentoo and it issue https://dpaste.de/0hn9
21:19 <qmr> I think I found your problem
21:22 <denissalem> mine?
21:24 StephenLynx joined
21:25 fels joined
21:26 itaipu joined
21:27 <denissalem> qmr, were you talking to me or did I miss something?
21:29 orbyt_ joined
21:35 <qmr> yes
21:38 <denissalem> qmr, nice!
21:38 <denissalem> qmr: tell me?
21:40 <qmr> you're using gentoo
21:41 <denissalem> qmr: https://media.giphy.com/media/GnQtprkm2mFK8/giphy.gif
21:45 <denissalem> qmr: angry with gentoo then?
21:45 <qmr> it's a waste of time
21:45 fels joined
21:45 <qmr> I have real actual work to do, I don't want to watch shit compile
21:46 <qmr> micromanaging your desktop is ... whatever. micro managing racks, rows, and datacenters is impossible
21:48 <denissalem> I do not deal with datacenter. i'm using mongo for school stuff.
21:48 <denissalem> But I get the idea :p
21:50 <qmr> "sql is bad, so we're going to use nosql and shoehorn halfassed relational features on top of it"
22:24 irclogger_com joined
22:24 Topic for
22:25 YoY joined
22:27 Bizkit joined
22:27 Bizkit joined
22:46 goldfish joined
22:55 beauvolio joined
23:02 benlue joined
23:02 YoY joined
23:06 Siegfried joined
23:12 Sasazuka_ joined
23:20 timg__ joined
23:30 bob joined
23:34 itaipu joined
23:35 Bizkit joined
23:40 point joined
23:44 edrocks joined
23:53 jkhl joined
23:56 itaipu joined