[chimera-dev] asynchronous running of Chimera extensions
Marcin Pawlowski
marcinp at genesilico.pl
Thu Aug 19 04:43:19 PDT 2010
Thanks a lot!.
It seems to perfectly answer our question.
Cheers
Marcin
Quoting Conrad Huang <conrad at cgl.ucsf.edu>:
> Eric gave a better answer than I could for web services. For
> running local jobs, there is a new example in the programmer's guide
> (see http://www.cgl.ucsf.edu/chimera/docs/ProgrammersGuide/Examples)
> under "Running a Background Process".
>
> Conrad
>
> On 8/17/2010 12:22 PM, Marcin Pawlowski wrote:
>>
>>
>> Thanks a lot for the email you sent me.
>>
>> Now I need to talk to one of my coworkers- Sebastian Opalczynski, who
>> will be at work next week. We will touch you soon.
>>
>> Cheers
>>
>> Marcin
>>
>>
>>
>> Quoting Eric Pettersen <pett at cgl.ucsf.edu>:
>>
>>> On Aug 16, 2010, at 3:54 PM, Marcin Pawlowski wrote:
>>>
>>>> Great. Thanks a lot.
>>>>
>>>> We using both of them 1) using a web service and 2) running the
>>>> program on the local machine.
>>>
>>> Hi Marcin,
>>> Unfortunately Conrad is sick today, so I'll try to answer the web
>>> service question without causing too much damage. :-) So the answer
>>> depends a bit on how the back-end web service is implemented. If it's
>>> implemented as an Opal service, you should look at the
>>> StructureDiagram.ws module, in particular the
>>> CDKDepictionService._runAsTask method. It's probably more efficient
>>> for you to ask questions about the code than to have me explain it
>>> line by line. Besides, I think it's actually pretty straightforward in
>>> this case.
>>> If the web service is implemented by REST, try looking at the
>>> ModBase.gui module, particularly the FetchScore._submitJob method.
>>> That method posts a multipart form to a REST service and reads back
>>> the result. You could adapt that code and use the same task "wrapper"
>>> that the Opal code uses.
>>> That code doesn't directly use a task wrapper because it is one of
>>> /many/ requests that Chimera will be making to that web service
>>> (usually 10-20 at once), so it uses a queue to prevent overwhelming
>>> the remote server with requests. If your service will be making
>>> multiple requests at once then maybe you would want to do the same
>>> thing. If so, then look FetchScore.__init__ to see how the queue is
>>> set up (the httpq.get(), hq.newSlot(), and slot.request() calls) and
>>> then the end of the FetchScore._submitJob method to see how secondary
>>> requests to the server (if any) can be added to the queue with q.put().
>>> Please feel free to ask more questions!
>>>
>>> --Eric
>>>
>>> Eric Pettersen
>>> UCSF Computer Graphics Lab
>>> http://www.cgl.ucsf.edu
>>>
>>>
>>>> Quoting Conrad Huang <conrad at cgl.ucsf.edu <mailto:conrad at cgl.ucsf.edu>>:
>>>>
>>>>> Chimera has code for running jobs in the background while keeping
>>>>>
>>>>> the GUI active. Some of this code is still under development and I
>>>>>
>>>>> would suggest using the daily build rather than 1.4.1. Here are the
>>>>>
>>>>> relevant modules and an example:
>>>>>
>>>>>
>>>>> chimera.SubprocessMonitor
>>>>>
>>>>> Module for running and monitoring background process
>>>>>
>>>>> chimera.tasks
>>>>>
>>>>> Module for display background tasks in the task manager interface
>>>>>
>>>>> chimera.printer
>>>>>
>>>>> SubprocessMonitor is used in saveImage() to launch background POV-Ray
>>>>>
>>>>>
>>>>> If you are using a web service rather than running the program on
>>>>>
>>>>> the local machine, there are other modules that may be of interest.
>>>>>
>>>>>
>>>>> Conrad
>>>>>
>>>>>
>>>>> On 8/12/10 5:57 AM, Marcin Pawlowski wrote:
>>>>>
>>>>>> Dear Chimera developers.
>>>>>>
>>>>>> Me and of my students are developing a chimera extension to deal with
>>>>>>
>>>>>> protein structures.
>>>>>>
>>>>>> Unfortunately, the execution of our plunging last at least 5 minutes,
>>>>>>
>>>>>> so during this time the chimera program is hinged. We would like to
>>>>>>
>>>>>> execute the program in an asynchronous way.
>>>>>>
>>>>>>
>>>>>> Is it possible?
>>>>>>
>>>>>>
>>>>>> Please do not hesitate to contact us if you require further
>>>>>>
>>>>>> information about our project.
>>>>>>
>>>>>>
>>>>>> Best regards,
>>>>>>
>>>>>> Marcin Pawlowski
>>>>>>
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>>
>>>>>> Chimera-dev mailing list
>>>>>>
>>>>>> Chimera-dev at cgl.ucsf.edu <mailto:Chimera-dev at cgl.ucsf.edu>
>>>>>>
>>>>>> http://www.rbvi.ucsf.edu/mailman/listinfo/chimera-dev
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Chimera-dev mailing list
>>>> Chimera-dev at cgl.ucsf.edu <mailto:Chimera-dev at cgl.ucsf.edu>
>>>> http://www.rbvi.ucsf.edu/mailman/listinfo/chimera-dev
>>>
>>>
>>>
>>> ------------------------------------------------------------------------
>>>
>>>
>>> Scanned for malicious content. See headers for details.
>>>
>>
>
>
>
>
More information about the Chimera-dev
mailing list