PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Sunday the 16th of June, 2013

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[03:16:02] <Goopyo> is mongodb with auth but without a firewall unsafe?
[03:16:26] <Goopyo> Using heroku so ip isn't always the same. Its hard to firewall it
[10:55:27] <ggwalle> hi all
[10:55:37] <ggwalle> i have a doc as:
[10:55:44] <ggwalle> { "_id" : ObjectId("51bd96bc5e4356af8fc6f617"), "name" : "hack", "group" : { "default" : [ ] } }
[10:56:20] <ggwalle> how do i use $addToSet and $each to add item 'foo1', 'foo2' into 'default' array?
[10:56:52] <ggwalle> i have try: db.test.update({name:'hack'}, {$addToSet:{'group':{$each:['foo1','foo2']}}}
[10:56:55] <ggwalle> but it's not work
[10:57:39] <ggwalle> any one can help me ?
[10:57:41] <ggwalle> :-)
[11:03:02] <kali> ggwalle: db.test.update({name:'hack'}, {$addToSet:{'group.default':{$each:['foo1','foo2']}}}
[11:04:47] <ggwalle> kali: can no t work..
[11:06:44] <ggwalle> kali: the error is same: after i input you command, the mongo shell give me three dot wait me input
[11:07:06] <ggwalle> kali: and i input two enter key, then i input db.test.find()
[11:07:13] <ggwalle> kali: the data is same
[11:07:27] <kali> ggwalle: your line is wrong somehow. somehing paren or quote unclosed
[11:07:54] <ggwalle> kali: i only copy your code into mongo shell
[11:08:16] <kali> http://pastie.org/8048390
[11:08:18] <ggwalle> kali: and i checked the {[(, they are pair match
[11:08:29] <kali> it lacks the final )
[11:09:13] <ggwalle> kali: ok, it's right!
[11:09:21] <ggwalle> kali: thanks :-)
[12:55:04] <kittu_> hi
[13:53:19] <Infin1ty> I changed the config server ip, yet the mongos still tries to connect to the old ip, pinging from the machine the hostname that was provided in mongos.conf works on the new ip, looks like some mongos refuses to check the IP and uses those in the cache
[14:20:57] <OliverJAsh> i have an app that is a bit like twitter in that it has the concept of "following". this means i need to keep track of two things: who a user is following, and counts for how many users a user is following, as well as counts for how many followers they have.
[14:21:28] <OliverJAsh> can anybody suggest how they would model this data? especially with the following/followers counts. doing a count() operation every time would be very expensive, so i'm searching for a better methos.
[14:21:30] <OliverJAsh> method*
[14:26:39] <idank> I just ran db.runCommand( { shardcollection : "somedb.somecollection", key : { _id : 1 } } ) by accident, and haven't inserted anything yet
[14:26:52] <idank> now I'd like to change the shard key, or simply undo that command
[14:26:56] <idank> how do I do that?
[14:40:38] <Elico> hey all I am trying to think about a DB structure. anyone is interested to help me think a bit??
[17:58:54] <caitp-> I'm wondering if it makes more sense to let clients of a mongodb connect to it and mess around with it on their own, or if it's better to have trusted scripts on a trusted machine that retrieves and operates on data for the client applications
[18:00:01] <caitp-> like the model layer of an MVC system I guess
[18:00:42] <caitp-> (the clients in question are a bunch of little embedded linux machines, so it's probably better to not impose the mongodb dependency on them)
[18:01:12] <kali> you're worried mongodb might be to fast ? :)
[18:01:21] <caitp-> it's not really a speed worry
[18:01:49] <caitp-> it's just a question of infrastructure and management, I worry that if each client does this independently it could possibly get mixed up when code gets updated inconsistently
[18:02:10] <kali> hard to give advice without much more information
[18:02:48] <kali> but i'd say mongo is not a game changer from good old SQL techs here
[18:02:48] <caitp-> okay so, mongodb somewhere has a document containing authorized RFID codes with expiry dates and attached names and such
[18:03:07] <kali> if you needed a middleware before or a webservice before, you probably still need one
[18:03:12] <caitp-> we have a bunch of embedded linux machines which need to ask that database "is this RFID code okay? should I open a door for this individual"
[18:03:31] <caitp-> I don't really want to put the auth logic on each individual lock unit
[18:03:38] <kali> what about a simple webservice then ?
[18:04:49] <caitp-> so like, connect over tls to web service, give it json with RFID code and wait for a response?
[18:05:03] <caitp-> that is probably more sensible
[18:05:40] <kali> or even simple GET /rfid/<the id> returning 200 or 404, or 401, or whatever
[18:05:45] <kali> keep it simple
[18:05:57] <kali> well, i guess json is allright :)
[18:06:12] <kali> don't start soap-ing this is what i meant
[18:06:31] <caitp-> well the simpler the better :)
[18:08:10] <kali> out of curiosity, how smart are the locks ?
[18:08:26] <kali> rapsberpi-smart ? arduino-smart ?
[18:08:57] <caitp-> essentially
[18:09:13] <caitp-> I'm not sure what the difference would be... ARM linux + GPIO to trigger maglock inputs
[18:09:27] <kali> well, linux says it all
[18:09:39] <kali> no problem for making json http request then
[18:09:57] <kali> with something like an arduino, tcp could be a better choice
[18:14:29] <caitp-> I thought arduinos were actually running embedded linux most of the time, TIL
[18:35:57] <kali> cq
[18:36:07] <kali> caitp-: arduino are too small to run linux
[21:33:22] <OliverJAsh> i have a question about whether to replicate data in my schema design or not. would appreciate any help i can get http://stackoverflow.com/questions/17137904/schema-design-in-mongodb-to-replicate-data-or-not
[22:44:53] <dorkmafia> is there a away to set unique keys for collections using the java driver?
[23:04:40] <belak> With mongo, if I try to upsert with an id of empty string, will it be the same as an insert?
[23:42:57] <Bilge> Why does the query: { $or: [ {tags: {$in: ['foo']}}, {tags: {$nin: ['bar']}} ] } NOT use an index on tags?
[23:43:20] <barneygale> Hi. I'm using mongoengine to write a forum-like thing. In my listing of Topics, I want to sort by the most recent Post in each. Posts are related by a ReferenceField to their parent Topic. Currently I'm doing "Topic.objects().order_by('+date')" to sort by topic-post-date, but what about most-recent-reply-date? Very new to this, sorry for n00b question.