PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Sunday the 20th of April, 2014

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[00:00:07] <laprice> Mark_: what are you trying to do exactly? You might want to look at http://docs.mongodb.org/manual/applications/data-models-tree-structures/
[00:08:24] <zma> I need to form game database, so some branching factor is included.
[00:08:41] <zma> Any links or information how to do that with mongo would be nice
[00:09:56] <zma> my google-fu with following keywords doesn't seem to bring up anything useful: mongodb branching factor
[00:10:10] <zma> So I'd assume the terminology from database point of view is different
[00:26:36] <Mark_> laprice, telephone numbers consist of 10 digits
[00:26:44] <Mark_> npa-nxx-yzzz
[00:26:52] <Mark_> npa is the area code, nxx is the exchange, y is the thousands block
[00:27:17] <Mark_> each thousands block is assigned to a specific carrier (although sometimes there is no thousands block subdivision)
[00:27:47] <Mark_> anyway i was trying to convert my mysql using application of this data (voip projects like freeswitch) to mongodb
[00:28:22] <Mark_> its extremely fast and index-less if i just store it as key-value relationships, but i cant search on key
[00:28:28] <Mark_> for say.. a range of thousands blocks or such
[00:29:24] <Mark_> so i have to make this big nested relationship of { npa: 202 -> { nxx: 555 -> { y: 1 -> { ocn: ocn } } } }
[00:29:27] <Mark_> or at least, im trying to
[00:29:40] <Mark_> but im like, swimming in arrays of arrays trying to shove it in
[00:29:40] <Mark_> lol
[00:33:34] <Mark_> really, i feel like its php thats making this annoying
[00:33:46] <Mark_> since i cant use an array as a key for another array for example
[00:33:53] <Mark_> and that seems like how it would logically flow in mongo
[00:38:55] <laprice> Mark_: Are you usually querying for all numbers in a subset of prefixes for an area code?
[00:49:50] <Mark_> no
[00:50:02] <Mark_> most people use this data to lookup specific information on 1 number
[00:50:06] <Mark_> i.e. poor mans caller id
[00:50:20] <Mark_> so just hitting key names directly is very fast, index-less and lightweight
[00:50:36] <Mark_> but if someone *wanted* to say, pull data for a range of numbers, or aggreggate it
[00:50:43] <Mark_> shrug, i guess i could just say 'map/reduce it!'
[00:53:17] <Mark_> i guess i just need to get used to nosql
[00:53:25] <Mark_> im used to bending even the most slopped together shit to my will
[00:53:41] <Mark_> alter table add index alter table add index etc etc
[00:55:04] <Mark_> and theres no particular reason this couldnt stay as mysql, but im interested in 1. learning mongo, 2. heroku has free mongo and i can just put the lookup app on that
[00:55:18] <Mark_> and sync it to github for anyone else to not have to reinvent the miserable wheel of gathering telco data
[00:55:30] <Mark_> (they make it hard to find on purpose so that providers have to buy telecordia data for $$$$$)
[00:56:09] <Mark_> infact my data gathering script is broken because they switched from xls, which was easy to hax up with catdoc
[00:56:15] <Mark_> to xlsx ;/
[00:57:25] <Mark_> yea it means i had to switch from php to bash
[00:57:31] <Mark_> and now im going to have to get even yuckier
[00:57:40] <Mark_> maybe even use asp.net on a windows system :O
[00:57:57] <Mark_> but all these telco NGOs that public this information want to make it hard to compete with paid data providers
[00:58:12] <Mark_> canada for example publishes theirs in zipped xlsx
[00:58:25] <Mark_> and theres like 10 phones in canada that arent in toronto so its not like this is a huge dataset
[00:58:39] <Jadenn> i live in canada and i find that offensive :<
[00:59:46] <Mark_> http://www.cnac.ca/co_codes/co_code_status.htm
[00:59:53] <Jadenn> speaking of your comments about numbers being ten digits, what about every other country?
[01:00:00] <Mark_> 867 is a loneeeeeeeeeeeeely npa
[01:00:26] <Jadenn> lol you can see the density of alberta, we have 3 area codes just for south
[01:00:37] <Jadenn> toronto ain't got nothing on us
[01:01:22] <Mark_> if i had people to help me, i could extend it to every other country
[01:01:28] <Mark_> but there are major differences in how the systems are arranged
[01:01:57] <Mark_> i did extend it to international country codes, since i had a data source for it, but not further than that
[01:02:03] <Jadenn> then there's my lonely little town with one block
[01:02:05] <Jadenn> 403,405,497E,Shaw Telecom Inc.,In Service,Coaldale
[01:02:06] <Mark_> us and canada all fall under the nanpa umbrella, so its relatively easy
[01:02:14] <Mark_> they have 'rate centers' a nd such
[01:02:19] <Mark_> (great for poor mans caller id :P)
[01:02:58] <Jadenn> when i lived in raymond we only ever memorized the last 4 digits, or communicated as such because the prefix was the same everywhere
[01:03:10] <Mark_> yea
[01:03:15] <Mark_> except long term that was wasteful
[01:03:18] <Mark_> having such subdivided rate centers
[01:03:26] <Mark_> because you couldnt maximize utilization
[01:03:31] <Mark_> and technologically unnecessary now
[01:03:37] <Mark_> so if you take where i live as an example
[01:03:41] <Mark_> its all one big rate center, 'phoenix'
[01:03:52] <Mark_> even though the county is the size of the entire state of massachusetts
[01:04:24] <Jadenn> it never ceases to amaze me how spread out everyone in the US lives
[01:04:39] <Jadenn> here probably 90% of the population lives in an urban area
[01:04:57] <Mark_> im 10 miles from sky harbor
[01:05:03] <Mark_> but i still have to walk a mile to the nearest gas station
[01:05:03] <Mark_> lol
[01:05:22] <Jadenn> town of 8 thousand i am walking distance from 4 gas stations
[01:51:58] <Senor> I need to save data from ram to database in a fixed interval ,is mongodb fit for this case?
[04:24:57] <AlbireoX> Hi, how can I upsert a value within an array in a document?
[04:26:19] <AlbireoX> I have a document { foo: [ { id: 1, data: xxx }, { id: 2, data: xyz } ] } and I want to update the data field of a certain element of the array. If something with the given id doesn't exist I want to $push to that array.
[04:26:26] <AlbireoX> Can I do this in a query?
[06:49:18] <george2> How can I remove all documents where a certain field does not exist?
[06:50:12] <george2> I recently started saving a new "text" field in my documents, and I need to get rid of all the old documents that don't have it.
[18:07:33] <dgray> I want to truncate a file to an arbitrary size in gridfs. Will I have to manually delete the chunks, update the file size, load the last chunk in the file and manually truncate it in memory on the client?
[18:07:39] <dgray> ...or is there an easier way?
[18:37:08] <kebo> how do you do an AND search in MongoDB's full text search feature EG Ruby AND C++
[18:42:28] <kebo> no one?
[18:54:49] <Ephexeve> Hey guys, I wonder, is there a way to add a password to a database? So the only way to query it is with a password? otherwise there is NO way to access it?
[20:41:15] <Mark_> http://npa.herokuapp.com/?n=12025521212
[20:41:23] <Mark_> neat thing i whipped up using mongo
[20:41:27] <Mark_> i did it before with mysql
[20:41:38] <Mark_> the lack of joins means multiple round trips, but its index-less and super fast
[20:41:40] <Mark_> tradeoffs tradeoffs
[21:48:22] <AlbireoX> gst
[21:59:05] <bdiu> I have all my locations stored as GeoJSON geometries (i.e., type = Point)... is it best to index these as 2dsphere or 2d? Is there any reason (other than accuracy) to choose one way over another?
[22:33:02] <Simonn> mongodb is pretty cool
[22:33:03] <Simonn> i love mongodb