Giter Site home page Giter Site logo

relixir's Introduction

relixir

R/Elixir bindings for a more scalable, concurrent, fault-tolerant, distributed web tech world intimately connected to the R data science ecosystem.

Goal

Position R firmly in the high-traffic web application world, where stability and performance under massive concurrency and load are a right, not a pay-walled privilege.

Why?

Because Shiny (shinyapps.io and Shiny Server Pro) and RStudio Connect are often prohibitively expensive (e.g., $74,995 per year for 1000 named users, with each additional named user packs of 250 for $14,995) and are often too slow to load and/or run. Alternatives like openCPU and fiery are needed and very welcome, but can they support 2 million concurrent connections on a single server like Elixir can? And that was from 2015! By contrast, Shiny just recently announced the ability to handle 10000 active users at rstudio::conf 2018 (skip to 17:16 in this video for live demo and applause).

Impact

For Elixirians, relixir will open up the R data science ecosystem of packages (CRAN and Bioconductor), making it native to call any statistics, machine learning, visualization, or bioinformatics library directly from within Elixir. For useRs, relixir will open up high-availability enterprise-scale web applications deployable through Digital Ocean, SSD Nodes, AWS, etc.

Rage against the machine

Paywalling web applications is good business but bad for the open-source community and can often be a slippery slope -- if one had a dollar to give every time they heard "use Python for building serious large-scale web apps", (s)he would be bankrupt. For the Djangonauts out there, the following can be a sobering read from a fellow Djangonaut.

Open-source community outreach

At Bioquilt, we use Elixir to power our web stack while using R and Python to power our data science and machine learning. Other companies using Elixir and open-sourcing tools for the community include Pinterest and WhatsApp, recently sold to Facebook for $16 billion. Here's a list of 10 companies that use Elixir in production.

Roadmap

  • Extend erserve from Erlang to Elixir for the purposes of making calls to R from Elixir (where Elixir is effectively "Erlang++")
  • Trailblaze new code for calling Elixir from R
  • Once R <--> Elixir bridge is complete, wrap up the methods into a package like reticulate

On-going work

At the time of this writing, relixir provides a wrapper around the R command-line utility littler. Relixir supports executing a chunk of R code, returning a variable in the format of an R-object, or a JSON string. Support for R-object is intended for a future feature: piping R-returned output in Elixir style. For direct use of the output, JSON is recommended.

Below are some example calls of Relixir.runR. bioq repo gives an example how Relixir can be used to provide R computational service in a web-app.

# Generate n samples from the normal distribution with default mean and sd, return a histogram in JSON format
rCode = """
    x <- rnorm(n=#{size})
    y <- hist(x,plot=FALSE)
    """
result = Relixir.runR(rCode, "y", %{"output" => "json"})
# Read a csv file and return the column names
cnames = Relixir.runR("""
    X <-read.csv("#{csvFilePath}")
    cnames <- colnames(X)
    ""","cnames")

Prospective contributors

Interest and/or skills in R internals and/or Elixir software development required.

Authors

Trang Tran and Bohdan Khomtchouk, Ph.D.

Preliminary testing

Prelim testing is temporarily being conducted in bioq.

relixir's People

Contributors

ttdtrang avatar bohdan-khomtchouk avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.