<p><div><div><div><div data-show-faces="false" data-height="21" data-width="100" data-layout="button_count" data-send="true" data-href="https://www.r-bloggers.com/arrow-and-beyond-collaborating-on-next-generation-tools-for-open-source-data-science/"></div></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="https://blog.rstudio.com/2018/04/19/arrow-and-beyond/"> RStudio Blog</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<p>Two years ago, <a rel="nofollow" href="https://github.com/wesm" target="_blank">Wes McKinney</a> and <a rel="nofollow" href="https://github.com/hadley" target="_blank">Hadley Wickham</a> got together to discuss some of the systems challenges facing the Python and R communities. Data science teams inevitably work with multiple languages and systems, so it’s critical that data flow seamlessly and efficiently between these environments. Wes and Hadley wanted to explore opportunities to collaborate on tools for improving interoperability between Python, R, and external compute and storage systems. This discussion led to the creation of the <a rel="nofollow" href="https://github.com/wesm/feather" target="_blank">feather</a> file format, a very fast on-disk format for storing data frames that can be read and written to by multiple languages.</p>
<p>Feather was a successful project, and has made it easier for thousands of data scientists and data engineers to collaborate across language boundaries. In this post, we want to update you on how we think about cross-language collaboration, and share some exciting new plans.</p>
<h2>Beyond file-based interoperability</h2>
<p>File-based interoperability is a great first step, but is fundamentally clunky: to communicate between R and Python running on the same computer, you have to save out from one and load into the other. What if there were some way to share data in memory without having to copy objects or round trip to disk?</p>
<p>You may have experienced a taste of this if you’ve tried the <a rel="nofollow" href="https://rstudio.github.io/reticulate/" target="_blank">reticulate</a> package. It makes it possible to use Python objects and functions from R. But reticulate is focused on solving only one part of the problem, for R and Python. It doesn’t help pass data from R to Julia, or Julia to Python, or Python to <a rel="nofollow" href="https://spark.apache.org/" target="_blank">Apache Spark</a>. What if there were some way to share data between multiple languages without having to write a translation layer between every pair of languages? That challenge is the inspiration for the <a rel="nofollow" href="https://arrow.apache.org/" target="_blank">Apache Arrow</a> project, which defines a standardized, language independent, columnar memory format for analytics and data science.</p>
<h2>A new data science runtime</h2>
<p>The Apache Arrow project has been making great progress, so we can now start to think about what could be built on top of that foundation. Modern hardware platforms provide huge opportunities for optimization (cache pipelining, CPU parallelism, GPUs, etc.), which should allow us to use a laptop to interactively analyze 100GB datasets. We should also be getting dramatically better performance when building models and visualizing data on smaller datasets.</p>
<p>We think that the time has come to build a modern data science runtime environment that takes advantage of the computational advances of the last 20 years, and can be used from many languages (in the same way that <a rel="nofollow" href="http://jupyter.org/" target="_blank">Project Jupyter</a> has built an interactive data science environment that supports many languages). We don’t think that it makes sense to build this type of infrastructure for a single language, as there are too many difficult problems, and we need diverse viewpoints to solve them. Wes has been thinking and talking publicly about <a rel="nofollow" href="https://www.slideshare.net/wesm/shared-infrastructure-for-data-science" target="_blank">shared infrastructure for data science</a> for some time, and recently RStudio and Wes have been talking about what we could do to begin making this a reality.</p>
<p>These discussions have culminated in a plan to work closely together on building a new data science runtime powered by Apache Arrow. What might this new runtime look like? Here are some of the things currently envisioned:</p>
<ul>
<li>
<p>A core set of C++ shared libraries with bindings for each host language</p>
</li>
<li>
<p>Runtime in-memory format based on the Arrow columnar format, with auxiliary data structures that can be described by composing Arrow data structures</p>
</li>
<li>
<p>Reusable operator “kernel” containing functions utilizing Arrow format as input and output. This includes pandas-style array functions, as well as SQL-style relational operations (joins, aggregations, etc.)</p>
</li>
<li>
<p>Multithreaded graph dataflow-based execution engine for efficient evaluation of lazy data frame expressions created in the hostlanguage</p>
</li>
<li>
<p>Subgraph compilation using LLVM; optimization of common operator patterns</p>
</li>
<li>
<p>Support for user-defined operators and function kernels</p>
</li>
<li>
<p>Comprehensive interoperability with existing data representations (e.g., data frames in R, pandas / NumPy in Python)</p>
</li>
<li>
<p>New front-end interfaces for host languages (e.g., dplyr and other “tidy” front ends for R, evolution of pandas for Python)</p>
</li>
</ul>
<p>When you consider the scope and potential impact of the project, it’s hopefully easy to see why language communities need to come together around making it happen rather than work in their own silos.</p>
<h2>Ursa Labs</h2>
<p>Today, Wes has <a rel="nofollow" href="http://wesmckinney.com/blog/announcing-ursalabs/" target="_blank">announced Ursa Labs</a>, an independent open-source development lab that will serve as the focal point for the development of a new cross-language data science runtime powered by Apache Arrow. <a rel="nofollow" href="https://ursalabs.org/" target="_blank">Ursa Labs</a> isn’t a startup company and won’t have its own employees. Instead, a variety of individuals and organizations will contribute to the effort.</p>
<p>RStudio will serve as a host organization for Ursa Labs, providing operational support and infrastructure (e.g., help with hiring, DevOps, QA, etc.) which will enable Wes and others to dedicate 100% of their time and energy to creating great open-source software.</p>
<p>Hadley will be a key technical advisor to Ursa, and collaborate with Wes on the design and implementation of the data science runtime. Hadley and his team will also build a dplyr back end, as well as other tidy interfaces to the new system.</p>
<p>It might sound strange to hear that Wes, who is so closely associated with Python, will be working with RStudio. It might also sound strange that RStudio will be investing in tools that are useful for R and Python users alike. Aren’t these languages and tools out to succeed at each other’s expense? That’s not how we see it. Rather, we are inspired to work together by the common desire to make the languages our users love more successful. Languages are vocabularies for interacting with computation, and like human vocabularies, are rich and varied. We succeed as tool builders by understanding the users that embrace our languages, and by building tools perfectly suited to their needs. That’s what Wes, Hadley, and RStudio have been doing for many years, and we think everyone will be better off if we do it together!</p>
<p>We are tremendously excited to see the fruits of this work, and to continue R’s tradition of providing fluent and powerful interfaces to state-of-the-art computational environments. Check out the <a rel="nofollow" href="https://ursalabs.org/" target="_blank">Ursa Labs</a> website for additional details and to find out how you can get involved with the project!</p>

	<p>
