Live data from Hacker News

FastSpark: A New Fast Native Implementation of Spark from Scratch

medium.com

71–80 of 93 posts

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

#71

A lot of people using PySpark are moving to Dask for significantly faster performance. Dask is also built for kubernetes - which is a huge deployment win. Spark is still in-between yarn and kubernetes.

Spark is still potentially faster for SQL-like workloads due to the existence of a query optimizer. Dask works at a different level of abstraction and does not have a query optimizer.

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

#72

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)

Spark is specifically useful for querying streaming data. How would a distributed database help with that? You'd have to build your own stream executor on top of that.

Agreed. at the same time, Building stream execution pipeline is not rocket science. I am not saying modern distributed SQL Databases are exact replacement or clones of Spark. I am saying with little more help from the application server they are much more capable than Spark.

You can use the following options individually or in combination.

Option 1 : Pipeline DB extension (PostgreSQL)

Option 2 : Service broker in commercial SQL databases or building PUSH/PULL queue if not supported. There are many libraries in each programming language which tries to do that. Also see option 4.

Option 3 : Using CDC or Replication for synchronous or asynchronous streamed computation on single or multi node cluster

Option 4 : Transducers. For example, you can compose many sql functions or procedures to act on a single chunk of data instead of always doing async streamed computation after each stage of transformation.

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

#73

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)

I see you haven't worked with a truly titantic amount of data then :)

I see you assume too much. :)

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

#74

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.

Yes those features help and all of the distributed SQL databases have data and query cache.

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

#75
post #23

Earlier quoted context omitted.

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

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

I know. But at the same time, 1.0 is pretty much capable. Give it a try and you will realize it.

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

#76

Earlier quoted context omitted.

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.

train a set of sklearn models one each per a random partition of the data (computed distributed). then combine all those models using averaging and evaluate them all against an even larger dataset. how do you do that in SQL

Sharding the table can help scale the problem across many machines and as I mentioned earlier you can use PL/R or PL/Python language extension to lift all sorts of ML functions to SQL functions.

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

#77

Earlier quoted context omitted.

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.

Spark != SQL It's also graph analysis and ML models.

Graph analysis -> Recursive common table expression (https://www.postgresql.org/docs/current/queries-with.html)

ML models - I already mentioned how to uplift R and Python functions to SQL function. even if you are not using PostgreSQL many other databases help you with uplifting and interfacing with existing ML libraries through FFI

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

#78
post #71

A lot of people using PySpark are moving to Dask for significantly faster performance. Dask is also built for kubernetes - which is a huge deployment win. Spark is still in-between yarn and kubernetes.

Spark is still potentially faster for SQL-like workloads due to the existence of a query optimizer. Dask works at a different level of abstraction and does not have a query optimizer.

Are you talking about the spark SQL catalyst optimiser ?

That's apples to oranges - because dask does not expose a SQL syntax that needs a query optimiser.

Also pyspark has the additional issue of serialisation between python and jvm. Turns out that just getting rid of that is a huge performance boost.

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

#79

Earlier quoted context omitted.

> I believe highly optimized C code in PG can be significantly faster than Scala inside Spark. There's no question about this. If you can express your task in terms of PG on a single instance, then you probably should. When you get to more complex tasks, like running input through GloVe and pushing ngrams to a temporal store, PG offers very little - which is fine, it's not at all what PG is designed for. Inter-node I…

> like running input through GloVe and pushing ngrams to a temporal store why exactly you think PG will not do this well?

Tell me how you'd do it and I'll tell you why it won't work :)

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

#80
post #14

Earlier quoted context omitted.

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.

[deleted]
Post reply on HN