confluentinc / kafka-tutorials

Tutorials and Recipes for Apache Kafka
https://developer.confluent.io/tutorials
Apache License 2.0
16 stars 90 forks source link

Suggestions to improve datacenter recipe #1049

Open mjsax opened 2 years ago

mjsax commented 2 years ago

In https://confluentinc.github.io/ksqldb-recipes/real-time-analytics/datacenter/, we create overloaded_panels but it's not use anywhere? Wondering (without reading the text of the recipe) if it's intended as "final output", i.e., this recipe has two results instead of just one?

Also I think the last two queries could be merged.

ybyzek commented 2 years ago

@mjsax thanks for the feedback. @rspurgeon can you take a look at this one?

rspurgeon commented 2 years ago

The point of overloaded_panels was to provide a 'final output' stream for a user to work with. I'll add some text about querying it as a use case.

There was some discussion (elsewhere) about merging ksqlDB commands into one command. I can see pros/cons for keeping streams / tables independent or combining them. Where did we land on this in other recipes?

ybyzek commented 2 years ago

There was some discussion (elsewhere) about merging ksqlDB commands into one command. I can see pros/cons for keeping streams / tables independent or combining them. Where did we land on this in other recipes?

As you say, there are pros and cons to merging (pro: shorter; con: more confusing for newbies). Please merge (or not) at your discretion.

mjsax commented 2 years ago

In general, we recommend to merge queries, because running one persistent query is more efficient than running two. That is why it might be good to show efficient code in the recipes, too?