Code Monkey home page Code Monkey logo

Comments (5)

mjakubowski84 avatar mjakubowski84 commented on September 21, 2024 1

Hi @calvinlfer,

Thank you for the contribution and a donation! Sorry for not getting back to you sooner, but you have caught me on vacation.

As you have already noticed, the code has undergone some refactoring, enabling parallel reading of individual files or partitions - as well as other improvements I started working on but notoriously have no time to finish.

Parallel reading that you proposed is on my list, and I am happy to see your PR.
However, I have a suggestion, and I would like to know your opinion. Parquet4s also contains the Akka/Pekko module, and I would like to keep the API consistency and feature parity between all modules. Therefore, I imagined adding a new optional parameter of parallelism(N) (defaulting to 1) and implementing the parallel reading of up to N files. Internally, that would be code such as yours in the case of FS2, which is a stream of streams but par-joined with an upper bound. In the case of Akka/Pekko - that would be parallel substreams.
Except for providing a consistent abstraction for multiple library modules, such an approach would prevent a situation when too many parallel connections are open, which can lead to performance degradation or depletion of resources.

from parquet4s.

mjakubowski84 avatar mjakubowski84 commented on September 21, 2024 1

Released in 2.16.0

from parquet4s.

calvinlfer avatar calvinlfer commented on September 21, 2024

Hey @mjakubowski84! Thank you for this amazing library and I'm glad you are taking some well earned vacation.

I definitely agree with your suggestion. we should definitely have feature parity across both Akka/Pekko and FS2.
I like the approach of parallelism(N) in the builder (which uses parJoin(N) for FS2 under the hood and the equivalent in Akka/Pekko land) as a high level API where read is an alias for readPar(1).

I would also advocate for exposing the Stream of Streams abstraction in FS2/equivalent in Akka for more more advanced users that want a handle to each file as an inner stream since parJoin variants will merge these thereby losing fine grained control.

from parquet4s.

mjakubowski84 avatar mjakubowski84 commented on September 21, 2024

@calvinlfer I've forgotten to ask... I mentioned you as a sponsor in Readme and the project page using your Github username and linking your Github profile. Would you prefer a different name and a link to a different page?

from parquet4s.

calvinlfer avatar calvinlfer commented on September 21, 2024

Thank you for adding me! What you have is perfect 😄

from parquet4s.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.