Open varrunr opened 10 years ago
After reviewing some sample programs/tutorials with ZODB, I like ZODB. Its perfect for the Message Daemon. On the other hand, it might make take significant migration time to shift to ZODB from SQLlite. I can volunteer to test out ZODB by using it with the Message Daemon in a new branch. I can create the initial classes for use. However, a volunteer would be needed to test out Django ZODB interopability and analyze how difficult/time intensive a migration could be?
This is really interesting. I did some reading on ZODB / Django / Etc. There is a python module called django_zodb, whiich integrates the two, but it's code hasn't been updated past Django 1.2.
ZODB does seem to be the road less traveled. :)
From what I read:
model.objects.get(filter=xxx)
@varrunr, can you explain how you see ZODB benefiting this project? Should issue #10 be fixed before doing this?
I'm by no means an expert in ZODB.
ZODB doesn't replace sqlite3 in the project
It can. The question is, should it?e.g. Like instead of the User Model, we just have a persistent User class which writes to disk on any changes in the User class members.
I'm confused how this would affect things like model.objects.get(filter=xxx)
That is what will have to be investigated. From my previous comment "a volunteer would be needed to test out Django ZODB interopability..."
can you explain how you see ZODB benefiting this project?
The reason I created this issue because yourself and Ranjith brought it up in Issue #2 and we need arrive at a conclusion. I've outlined the Pros and Cons in the wiki. The only significant advantage I see is the message daemon can easily sync messages if we use an object oriented database. e.g. If we have a class Message, with Message.id being unique, it will be much easier(in terms of development) for the daemon to look up/write database entries as objects than read, write to and query a SQL database.
My personal opinion is, we don't know enough about ZODB to be making such a drastic shift and I believe its better to continue with SQLlite3(which plays well with Django) at the moment. However, If someone is confident enough in this change, it might worth it, else not.
Should issue #10 be fixed before doing this?
Issue #10 is unrelated to this.
@varrunr I think you're right about not shifting until we're confident enough to do so.
I'm guessing that we're not going to do anything about this for now, hence the label.
SQLite is fine for development, but when you go into production you should really use something else. Here is a decision tree that might help out. Postgres generally plays along very nicely with django. But there might be a better choice considering your use of messaging. I'm not sure.
As to why not using SQLite, it's not fully acid compliant and you can't have multiple writes to the database at the same time.
Do we migrate from SQLlite to ZODB? Why or Why not?
https://github.com/WiseEarthTechnology/CrisisCommunicator/wiki/Which-database-to-use%3F
Please use issue for discussion related to the topic and wiki for a formal record.