Reputation: 26442
In my web app, I need to store some python lists, probably to some database. This list contains query data and are used to run some scheduled tasks, The list items are no way related.
two lists created at different times may look something like this
# list one
list_one = ['item-1', 'item-2']
# list two
list_two = ['item-1', 'item-3']
The given lists may contain any number of elements (upto 750), (1 < x < 750
), and the number of lists will be atmost 1000.
combining the lists before running the scheduled task,
#combining and removing duplicates.
list_final = ['item-1', 'item-2', 'item-3']
The list data is temporary, its cleared once everyday after some internal processing.
my current database is postgresql 9.2.
Since its not relational data, should I consider NoSQL databases?
What database is ideal for this use? or Should I consider file system?
thanks.
Upvotes: 0
Views: 104
Reputation: 1011
The best solution for that is a NoSQL database with replication and an application server inside. Using this, you can script all the logic inside a database. You can think a database as a real application server for running scheduled tasks, but unlike common appserver with durability guarantee and consistency guarantee. So you don't care about that one of your servers is down, because in the case of appserver inside a database all the jobs will be completed anyway and all the data will be consistent and exactly the same after switch from the fallen master to the replica.
Upvotes: 1