Comments (4)
Can I suggest that this is an extreme case of a streaming join operation. In a streaming join operation you're going to hold on to some backlog of events in each stream and when an event occurs in the others you emit if some condition is met. Full outer product is this case when the condition is lambda *args: True
and the backlog is infinite.
When thinking about streaming joins there are now questions about how to define the length of a backlog. Is it a number of elements? Is it something having to do with the data itself, like a time value?
from streamz.
Hmm ok I like that vision of the problem.
As a side note we may want to look to itertools
to find new nodes to implement.
Keeping track of the number of elements is ok. The timed one would mean that we would need to track at what time the data came down and then cull the data as it became to old, which may be possible. We could even ask the user to provide a pair of functions, one which assigns a value
to the data and the other which asses if the value
invalidates the data.
egs
source = Stream()
source2 = Stream()
timeout_node = source.conditional_product(source2, assigning_function=time, deciding function=lambda x: (time() - x) < 60)
In this case if the data is older than a minute then we remove it.
source = Stream()
source2 = Stream()
CountClass():
def __call__():
self.i += 1
return self.i
countout_node = source.conditional_product(source2, assigning_function=CountClass, deciding function=lambda x: x + 5 < CountClass.i)
source = Stream()
source2 = Stream()
outer_product = source.conditional_product(source2, assigning_function=lambda *args: True, deciding function=lambda x: x, emit_on=source)
from streamz.
As a side note we may want to look to itertools to find new nodes to implement.
Sure, I'm biased, but toolz
may also have operations (like streaming joins). However, I'm also inclined to only add things as they become necessary. There is a cost to adding and maintaining functionality.
Similarly for time-based joins I would say that we shouldn't deal with it until we have a reason to. Number-of-element buffers are probably more sensible to deal with.
from streamz.
That's fair.
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 1
- 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
- Parallel streams with buffers HOT 3
- 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.