Parallel dataflow APIs based on second-order functions were originally seen as a flexible alternative to SQL. Over time, however, their complexity increased due to the number of physical aspects that had to be exposed by the underlying engines in order to facilitate efficient execution. To retain a sufficient level of abstraction and lower the barrier of entry for data scientists, projects like Spark and Flink currently offer domain-specific APIs on top of their parallel collection abstractions. This demonstration highlights the benefits of an alternative design based on deep language embedding. We showcase Emma - a programming language embedded in Scala. Emma promotes parallel collection processing through native constructs like Scala's for-comprehensions - a declarative syntax akin to SQL. In addition, Emma also advocates quasi-quoting the entire data analysis algorithm rather than its individual dataflow expressions. This allows for decomposing the quoted code into (sequential) control flow and (parallel) dataflow fragments, optimizing the dataflows in context, and transparently offloading them to an engine like Spark or Flink. The proposed design promises increased programmer productivity due to avoiding an impedance mismatch, thereby reducing the lag times and cost of data analysis.
[1]
Dennis M. Wilkinson,et al.
Large-Scale Parallel Collaborative Filtering for the Netflix Prize
,
2008,
AAIM.
[2]
Torsten Grust,et al.
How to Comprehend Queries Functionally
,
1999,
Journal of Intelligent Information Systems.
[3]
Volker Markl,et al.
Implicit Parallelism through Deep Language Embedding
,
2016,
SGMD.
[4]
Brian Beckman,et al.
LINQ: reconciling object, relations and XML in the .NET framework
,
2006,
SIGMOD Conference.
[5]
Limsoon Wong,et al.
Principles of Programming with Complex Objects and Collection Types
,
1995,
Theor. Comput. Sci..
[6]
Guy L. Steele,et al.
Organizing functional code for parallel execution or, foldl and foldr considered slightly harmful
,
2009,
ICFP.
[7]
Torsten Grust,et al.
Haskell Boards the Ferry - Database-Supported Program Execution for Haskell
,
2010,
IFL.