17 ms·
If transactions are the biggest problems, there are driver solutions like http://godoc.org/labix.org/v2/mgo/txn http://godoc.org/labix.org/v2/mgo/txn for that.
by jraedisch 12y ago
If transactions are the biggest problems, there are driver solutions like http://godoc.org/labix.org/v2/mgo/txn http://godoc.org/labix.org/v2/mgo/txn for that. I am not sure, how they compare to "real" transactions.
Still missing "joining" in some cases though. Otherwise I am ok with MongoDB so far.
- stephen123 12y agoIf another host connects to the db, and the transaction doesn't span to that second host. Its not as safe as sql transactions.
- niemeyer 12y agoThe transaction does span across hosts with the linked package.
- politician 12y agoJeez. Please do not mention client-library-managed transactions and then put "real" transactions in scare quotes. At least read the Wikipedia article first.
- jraedisch 12y agoI just wanted to distinguish between the two. I wasn't scared in any way but read up on scare quotes now - so thanks for that. http://en.wikipedia.org/wiki/Scare_quotes http://en.wikipedia.org/wiki/Scare_quotes
- StavrosK 12y agoI didn't read it like that at all, I interpreted it as the gp distinguishing between the two.
- niemeyer 12y agoThere are further details about how it works in this blog post: http://blog.labix.org/2012/08/22/multi-doc-transactions-for-mongodb http://blog.labix.org/2012/08/22/multi-doc-transactions-for-... While it does work, it's still a workaround for the lack of first-class transactions in MongoDB. It offers a more limited API and requires care on the developer side. Despite being the author, I do hope it gets obsoleted by more convenient first-class transaction support in MongoDB itself at some point in the near future.