Send a request for data as referenced by a list of href's, with the response to be returned asynchronously.

async_pull(hrefs, ...)

Arguments

hrefs

Character vector of href references for data objects

...

Kept for future methods

Details

Locations for the data referenced by the href vector are attained, with the containing nodes requested to send the data when available. Data can be obtained from the underlying message queue after it is posted.

Value

Closed file descriptors of the locations sought.

See also

Examples

##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--  or do  help(data=index)  for the standard data sets.

## The function is currently defined as
function (hrefs, ...) 
{
    if (!length(hrefs)) 
        return()
    stopifnot(is.character(hrefs))
    locations <- get_locations(hrefs)
    hrefs_at_locs <- split(hrefs, as.factor(locations))
    mapply(function(location, hrefs) orcv::send(location, paste0("GET /async/data/", 
        paste(hrefs, collapse = ","))), unique(locations), hrefs_at_locs)
  }
#> function (hrefs, ...) 
#> {
#>     if (!length(hrefs)) 
#>         return()
#>     stopifnot(is.character(hrefs))
#>     locations <- get_locations(hrefs)
#>     hrefs_at_locs <- split(hrefs, as.factor(locations))
#>     mapply(function(location, hrefs) orcv::send(location, paste0("GET /async/data/", 
#>         paste(hrefs, collapse = ","))), unique(locations), hrefs_at_locs)
#>   }
#> <environment: 0x5642faba7d28>