On Fri, Oct 4, 2013 at 10:59 AM, Stefano Danzi <s.da...@hawai.it> wrote:
> Hi Laurens, > many thanks for yours considerations. > > 1) I don't have problems about latency but I can't halt all during the > computation. Why not? > I can defer the computation for minutes if I attach to data the timestamp > related to when data arrives. > Sure, gettimeofday is a thing, that shouldn't be a problem. > 2) The "monster" machine that have to do all is an embedded pc based on > 1000MHz AMD Geode NX1500 > Okay, so single core. > 3) The long computation need only the data. In extremis I could write data > on a file or DB and compute using another program. > I would imagine you do that anyway for persistence reasons with the results :) > I bit better explanation of scenario: > > The radiomodem take "unexpected data" from a network of varius sensors. > The sensors could be reachable or not. > The only way to know when the sensor is reachable is to wait fo > "unexpected data". If I need to send data to a specific sensor > I have to do it immediatly after it send me "unexpected data", wait also 1 > second could be sufficient to have the sensor no longer reachable. > I can't send data to sensor and after do computation because meanwhile > could arrive data from another sensor. > Mainly it is the reason because I think to defer long computation to > another thread.. > Okay, so try with threads first, and hope that the scheduler lets your reactor thread work often enough. If that doesn't work, do the computation in a subprocess, and hope that nice works well enough :) lvh
_______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python