Comments (3)
Streamz is not a parallelism framework, but it can be concurrent ("async") for tasks that spend most of their time waiting. If your functions were async and you used asyncio.wait, they would have a shorter total run time. However, whether you can actually get parallelism depends on exactly what calls you make, and mixing CPU with IO is always tricky. Often a separate worker thread would end up running CPU loads (but python's GIL means you still might not get parallelism).
Dask can well be the parallelism engine for you, and it has various cluster topologies you can set up. From streamz's point of view, dask is a handy way to hand of mini-batches of events; but it could also be long-running tasks like downloads, in theory. In fact, if download/process is all you are doing, you can just use dask without srteamz (the delayed or client.submit patterns).
Note that no one is developing streamz these days, but I believe it can do what you want, if you have the interest to dig in.
from streamz.
@martindurant Thanks for your prompt and useful answer!
When you indicate to use async
methods, does streamz
support this? When I try, it indicates that my download_file
method was never awaited. Or maybe you were indicating to use async
methods and asyncio.wait
outside of streamz
?
Anyway, I guess Dask can do what I want as you mentioned but I need some sets of tasks (e.g. download + process) to be executed on the same dask worker since it can be a different machine (different fs).
I didn't catch the last commit date, but streamz
still looks useful! Thanks
from streamz.
When you indicate to use async methods, does streamz support this?
Yes, there should be some examples of this.
Dask can do what I want as you mentioned but I need some sets of tasks (e.g. download + process) to be executed on the same dask worker
There are various ways to do this kind of thing, but having shared storage is a useful thing for a cluster. I'm not immediately sure how you would phrase "download X can happen anywhere, but processing must happen where its associated download happened".
from streamz.
Related Issues (20)
- missing positional argument: 'topic' in to_mqtt HOT 5
- How to parametrize stream/pipeline creation? HOT 2
- Passing Username and Password to from_mqtt() HOT 4
- Dynamically add upstreams to zip HOT 2
- Dropping `pkg_resources`
- AttributeError: 'Output' object has no attribute '_ipython_display_' HOT 3
- flatten doesn't work with iterables without defined length HOT 2
- visualizing streams and changing variables during runtime HOT 5
- Is it possible to use event time/syntethic time rather than system time? HOT 2
- Time based lookback window? HOT 1
- Streamz not working in Jupyterlite
- Collect does not allow awaitable sinks
- Quickstart lacks conda/environments/streamz_dev.yml HOT 6
- Hello from LorryStream and Kotori / Streamz is cool HOT 2
- Add pytest fixture to clean up the IO loop HOT 4
- Streamz hvplot resets zoom and pan on each update HOT 3
- streamz's typing system can't work properly in vscode HOT 2
- Streamz with websocket not steaming any data HOT 5
- Is streamz not maintained anymore? What happened to cuStreamz? HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from streamz.