[Chinook] Re: Chinook_for_Brain_research
Stephen Montgomery
smontgom at bcgsc.bc.ca
Fri Jun 24 10:40:11 PDT 2005
Hi
Yes this is already set up through the ApplicationClient class where you
can ask individual servers how many jobs are they processing. The
mediator could uses the mode "RMI" or "WSDL" and the endpoint URI
"http:/chinook01:8080/axis/services/ApplcationServerImpl" when
instantiating the ApplicationClient and then determine which one is the
fastest. To get this information, use the ServiceManager (it is a
singleton) and ask for the services in the cache. Each service has a
getServiceLocation (the endpoint) and a getMode method (which are in
turn the parameters to pass to the ApplicationClient.
Here is an example:
Service[] services = ServiceManager.getInstance().getKnownServices();
Service idleService;
int count = -1;
for (int i = 0; i < services.length; i++) {
if (services.getService().equals("MYSERVICENAME")) {
try {
ApplicationClient ac = new
ApplicationClient(service.getMode(), service.getService());
int c = ac.jobsBeingProcessedOnServerCount();
if (count == -1 || c < count) {
idleService = service[i];
count = c;
}
} catch (ServiceFailedException sfe) {
//the server is unavailable, or is running a
backwards-incompatible version of the remote interface
}
}
}
The use the idleService to forward your job to (with the JobManager
class, also a singleton) method
public synchronized Integer runJob(Service service, DefaultParameter[]
app_params,
DEOSet[] deosets)
Hth.
Stephen
astakhov wrote:
> About Chinook.
>
> I install (with some minor modification) a few Chinook nodes here at
> UCSD.
> I attached several our servers that we call mediators to that nodes.We
> made couple wrappers integrate Mediators with Chinook.
>
> Now, we have several client application (Java) that can be used to
> send requests to Mediators. I would like to use Chinook as a light
> fraimwork (simular to Globus but without Globus overhead).
>
> Currently, each Chinook server (I run 3 ) handle multiple Mediator
> Servers (I run 4).
> So, my java client probably can send request over RMI/SSL to Chinook
> Client that can see which Chinook Server less busy (has less submitted
> jobs) and send request through less bussy Chinook Server to one of
> Mediator.
>
> This is our typical case . Can we do that ?
>
> Vadim.
More information about the chinook
mailing list