adding Temporal Processing with Windows
@@ -196,9 +196,41 @@ provided, and only the succeeding events will be pushed to OutputRateLimiter.
At OutputRateLimiter the events output is controlled before sending the events to the stream junction or to the query callback.
When `output` clause is not defined PassThroughOutputRateLimiter is used by passing all the events without any rate limiting.
+#### Temporal Processing with Windows
+
+The temporal event processing aspect is achieved through Windows and Attribute Aggregations
+Siddhi uses four type of events to achieve temporal processing :
+
+Current Events: This are events newly arriving to a query from streams
+
+Expired Events: These are events that have expired from a window.
+
+Timer Events: Are events informing query about an update of the execution time. Usually the are generated by Schedulers.
+
+Reset Events: Events that resets states in side Siddhi queries.
+
+ In Siddhi, when an event comes into a WindowProcessor,
+it will create an appropriate expired event corresponding to the incoming current event with the expiring timestamp and store that
+event in the window. The WindowProcessor will also forward the current event to the next Processor for further processing.
+WindowProcessor using a scheduler or otherwise decides when to emit the events it has in memory and during that time it emits
+the events as expired events, at times if its emitting all the events at ones it emits a single reset event interred of
+sending one expired event for each event it has stored. From a window for each current event it has emitted it is essential
+to emmit the same events as expired events or emit a reset event.
+
+This is vital in Siddhi because Siddhi relies on these events to calculate the Aggregations at the QuerySelector.
+In QuerySelector, the arrived current events increase the aggregation values, expired events decrease the values, and
+reset events reset the aggregation calculation.
+
+For example if we take the time window, when a current event arrives it creates the corresponding expired event, adds that to
+the window, add an entry to the Scheduler to notify when the event need to be expired by sending a timer event at that time, and
+finally send the current event to the next processor for processing.
+When the window get an indication the the expected expiry time has come for the oldest event in the window via a
+a timer event from the scheduler or other means it removes the expired event from the window and pass that to the next processor.
+
+
### Join Input Stream Query Runtime (Join)
-WIP
+
## Siddhi Event Formats
@@ -232,5 +264,10 @@ and letting new events to be inserted.
+
+How query is compiled?
+
+
+
- Partition
- inner stream
