[Zope3-Users] Re: Starting thread in object deserialize

Stephan Richter srichter at cosmos.phy.tufts.edu
Thu Jun 1 14:17:45 EDT 2006


On Sunday 16 April 2006 13:39, Alek Kowalczyk wrote:
> I'll try to explain that a wee bit more, here is the Use Case:
>
> I have an IMonitorsContainer containing IMonitor(s).
> When a user creates new Monitor instance (using "Add Monitor" on the
> web), the created Monitor should start thread and periodically perform
> measurements (configured by the user by setting some Monitor's fields)
> in that thread - until the Monitor is deleted (by the user on the web
> interface).
> Or until Zope is eventually stopped/killed. When Zope is later started
> again, the persisted Monitors (i.e configuration of measurement threads)
> should be restored from ZODB, create and start the threads again after
> restored, and continue performing measurements.

I would use Twisted as a server and schedule tasks with the twisted loop. See 
for example:

http://svn.zope.org/Zope3/trunk/src/scheduler/

Regards,
Stephan
-- 
Stephan Richter
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training


More information about the Zope3-users mailing list