@fxi/shiny-cluster

Launch a Shiny app in multiple workers using node js

Stats

stars 🌟issues ⚠️updated 🛠created 🐣size 🏋️‍♀️
330Apr 21, 2018Jul 9, 2015Minified + gzip package size for @fxi/shiny-cluster in KB

Readme

shinyCluster

shinyCluster is a simple Node.js module for launching a single R shiny application in a cluster of workers and keep track of sessions.

This is an experimental project. Please send me a feedback if you find this script useful.

Other ways

Usage

Prerequisite

Install

npm install @fxi/shiny-cluster --save

Example

Launch the default app

var shinyCluster= require('@fxi/shiny-cluster');

/**
 * Launch a simple shiny app ( located in `./example` ),
 * using 3 workers and
 * listen on port 3456
 */
shinyCluster.run({
  path : "./example/app.R" // path to directory of shiny app or app.R file
  concurency : 3,
  port : 3456
});

Launch your app

var shinyCluster= require('@fxi/shiny-cluster');

/**
 * Launch your shiny app
 * located here `/home/john/myShinyApp/app.R`,
 * using 10 workers and
 * listen on port 3434
 */
shinyCluster.run({
  path : '/home/john/myShinyApp' ,
  concurency : 10,
  port : 3434
});

Contribution

yes please !

Change logs

0.0.6 -> 0.0.8

  • wait on shiny app to be ready using stderr output (not really clean)
  • setup config: timeoutConnect, timeoutListen, nTry
  • set option for host

0.0.5 -> 0.0.6

  • wait on shiny port to be available using net.connect
  • better error handling

0.0.2 -> 0.0.5

  • paths issues
  • better example

0.0.1 -> 0.0.2

  • build a node module
  • use sticky-cluster
  • simplify everything

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.