<div>
<div>To <strong>leave a comment</strong> for the author, please follow the link and comment on their blog: <strong><a href="https://blog.rstudio.com/2018/04/19/arrow-and-beyond/"> RStudio Blog</a></strong>.</div>
<hr>
<a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers.com</a> offers <strong><a rel="nofollow" href="https://feedburner.google.com/fb/a/mailverify?uri=RBloggers">daily e-mail updates</a></strong> about <a rel="nofollow" href="https://www.r-project.org/" title="The R Project for Statistical Computing">R</a> news and <a rel="nofollow" href="https://www.r-bloggers.com/search/tutorial" title="R tutorials">tutorials</a> on topics such as: <a rel="nofollow" href="https://www.r-bloggers.com/search/data%20science" title="Data science">Data science</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/Big%20Data" title="Big Data">Big Data, <a rel="nofollow" href="https://www.r-users.com/" title="R jobs">R jobs</a>, visualization (<a rel="nofollow" href="https://www.r-bloggers.com/search/ggplot2" title="ggplot and ggplot2 tutorials">ggplot2</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/boxplot" title="Boxplots using lattice and ggplot2 tutorials">Boxplots</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/map" title="Maps and gis">maps</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/animation" title="Animation in R">animation</a>), programming (<a rel="nofollow" href="https://www.r-bloggers.com/search/RStudio" title="RStudio IDE for R">RStudio</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/sweave" title="Sweave and literate programming">Sweave</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/LaTeX" title="LaTeX in R">LaTeX</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/SQL" title="SQL and databases">SQL</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/eclipse" title="Eclipse IDE for R">Eclipse</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/git" title="git and github, Version Control System">git</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/hadoop" title="Large data in R using Hadoop">hadoop</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/Web+Scraping" title="Web Scraping of google, facebook, yahoo, twitter and more using R">Web Scraping</a>) statistics (<a rel="nofollow" href="https://www.r-bloggers.com/search/regression" title="Regressions and ANOVA analysis tutorials">regression</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/PCA" title="principal component analysis tutorial">PCA</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/time+series" title="Time series">time series</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/trading" title="finance trading">trading</a>) and more...
<img width="1" alt="" src="http://feeds.feedburner.com/~r/RBloggers/~4/vzuEa_kDfnE" height="1"></a></div>