Uživatelské nástroje

Nástroje pro tento web


projekty:computation_web_service

Web service for manipulating and controling the computation on grid

is available on this URL http://physiome.lf1.cuni.cz:80/boincservice/masterservice1 The WSDL resides on this URL: http://physiome.lf1.cuni.cz/boincservice/masterservice1/WSDL The WSDL can be viewed also in Firefox or IE (not chrome). Access is allowed from faculty machines and medicus cesnet nodes, otherwise the „HTTP 403 forbidden“ is returned for security reason. The web service allows these functions:

 byte[] getOutput() 

If all the subresults are finished then returns the final results, otherwise returns zero array of bytes.

 int getState() 

returns percentage of processed tasks - valid results are 0-100, if 100 percent of tasks are processed then getOutput() function will return final results.

int submitComputationExe(string name, byte[] computationExe)

accepts name of computationExe and binary content of the computationExe. Not yet implemented and it will be deprecated for security reason

int submitInput(byte[] computationInput)

accepts binary input, this input is immediatelly splitted to the subparts and a computation work is registered with these subparts and started, after that BOINC clients can use standard BOINC protocol to request new tasks returns 0 if computation is submitted and started, returns -1 if computation is not submitted and started because of some previous computation is in progress

string test(string message)

accepts string message which is returned back to the sender, some debug information are logged into master service logs. Use it only to test availability of webservice and for debuging mastser service state.

To use this web service in .NET (C#):

  1. in „Solution Explorer“ right click „Service References“ select „Add Service Reference“,
  2. put the WSDL URLhttp://physiome.lf1.cuni.cz/boincservice/masterservice1/WSDL“ and click „Go“
  3. optionally change the Namespace from „serviceReference“ to „MasterServiceReference“
  4. Click „OK“
  5. Configure the client to accept binary attachments (XOP/MTOM standard), edit the application configuration (app.config)
    1. find messageEncoding attribute inside the binding element:
           <binding name="MasterService" ... 
            messageEncoding="Text" ... >
    2. change value it to Mtom
           <binding name="MasterService" ...
             messageEncoding="Mtom" ... >
    3. save

6 - inside C# code, declare the clien stub and you may call submitInput(), wait until the getState() returns 100 and then call getOutput():

      MasterServiceReference.MasterServiceClient masterService;
      boincService = new MasterServiceReference.MasterServiceClient();

      boincService.submitInput();

      do
          {
              System.Threading.Thread.Sleep(10000);
              state = boincService.getState();
          } while (state < 100);

     boincService.getOutput();
projekty/computation_web_service.txt · Poslední úprava: 2010/09/07 07:14 autor: tomaton