R
R
Ruslan Luxurious2014-10-15 02:17:53
Django
Ruslan Luxurious, 2014-10-15 02:17:53

Who knows a package for Django to store intermediate data in NoSQL?

Task:
There is a certain model, fields (int, float) change every n-milliseconds, they may not change. Be sure to save. (The calculations are performed by third-party python-workers). I do not want to save every time in the ORM (I use PostgreSQL), so as not to load the database.
Problem:
I don't know what this process is called. Just the opposite is googled - caching. But I need to do the opposite - save the subtotals of calculations in NoSQL, preferably something integrated with django-orm. Tell me please.
UPD:
Ideally, you want something like:

class CustomModel(models.Model):
    @sync(idle=1000)
    custom_field=models.FloatField()

and continue to use it as a regular orm, if the model has changed during idle-time - save it in NoSQL, otherwise if the idl-time has expired - save it in Postgres.
UPD2:
Now I use the following - I override save () in the model where I check the saved field and write the value where necessary. Just looking for a more elegant solution.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
bromzh, 2014-10-15
@bromzh

Celery . Just when you get a result, you create a new task, and it starts itself (for more details, see the docks). Celery has an integration with the djanga admin panel, you can view task statuses directly in it. And the NoSQL database itself can be mongo. Fast recording, fast index search, integration with ORM seems to be present.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question