next up previous contents
Next: OSCommonInterfaces Up: The OS Library Components Previous: The OS Library Components   Contents


OSAgent

The OSAgent part of the library is used to facilitate communication with remote solvers. It is not used if the solver is invoked locally (i.e. on the same machine). There are two key classes in the OSAgent component of the OS library. The two classes are OSSolverAgent and WSUtil.

The OSSolverAgent class is used contact a remote solver service. For example, assume that sOSiL is a string with a problem instance and sOSoL is a string with solver options. Then the following code will call a solver service and invoke the the solve method.

OSSolverAgent *osagent;
string serviceLocation = http://gsbkip.chicagogsb.edu/os/OSSolverService.jws
osagent = new OSSolverAgent(  serviceLocation );
string sOSrL = osagent->solve(sOSiL, sOSoL);
Other methods in the OSSolverAgent class are send, retrieve, getJobID, knock, and kill. The use of these methods is described in Section 10.3.

The methods in the OSSolverAgent class call methods in the WSUtil class that perform such tasks as creating and parsing SOAP messages and making low level socket calls to the server running the solver service. The average user will not use methods in the WSUtil class, but they are available to anyone wanting to make socket calls or create SOAP messages.

There is also a method, fileUpload in the OSAgentClass that is used to upload files from the hard drive of a client to the server. It is very fast and does not involve SOAP or Web Services. The fileUpload method is illustrated and described in the example code fileUpload.cpp described in Section 12.2.


next up previous contents
Next: OSCommonInterfaces Up: The OS Library Components Previous: The OS Library Components   Contents
Kipp Martin 2008-01-16