quix-streams icon indicating copy to clipboard operation
quix-streams copied to clipboard

Web Views

Open kokorinsergey opened this issue 1 year ago • 1 comments

Is your feature request related to a problem? Please describe. I'm new to quix. I'm trying to find an example how the aggregation can be requested per request. Is there a possibility to integrate quix with fastAPI rest api anyhow.

Describe the solution you'd like Something similar to WebView for Faust: https://faust-streaming.github.io/faust/userguide/tasks.html#id4

Describe alternatives you've considered

  • Cron job to publish data on regular basis
  • new kafka topic to send commands to do aggregations and sink them to another topic.

Additional context We would like to enable batch processing of events with quix: Aggregate spatial data for 5 minutes and calculate clustering on request. The problem we try to solve: we have mobile phones, and we would like understand where we should switch on loud speakers in the building based on actual data. The aggregation happens by request from a short leaving caching system and supposed to provide synchronous response

kokorinsergey avatar Sep 26 '24 16:09 kokorinsergey

Hi @kokorinsergey , thanks for the question!

To ensure I understand the task, you want to accumulate telemetry over a 5m window, query it from outside, and calculate aggregation on demand.

Currently, Quix Streams doesn't support queries over the state.

As a workaround, you can calculate the clustering in a streaming fashion (e.g., using tumbling windows and reduce() operation) and sink the result to some external store like Redis or directly to the caching service if that's possible.

This way, you can get the aggregation result when the data comes in.

Let me know if it helps 🙌

ghost avatar Sep 27 '24 10:09 ghost

I'm going to close this issue. Feel free to reopen it if you have more questions 👍

ghost avatar Oct 11 '24 09:10 ghost