igraph-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [igraph] Re: Re: Callback for long metric calculations.


From: Tamas Nepusz
Subject: Re: [igraph] Re: Re: Callback for long metric calculations.
Date: Fri, 5 Dec 2008 23:15:10 +0000

Hi Chris,

I'm wondering what kind of issues I am going to run in to if I use the processing.Process class from pyprocessing along with the igraph.set_progress_handler method (process memory copy?).
You might try the following:

- spawn a new process with pyprocessing and build a shared queue between the parent and the child process (I think the Queue object in pyprocessing does exactly this, but I'm not sure, I've never used pyprocessing) - set the progress handler in the child process to put the progress report in the queue - make the parent process regularly poll the queue and print the progress report accordingly.

These are mainly ideas I have brewing about optimizing making multiple calculations. I'm also looking to slap a web interface on it, which can timeout if I make it wait for calculations to finish.
If you are planning to implement a web interface, maybe you'll find one of my older side-projects useful; this is a simple HTTP-based server-client application where the server maintains a job queue and sends the jobs in the queue to the clients that perform the calculation, repeatedly report the progress and finally send back the result to the server. Job progress can be monitored from any web browser that has access to the server. I used that for calculating properties of graphs generated according to a given graph model with various parameters -- the job description included the parameters only, the clients generated the graphs, calculated the necessary properties and sent back the results. I have never released it and it definitely needs a lot of polishing, but anyway, if it might be useful for you, let me know and I'll try to find the source code.

--
Tamas





reply via email to

[Prev in Thread] Current Thread [Next in Thread]