dask / distributed

A distributed task scheduler for Dask
https://distributed.dask.org
BSD 3-Clause "New" or "Revised" License
1.58k stars 720 forks source link

Feature Request: More fully supported actors #6249

Open Ha5hBr0wn opened 2 years ago

Ha5hBr0wn commented 2 years ago

According to the Dask documentation Actors have the following limitations.

BaseActorFuture are similar to normal Dask Future objects, but not as fully featured. They curently only support the result method and nothing else. They don’t currently work with any other Dask functions that expect futures, like as_completed, wait, or client.gather. They can’t be placed into additional submit or map calls to form dependencies. They communicate their results immediately (rather than waiting for result to be called) and cache the result on the future itself.

No Resilience: No effort is made to make actor workloads resilient to worker failure. If the worker dies while holding an actor that actor is lost forever. No Diagnostics: Because the scheduler is not informed about actor computations no diagnostics are available about these computations. No Load balancing: Actors are allocated onto workers evenly, without serious consideration given to avoiding communication. Experimental: Actors are a new feature and subject to change without warning

Currently workers have only a single thread for actors, but this may change in the future. The result is sent back immediately to the calling side, and is not stored on the worker with the actor. It is cached on the BaseActorFuture object.

The first point limits ease of use of the abstraction (especially being unable to pass the futures around to form dependencies), the second limits deployability in a production environment, and the last obviously impacts performance. I know personally it would be very exciting to see these points improved (probably in that order), and would increase use of Dask outside data science workloads.

pavithraes commented 2 years ago

@Ha5hBr0wn Welcome to Dask, and thanks for opening this!

I think these features may not be prioritized for a while, but I'd suggest moving the request to the dask/distributed issue tracer, where it'll be more relevant. If you do so, please feel free to close this one. :)

You can also check out other feature requests on there around Actors, like:

mrocklin commented 2 years ago

Thanks for the feedback @Ha5hBr0wn ! Improving capability is always good. To help with prioritization I'm curious:

  1. Is this something that you're actively blocked on on a real workload, or is this mostly a "it would probably be nice if" request?
  2. Is this something that you are intrested in contributing to?
Ha5hBr0wn commented 2 years ago

It is mostly a "it would probably be nice if" kind of request.

I could try to contribute some things myself I suppose. I have not been a contributor to open source before, but suppose now is as good a time as any to start :)