@fxi/shiny-cluster

0.0.8 • Public • Published

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

Package Sidebar

Install

npm i @fxi/shiny-cluster

Weekly Downloads

1

Version

0.0.8

License

MIT

Unpacked Size

10.1 kB

Total Files

8

Last publish

Collaborators

  • fxi