Let assume I have computer A and a variable x which updated very frequently, and also takes some time for this update( Lets say: asked to be updated every sec and update tooks 0.5 sec).
Now, once a minute, I have computer B which asks in a HTTP GET request for x's value. A sends him a copy of x.
Because x might be used by A, I need to make sure that nothing gets wrong.
How can I assure it? What are my options for doing this?
I Think you can return x in function callback.
or like twisted reactor.callLater, server B could ask twice waiting for A get lasted result. but x update per-second, i may lead to other servers always request。
How to send constantly updated data in http request?