ropensci / jstor

Import journal data from DfR (JSTOR)
https://docs.ropensci.org/jstor
47 stars 9 forks source link

Consider using furrr #59

Closed tklebel closed 6 years ago

tklebel commented 6 years ago

The API for the user would look like this:

library(future)
library(jstor)

plan(multiprocess)

jst_import_zip("file.zip", ...)

This would reduce the number of explicit dependencies (by swapping out foreach, snow and doSNOW) with furrr. future would be installed as a dependency to furrr, and could be listed as suggests, since it is not strictly necessary for the package to work.

Another benefit would be reducing the number of arguments to jst_import_zip, and it gives users more control about how the computation is actually distributed.

Internally, we would simply use future_map instead of the whole machinery of doSnow and foreach, etc.