sleigh-class {nws}R Documentation

Class "sleigh"

Description

Class representing sleigh

Objects from the Class

Objects can be created by calls of the form new("sleigh", nodeList, ...).

  • {bf nodeList:} a list of hosts that workers will be created. Default is to start up three workers on local machine.
  • {bf launch:} method to launch remote workers. Default is ssh.
  • {bf master:} master sleigh's machine name. Default is the value returned from Sys.info()$[$'nodename'$]$.
  • {bf nwsWsName:} template name to create sleigh workspace. Default is 'sleigh_ride_%010d'.
  • {bf nwsHost:} host name of the netWorkSpaces server. Default is the machine where sleigh starts up.
  • {bf nwsPort:} port number of the netWorkSpaces server. Default is 8765.
  • {bf outfile:} remote workers' standard errors will be redirected to this file. Default is /dev/null.
  • {bf scriptDir:} location of the sleigh worker script.
  • {bf user:} user name. Default is the value returned from Sys.info()$[$'user'$]$.

    Slots

    nodeList:
    Object of class "character" representation of a list of host names where workers are created.
    nws:
    Object of class "netWorkSpace" representation of the sleigh workspace.
    nwsName:
    Object of class "character" representation of the sleigh workspace name.
    nwss:
    Object of class "nwsServer" representation of the netWorkSpaces server that this sleigh workspace connects to.
    options:
    Object of class "environment" representation of the optional enviroment variables.
    state:
    Object of class "environment" representation of the sleigh state.
    workerCount:
    Object of class "numeric" representation of the number of sleigh workers.

    Methods

    initialize
    signature(.Object = "sleigh"): sleigh class constructor.
    eachElem
    signature(.Object = "sleigh"): evaluate the given function with multiple argument sets using the workers in sleigh.
    eachWorker
    signature(.Object = "sleigh"): evaluate given function exactly once for each worker in sleigh.
    stopSleigh
    signature(.Object = "sleigh"): shutdown workers and remove sleigh workspace.

    Details

    There are three different launch methods (ssh, lsf, and web) to tailor client's working environment. see examples section.

    Examples

    ## Not run: 
    # Default option: create three sleigh workers on local host
    s = sleigh()
    # Or, 
    s = new('sleigh')
    
    # Create sleigh workers on multiple machines
    s = sleigh(c('n1', 'n2', 'n3'))
    
    # Use LSF instead of SSH for remote login. 
    # to login to remote machines. 
    s = sleigh(launch=lsfcmd)
    
    # Use web launch
    s = sleigh(launch='web')
    
    ## End(Not run)
    

    [Package nws version 1.2.3 Index]