lhgergo / remete

An easy-to-use, multi-protocol framework for task outsourcing on remote computers directly from R.
0 stars 0 forks source link

Async task management on server #1

Closed lhgergo closed 3 years ago

lhgergo commented 3 years ago

I would like to give the opportunity for the server to handle multiple parallel requests. To perform this I will change the purpose of the server. Instead of running the incoming tasks, it will only create a new R instance, which executes the commands coming from the client. When the session is ready, we have two options:

  1. the server will return the results,
  2. the R subprocess executing the commands will return results to the cloud.
lhgergo commented 3 years ago

I checked a few options to solve this.

  1. future_promises
  2. future::plan("multicore")
  3. rcall::r_bg. This one seems to be the most useable for our purpose. Includes error handling as well.
lhgergo commented 3 years ago

Done via callr::r_bg.