Hey, what's the status regarding event-driven / st...
# prefect-community
l
Hey, what's the status regarding event-driven / streaming flows? https://docs.prefect.io/core/PINs/PIN-08-Listener-Flows.html
j
Hi Lior, Pin 14 (https://docs.prefect.io/core/PINs/PIN-14-Listener-Flows-2.html) is the updated version of this. We're still not 100% happy with this design, so we're taking some time to think about things before expending effort on it. If you have thoughts on how this feature might be used, or use cases you'd like us to support, please let us know - we'd love to heart them.
l
Thanks, maybe I didn't read it correctly but it doesn't seem like the new proposal enables stream processing. The use case I was looking for is to use prefect batch work for machine learning as well as streaming. Streaming - handling events from a pub-sub queue (kafka).
j
Sure, there's lots of ways you could do that though - Pin-14 (and Pin-8) are the use case of running a flow everytime an event happens. Flows are not a lightweight abstraction, so having a flow-run for every event may not suit your use case, you might be better served by reading from kafka and processing tasks within a single flow. Someone filed an issue for some kafka integrations in our task library here: https://github.com/PrefectHQ/prefect/issues/3454, which may interest you. The task library isn't required for use with kafka, but if there's common patterns you'd like some pre-built tasks to handle, your feedback there might be useful.