S
S
Stanislav Somov2016-11-02 02:57:35
Python
Stanislav Somov, 2016-11-02 02:57:35

Working with a variable (register) from multiple Python scripts?

There are several service scripts. One service polls a number of sensors in a loop and writes data one by one to the mongo database. The same service reads documents and changes sensor parameters. The second service processes this data and displays it. The third service transforms. There is no need to record the history of all data. Since mongo is not in memory, I care how long the ssd hard will last when documents are constantly overwritten (100 documents per second.) Is there a variant of global variables available in the system to several applications. Also, on the side of the first service, I would like to set the priorities for reading and writing sensors (so that the parameters would be written first in the cycle if necessary)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
Дмитрий, 2016-11-02
@DarkDemon

Можно использовать Redis.
К тому же в MongoDB есть in memory engine: https://docs.mongodb.com/v3.2/core/inmemory/

B
Berloga, 2016-11-02
@Berloga

Используйте redis/celery

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question