The Gridbus Broker

This is a reasonably simple middleware, written in Java, that allows to execute jobs remotely. The user needs to have an account in the remote machines. Gridbus Broker allows the description and configuration of your applications through the use of XML files.

Instructions for installation and utilization

  • Install gridbus broker in your machine (because of some incompatibility of version 3.0, you need to edit the file lib/Broker.hibernate.cfg.xml and comment out the lines related to unicore, alchemi, NetworkWeatherService e SrbMCAT. But check first if the newest version works without commenting out these lines)
  • Inspect the documentation
  • Try some test examples that are in the directory gridbusbroker-3.1.0/examples (copy examples/services/fork.xml to services.xml, copy examples/credentials/credentials.xml to credentials.xml and edit the section related to username/password, copy examples/apps/calc.xml to application.xml)
  • Inspect the source code that is in gridbusbroker-3.1.0/src/core/org/gridbus/broker
  • Write a short report and send me by email with your doubts, difficulties, suggestions, opinions etc.

    Patch to correct an execution bug in the local machine

  • Replace executeCmd in LoadDispatchUtil.java, which is in src/core/org/gridbus/broker/util/dispatchers/LocalDispatchUtil.java by the code below (but first check if your installation is working properly. If it is not, continue with this step):
       public void executeCmd(String cmd) throws Exception{
            logger.debug("LocalDispatcher: Running "+cmd);
           //we don't need to use the ProcRunner here...
           //Runtime.getRuntime().exec(cmd);
            Process child = Runtime.getRuntime().exec("sh");
            BufferedWriter command = new BufferedWriter(
                            new OutputStreamWriter(child.getOutputStream()));
            command.write(cmd);
            command.flush();
            command.close();
            int exec = child.waitFor();
            if (exec!=0)
                    throw new Exception(
                            "Command execution failed !\nReturn code: "+exec+"\nCommand: "+cmd);
        }
    
    
    
    
  • To rebuild gbb: