Live data from Hacker News

FastSpark: A New Fast Native Implementation of Spark from Scratch

medium.com

21–30 of 93 posts

Re: FastSpark: A New Fast Native Implementation of Spark from Scratch

#21

Nice, but I can't find any reason to choose Spark over modern Distributed SQL databases (CockroachDB, CitusDB, TiDB etc. or cloud vendor-specific SQL DBs)

How would you efficiently keep continuously updated complex metrics (aggregations, windowed functions, etc) calculated on top of unbounded/streaming data using a database? I'm not saying that Spark is the ideal solution, but there are a set of problems that require tools such as Spark.

One example could be PipelineDB extension for PostgreSQL

http://docs.pipelinedb.com/introduction.html

Re: FastSpark: A New Fast Native Implementation of Spark from Scratch

#22
post #14

Nice, but I can't find any reason to choose Spark over modern Distributed SQL databases (CockroachDB, CitusDB, TiDB etc. or cloud vendor-specific SQL DBs)

If you want a more complicated transform on lots of data your fancy sql won’t help.

Please give me an example. I can't think of any transform which cannot be done by using SQL or inbuilt Functions or new UDF.

Re: FastSpark: A New Fast Native Implementation of Spark from Scratch

#23

Earlier quoted context omitted.

How would you efficiently keep continuously updated complex metrics (aggregations, windowed functions, etc) calculated on top of unbounded/streaming data using a database? I'm not saying that Spark is the ideal solution, but there are a set of problems that require tools such as Spark.

One example could be PipelineDB extension for PostgreSQL http://docs.pipelinedb.com/introduction.html

https://www.pipelinedb.com/blog/pipelinedb-is-joining-conflu...

Re: FastSpark: A New Fast Native Implementation of Spark from Scratch

#24

Earlier quoted context omitted.

depends what you’re doing. For querying large datasets? 100% with you. For data cleaning, processing, analytics, ML on decently large datasets? Spark wins out

Say for an example, I am using PostgreSQL 12 + CitusDB extension Data cleaning -> PL/SQL and various inbuilt functions for the transformation of data (or new UDF if required at all) Processing -> PostgreSQL Parallel processing on the local node and Citus DB extension for distributed computing and sharding Analytics -> Many options here. Materialized views OR Triggers OR Streaming computation with PipelineDB extension…

Yeah that's not going to work for what people call analytics workloads today.

PG is great but it's not suitable to be a feature store and sure as hell not suitable to fan out ML workloads. In a modern ML stack, PG might play the role of the slow but reliable master store that the rest of the ML pipeline feeds off.

Re: FastSpark: A New Fast Native Implementation of Spark from Scratch

#25

Nice, but I can't find any reason to choose Spark over modern Distributed SQL databases (CockroachDB, CitusDB, TiDB etc. or cloud vendor-specific SQL DBs)

distributed in-memory computing for massive datasets to big to fit into vertically scaled memory. generic tabular files, not tables. delta lake.

Re: FastSpark: A New Fast Native Implementation of Spark from Scratch

#28

Earlier quoted context omitted.

depends what you’re doing. For querying large datasets? 100% with you. For data cleaning, processing, analytics, ML on decently large datasets? Spark wins out

What does spark win at exactly? Dask+Perfect is a much better experience all round including perf, with virtually none of the cluster management hell involved.

Could you talk about Prefect ? we are in the process of moving from Spark to Dask. I have never heard of prefect. what do you use it for ?

Re: FastSpark: A New Fast Native Implementation of Spark from Scratch

#30
The examples are all in Rust, so it’s very hard to make a non-toy demo. Usually if one uses the RDD API, one has some sort of library code that’s already in Java or Python and it’s impractical to port that code to make the job run. Or more likely, somebody will write an initial version using that code and then port / optimize the job later.

Native dependencies usually mean you’ll need docker. Spark pre-dates docker, and just relatively recently added the Kubernetes runner, which makes dockerized jobs easy. But historically it hasn’t been easy to run a job in a containerized environment with the native dependencies you need. You can ship native deps with your job, but that’s not easy, especially if you need a rebuild with each job.

The main advantage of Spark is flexibility and interoperability. You save time by not having to write something optimized on day 1 (for something you might throw away). And you get SQL support, something Beam / Hadoop don’t have (certainly not for Python). There are lots of benchmarks where Spark SQL is not a winner, but the point is Spark will help you save development time.

Post reply on HN