On 05/10/2011 09:11 PM, Venkatraman S wrote:
@Shawn : can you elucidate on how your system with MongoDB performs?
-V
If you mean what is the performance penalty I couldn't really say. Our
user-base is fairly small, so I don't know what the penalty is. If you
want to know how it works, it's really pretty much as I described earlier.
1. post_save hook
2. serialize instance
3. Add datetime.now() as timestamp
4. Add user pk to dictionary via threadlocals*
5. Save instance to MongoDB collection named by using the instance's
app_label + object_name (or dbtable)
6. MongoDB database backed up daily in case of tampering/data loss.
7. Some nifty macros saved in iPython we use to view changes of a
specific instance over time and who made them.
8. A cron job that prunes duplicate audit log entries (an instance may
be saved many times without actual changes occurring, so we delete
duplicate entries, keeping only the oldest audit entry with the same
field values).
Shawn
*For anyone who wants to complain don't bother unless you have a better
way that works. It works for us with our deployment stack and nothing
else does the trick. Re-writing all our code and all third-party modules
to receive a user kwarg is not a viable option.
--
You received this message because you are subscribed to the Google Groups "Django
users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.