Hi Stephan, Adam
A very nice Idee but it ignores the most important aspects of mongodb.
And this is exactly what I was preventing to do with m01.mongo.
I still think it's just wrong to implement multi-object transactions
with a mongodb backend. And this is what mongopersist is based on.
m01.mongo was developed with the focus to offer everything
you need for atomic object transactions and offers all you need
for implement rollback concepts at an application level.
In my point of view an application using the mongodb must be implemented
in parts or called services. Each of them must handle it's
own part in atomic transactions and this could make an
application stable. A persistent layer using multi-object transactions
can't do that.
Here are some short examples what we do with m01.mongo.
We allways store or change one item in one transaction.
Everything else is done in background tasks. e.g.
- remove references (based on items data)
- remove items (we just mark them as removed in a transaction)
- update references (based on items data)
- archive items
- create invoice items (based on items data)
This means if one item changes and other things needs to be done,
do it explicit, rollback or do what your apps need to do in another
transaction. Rolling back a "master" transaction isn't possible if
the database doesn't support this. That's the responsibility of
Everything else could and in my experience with mongodb it will fail.
But the good thing is, a concept like described above could also
get implemented with mongopersist. But then, you need to
catch much more use case based on the DBRef in mongopersist
then with m01.mongo.
Anyway I highly recommend to anybody only using mongopersist and
of corse also m01.mongo if you know how to implement rollback and
catching other sideeffects in our app by your own. Or you will quickly
see what this could mean not having a multi-object transaction based
database by our own.
> -----Ursprüngliche Nachricht-----
> Von: zodb-dev-bounces+dev=projekt01...@zope.org [mailto:zodb-dev-
> bounces+dev=projekt01...@zope.org] Im Auftrag von Stephan Richter
> Gesendet: Dienstag, 8. November 2011 19:50
> An: li...@zopyx.com
> Cc: firstname.lastname@example.org
> Betreff: Re: [ZODB-Dev] Persisting Python objects in MongoDB
> On Tuesday, November 08, 2011 07:25:34 AM Andreas Jung wrote:
> > Very cool and excellent work.
> Thanks very much! I appreciate it, especially after your initial reaction
> the #mongo IRC channel. :-)
> Entrepreneur and Software Geek
> Google me. "Zope Stephan Richter"
> For more information about ZODB, see http://zodb.org/
> ZODB-Dev mailing list - ZODB-Dev@zope.org
For more information about ZODB, see http://zodb.org/
ZODB-Dev mailing list - ZODB-Dev@zope.org