tag:blogger.com,1999:blog-18508356.post5309032346838518989..comments2023-05-21T09:53:50.042-04:00Comments on Just a little Python: MongoDB Rocks My WorldRick Copelandhttp://www.blogger.com/profile/11612114223288841087noreply@blogger.comBlogger12125tag:blogger.com,1999:blog-18508356.post-40165932627289348552011-11-01T12:47:03.708-04:002011-11-01T12:47:03.708-04:00Hi! I’m the Community Manager at DZone.com and I’d...Hi! I’m the Community Manager at DZone.com and I’d like to discuss our Most Valuable Bloggers program with you. It is a free program that promotes quality developer blogs such as this one. E-mail me at lgordon {at} dzone{dot}com if you are interested! I hope to hear from you.Lindsayhttp://www.dzone.comnoreply@blogger.comtag:blogger.com,1999:blog-18508356.post-71511681685725456152011-11-01T09:12:34.696-04:002011-11-01T09:12:34.696-04:00@Davide: Certainly going with anything other than ...@Davide: Certainly going with anything other than the Django ORM., you lose some of the Django special-ness (like the excellent admin tool). You probably sacrifice a lot of pluggable applications as well. Those are points I had not thought of, and I'm not a Django developer, so I guess it's not that surprising. If you have any more information about django-nonrel that could be added to the discussion, I'm sure it would be appreciated.<br /><br />@Anonymous #1: You can avoid duplicates in MongoDB by creating unique indexes, which will enforce the uniqueness constraint on insert/update.<br /><br />@Anonymous #2: I'm not sure what's weird about replica sets in MongoDB. It's pretty flexible, allowing you to even specify on a per-operation basis how many replicas get the data. Maybe you find the asynchronous nature of replication off-putting? It seems like most DBs do it similarly.Rick Copelandhttps://www.blogger.com/profile/11612114223288841087noreply@blogger.comtag:blogger.com,1999:blog-18508356.post-36348687833658960782011-11-01T02:40:19.571-04:002011-11-01T02:40:19.571-04:00I have strated playing around with the mongoDB usi...I have strated playing around with the mongoDB using IronPython.<br /><br />The python-drier should not be used with IronPython because he didn't survived some unit-test. And in the .NET driver there is an issue with a bulk-insert via a MongoCollection. error: <br /><br />cannot invoke explicitly implemented generic interface methods<br /><br />But the issue is already reported and I hope it will be fixed soon. <br />But mongoDB has a great concept which is implemented very cool. So from my side: Try it and you won't use a relational database again.berndhttp://www.it-viehmann.denoreply@blogger.comtag:blogger.com,1999:blog-18508356.post-43701799335505422642011-11-01T02:20:09.172-04:002011-11-01T02:20:09.172-04:00Replication (Replica sets) in MongoDB is weird. I ...Replication (Replica sets) in MongoDB is weird. I don't feel its a optimistic design.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-18508356.post-8369059804196564762011-10-31T23:42:45.722-04:002011-10-31T23:42:45.722-04:00How do you avoid storing duplicate data in Mongo? ...How do you avoid storing duplicate data in Mongo? or do you care?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-18508356.post-17383236759664599992011-10-31T18:38:27.652-04:002011-10-31T18:38:27.652-04:00Thanks for your explanation. I've tried MongoD...Thanks for your explanation. I've tried MongoDB a year ago with php and I think that is a good solution for web scalability.<br /><br />My reluctance to use mongodb with django comes from the fact that you can't use standard django but you must set up django-nonrel (I've heard that in a discussion on Django-MongoDB talk in MongoTorino). Anyway as I said before I'm not experienced with large django applications. So probably when I will have to encounter some of the problems you've explained in recent comments, you can say me:"I told you that!" ;)<br /><br />Anyway thanks for this great discussion!Davide Ferrerohttp://www.davideferrero.comnoreply@blogger.comtag:blogger.com,1999:blog-18508356.post-67001960693332183042011-10-31T17:38:20.743-04:002011-10-31T17:38:20.743-04:00Memcached + a relational database is a reasonable ...Memcached + a relational database is a reasonable solution, particularly if you already have data in a relational model or you need to share access to data with other applications which use it in different ways. But once you add memcached to the mix, what you have is actually an ad hoc NoSQL solution (memcached for performance, RDBMS for persistence). While that should work, it's more moving parts, making it easier (in my experience) to make mistakes than it would be to just use a NoSQL solution to begin with.<br /><br />I'm not saying MongoDB is a fit for every problem, I'm just saying you should check it out. It's a flexible and powerful tool to keep in your belt, and you can become proficient in it *very* quickly.Rick Copelandhttps://www.blogger.com/profile/11612114223288841087noreply@blogger.comtag:blogger.com,1999:blog-18508356.post-52069968928987779252011-10-31T17:33:33.339-04:002011-10-31T17:33:33.339-04:00Given that I've never worked on large django a...Given that I've never worked on large django application, did you think that to speed up queries, memcached (django supports it, right?) isn't a good solution?<br /><br />I've read some discussions on a python web developers group on linkedin, that many django developers are using memcached and/or redis.Davide Ferrerohttp://www.davideferrero.comnoreply@blogger.comtag:blogger.com,1999:blog-18508356.post-56134516451424782822011-10-31T16:36:39.221-04:002011-10-31T16:36:39.221-04:00Well, Django's ORM can certainly give a relati...Well, Django's ORM can certainly give a relational data store the *appearance* of being an object store, it's still a relational datastore under the covers. This can become important particularly when you're using a large number of related objects, which can lead to a) slow running queries or b) large numbers of fast queries, either of which can end up slowing down your web app. <br /><br />You also have to worry more about things like up-front database design and migrations when dealing with relational databases, where you can get a lot further in a NoSQL solution with hand-waving. (You will *eventualy* have to deal with these issues in a big project, but you can delay them until after you're pretty satisfied with your application design).Rick Copelandhttps://www.blogger.com/profile/11612114223288841087noreply@blogger.comtag:blogger.com,1999:blog-18508356.post-57704291706073718272011-10-31T16:30:50.244-04:002011-10-31T16:30:50.244-04:00But why using a non-rel db on a framework (django)...But why using a non-rel db on a framework (django) that work with object on relational db? In my opinion the best feature of django's orm is that it transform your object and save it on relational db. Isn't like that?Davide Ferrerohttp://www.davideferrero.comnoreply@blogger.comtag:blogger.com,1999:blog-18508356.post-73006471939823715222011-10-31T16:09:05.500-04:002011-10-31T16:09:05.500-04:00@Anonymous: there's a lot to be said for just ...@Anonymous: there's a lot to be said for just using the 'raw' Python driver pymongo (http://blog.fiesta.cc/post/12167731260/on-object-document-mapping is a post advocating such an approach). I am the author of Ming (http://sf.net/projects/merciless/), a library providing an object/document mapper for MongoDB, so I like it quite a bit, but I don't know about using it with Django. MongoEngine (http://mongoengine.org) seems to take a more Django-ORM approach that Ming, so you might want to look at that as well (Ming tries to look more like SQLAlchemy).Rick Copelandhttps://www.blogger.com/profile/11612114223288841087noreply@blogger.comtag:blogger.com,1999:blog-18508356.post-78852299140656864062011-10-31T16:03:16.334-04:002011-10-31T16:03:16.334-04:00What is the best way to use mongoDB with django?
S...What is the best way to use mongoDB with django?<br />Should it be used with the ORM?Anonymousnoreply@blogger.com