Thrill – Big Data Processing with C++
blog.brakmic.com
blog.brakmic.com
It provides an overview of other processing framework, explains why C++ was chosen, explains various bottlenecks and their affect.
I had worked with KMeans before, and happy to see as part of bench-marking, as it seems one of the more widely used approaches for unsupervised learning.
In my view, Thrill is similar in composite-ability and integration into existing code objectives to Python's Dask
I have started wondering if the big data developers really care about the speed; the advantages of these Java softwares start to fade out when compared with their C++ counterparts.
If you measure project costs, including the salaries of the developers and amount of development days, then no.
This is the main reason why there is such a big pressure from trading folks for Oracle to improve Java regarding value types and FFI to native code.
- Using it to implement things should be fairly easy and doesn't require advanced knowledge of C++. Basically you have to plug lambdas that do the processing into the provided operations, similar to Spark, but using C++ syntax. It might require some compiler error parsing skills, but altogether it shouldn't be too different from using Spark with Java/Scala
- Extending Thrill requires familiarity with modern C++, possibly including advanced template tricks.
Since there isn't a whole lot of advanced stuff available for Thrill (yet), that means that currently people with the latter skills would most likely be required at the moment. But in a world where the same libraries available for Spark are available for Thrill or a similar C++ framework, that wouldn't be the case. Note that Thrill is currently quite experimental.
I guess it's a trade-off, but dismissing the potential for 10x runtime gains "because C++" seems too one-sided. That isn't to say that the C++ frameworks don't have a long way to go before they can rival Spark etc in ease of use and tooling, they do! But at least they point out the inefficiencies and potential for improvement in these existing systems.
Also, I wonder if and how they implemented the concept of lineage (unless these DIAs are not really very resilient)... I thought Spark relied on Scala's delayed evaluation to do that, though I may be mistaken.
Thrill doesn't implement any fault tolerance at the moment, it's closer to prototype status than production readiness.
I haven't looked into Spark in depth, but I believe that 'lineage' relies heavily on Scala's delayed evaluation and the underlying Java RMI facilities. Doing something similar in C++ may require a lot more effort and a significantly different set of tradeoffs regarding the performance model.
I'm still not convinced C++ is necessary to outperform Spark, especially as high-level features like reference counting and lambdas are being used.
Reference counting is used on very large objects or for things that aren't touched a lot, so there is no measurable impact on performance or memory use.
Lambdas don't have any performance impact. But you could just as well plug in any other functor. In fact, if you chain a map and a filter in Thrill, the two will be joined by the compiler (take element, apply both, proceed to next element). This would not be possible with old-school function pointers.
I'm asking why choose C++ for Thrill if you want essentially non-deterministic automatic memory management and lambdas. Performing e.g. map fusion as you describe is common place for functional language compilers. For example, the vector array library in Haskell has been doing this since 2008.
My hypothesis is that your high-performance implementation could be realised using safer (and I would argue more appropriate) functional languages.
I'd love to see a similar project realised in a functional language, that would be quite exciting!
It's basically R on scalapack.