Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
mathias_10gen
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
9 ms
·
31.
▲
by
mathias_10gen
15y ago
I think those two issues are orthogonal to consistency. In ACID, consistency and durability are two different letters and CAP doesn't even mention durability. Are you referring to another definition of consistency?
32.
▲
by
mathias_10gen
15y ago
In the sharded case, at any given moment each object will still live on exactly one replica set, which will have at most one master. You can do operations (such as findAndModify http://bit.ly/ilomQo ) that require a "current" version of an
33.
▲
by
mathias_10gen
15y ago
There is a good discussion in the comments about how mongodb uses compound indexes. http://openmymind.net/2011/5/9/Making-our-MongoDB-Code-Run-F...
34.
▲
by
mathias_10gen
15y ago
You may want to try tig ( http://gitready.com/advanced/2009/07/31/tig-the-ncurses-fron... ). The main view has the same info (may have to hit g to see the graph), plus it lets you drill down into each commit. All without leaving the comfort
35.
▲
by
mathias_10gen
16y ago
Based on my quick reading* of the mongoid_search code it looks like it is using a regex query against the keywords array which requires a full scan over the index. In fact the way it is being done is probably far less efficient than just do
36.
▲
by
mathias_10gen
16y ago
If you haven't seen it already, a quick Google hack for computing the radians to input into MongoDB: http://www.google.com/search?q=50+km+%2F+radius+of+earth http://www.google.com/search?q=50+miles+%2F+radius+of+earth
37.
▲
by
mathias_10gen
16y ago
Clients are able to wait for the next group commit by adding fsync:true to getLastError calls (some drivers allow you to add this to WriteConcern). We already have some enhancements to this planned for the 1.9 series.
38.
▲
by
mathias_10gen
16y ago
Actually the _id is usually created client-side so the timestamp will reflect when the application created the object rather than when it was processed by the DB. The only major exception is when the DB creates the _id for an upsert.
39.
▲
by
mathias_10gen
16y ago
Take a look at http://forums.virtualbox.org/viewtopic.php?f=28&t=33356 (win7) or http://forums.virtualbox.org/viewtopic.php?f=28&t=9697 (winxp). Protip: never use VirtualBox's "save machine state and close" feature if you plan t
40.
▲
by
mathias_10gen
16y ago
I think I've finally found the "holy grail" of dual booting. My laptop now has Windows and Linux on different partitions, and either one can run in a VirtualBox inside of the other. That way, no matter which OS I booted too, I still have ac
41.
▲
MongoDB strategies for the disk-averse
(engineering.foursquare.com)
21 points
by
mathias_10gen
16y ago
|
2 comments
42.
▲
by
mathias_10gen
16y ago
On a related note, if you like python and MongoDB you might like my MongoMagic library: https://github.com/redbeard0531/MongoMagic . It lets you write queries like this: db.users.find(M.age > 21). This produces standard Mongo query obj
43.
▲
by
mathias_10gen
16y ago
Actually that doesn't add any additional durability guarantees in the general case. The only way to use MongoDB durably with a single server is to use the new --dur flag coming in 1.8. I assure you there is no other way.
44.
▲
by
mathias_10gen
16y ago
Actually, MongoDB does leave memory management to the kernel by using MMAP to access data files. Most kernels will allocate a lot of memory to the disk cache, which can make it look like mongo is eating all of your ram.
45.
▲
by
mathias_10gen
16y ago
In that case, I apologize. I have seen people using the same argument to claim that MongoDB is unsuitable for use in ecommerce and assumed you were doing the same.
46.
▲
by
mathias_10gen
16y ago
While I don't support a blanket statements along the line of "every app should be using MongoDB," it is equally invalid to say that "anything that deals with money" has no use for MongoDB. If you look at http://www.mongodb.org/display/DOCS
47.
▲
by
mathias_10gen
16y ago
MongoHQ and other companies providing commercial hosting of MongoDB only need a commercial license if they modify the server and don't contribute back. We want to encourage hosting providers which is why we don't require buying a special li
48.
▲
by
mathias_10gen
16y ago
We try to be very clear about licensing: http://www.mongodb.org/display/DOCS/Licensing . Please let us know if there is something on that page that needs clarification. I would like to make it clear that users of MongoDB don't need to open
49.
▲
by
mathias_10gen
16y ago
You actually list one of the advantages of GridFS right there in your post: streaming. If you are serving up a 700MB video, you don't want to have to load the whole thing into memory or push the whole thing to the app server before you can
50.
▲
by
mathias_10gen
16y ago
Actually it would probably be best to reverse the relation and put user_id's in the event objects. Then you can do queries like this: db.events.find({hosted_by: MY_ID}) db.events.find({invited: MY_ID}) // invited is an array of us
51.
▲
by
mathias_10gen
16y ago
They didn't really cover the important question of why modern wifi still uses 2.4GHz rather than the much wider 5GHz spectrum. Anyone living in a crowded apartment building owes it to themselves to get 5GHz routers so avoid interference wit
52.
▲
by
mathias_10gen
16y ago
That sounds like a good reason to just leave the data in UTF8 rather than converting to ASCII embedded in UTF16 which is broken by design.
53.
▲
by
mathias_10gen
16y ago
You don't have to set your whole system to read only for the entirety of the backup. There are three ways to avoid it: 1) Use mongodump which queries for every object in the database. It will produce a compacted file, but does not do a poin
54.
▲
by
mathias_10gen
16y ago
C++0x managed to add closures without adding GC. The only issue is that if you want to the closure to outlive the current stack frame you have to capture by value ([=] rather than [&]) or use a shared_ptr (which is then copied by value)
55.
▲
by
mathias_10gen
16y ago
Since Mikeal decided to take down the comments I've archived what I had in an open tab and put it up on s3: http://bit.ly/diuWH8 . If anyone has a newer snapshot please let me know and I'll update.
56.
▲
by
mathias_10gen
16y ago
I don't think there is a browser that uses a full thread-per-tab model, so there's really nothing to compare it against. The problem with other browsers is that slow JS or in some cases flash in one tab will slow down other tabs. Also, the
57.
▲
by
mathias_10gen
16y ago
Why are they using multiple processes rather than multiple worker threads? IPC is much costlier than using shared memory, even if it's just passing the initial state.
58.
▲
by
mathias_10gen
16y ago
Actually Boost::Python makes python and c++ mix beautifully. I just started playing with it a few days ago and am seriously impressed. I'm planning on using it to write a WSGI gateway to put in front of my bottle.py apps.
59.
▲
by
mathias_10gen
16y ago
sed?
60.
▲
by
mathias_10gen
16y ago
If you (and everyone else who've made the same argument) substitute "Syntactic Sugar" for "Abstraction" and "Turing Complete" for "Relational Model" I think you've just made the claim that every application can or should be written in Brain
More ›