# Batch vs Streaming

**Batch Processing**: Data is collected over some time and processed all at once. It's great when dealing with large volumes of data that don't need immediate processing.&#x20;

Consider analyzing sales data at the end of each day, week, or month.

**Stream Processing:** Instead of waiting to accumulate, data is processed immediately as it comes in. It's used for tasks that need real-time processing, like monitoring stock prices or social media feeds.

Another example: Credit card alerts

Redis Pub/Sub is one of the techniques. However, the problem is that the data is not persistent and cannot be played back.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://gchandra.gitbook.io/big-data-and-tools-with-nosql/data-engineering/batch-vs-streaming.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
