# Sequential data processing

**URL:** <https://discuss.elastic.co/t/sequential-data-processing/131520>\
**Category:** Elasticsearch\
**Created:** [May 11, 2018, 4:55pm UTC](https://discuss.elastic.co/t/sequential-data-processing/131520 "2018-05-11T16:55:28Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![nabha](https://avatars.discourse-cdn.com/v4/letter/n/bbce88/32.png) [@nabha](https://discuss.elastic.co/u/nabha)\
**Post date:** [May 11, 2018, 4:55pm UTC](https://discuss.elastic.co/t/sequential-data-processing/131520/1 "2018-05-11T16:55:28Z")

</div>

Does Elasticsearch process data sequentially?  
I want to use elasticsearch with filebeat as no need to filter any kind of data.  
But will it process sequentially or non-sequentially.  
I just want to process data sequentially. So please suggest the approach.  
If ES cannot process sequentially, what is the solution approach for sequential processing (to calculate consumption = diff between two consecutive records)?  
Thanks

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [May 12, 2018, 3:54am UTC](https://discuss.elastic.co/t/sequential-data-processing/131520/2 "2018-05-12T03:54:44Z")

</div>

Elasticsearch will process data as it receives it. If Filebeat doesn't send in order then Elasticsearch cannot do anything about that.

How are you doing the calculation between the two records?

---

<div class="post-metadata">

**Author:** ![nabha](https://avatars.discourse-cdn.com/v4/letter/n/bbce88/32.png) [@nabha](https://discuss.elastic.co/u/nabha)\
**Post date:** [May 14, 2018, 5:40am UTC](https://discuss.elastic.co/t/sequential-data-processing/131520/3 "2018-05-14T05:40:53Z")

</div>

Okay. Will it work same when logstash is in picture? Actually I have to use logstash for performing calculations. Like addition of values from a particular column of all records of a day and subtracting the sum from previous day's sum. Input will be from json file.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [May 14, 2018, 7:55am UTC](https://discuss.elastic.co/t/sequential-data-processing/131520/4 "2018-05-14T07:55:23Z")

</div>

It should help, yes. Take a look at [https://www.elastic.co/guide/en/logstash/6.2/plugins-filters-elapsed.html](https://www.elastic.co/guide/en/logstash/6.2/plugins-filters-elapsed.html)

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [May 14, 2018, 7:58am UTC](https://discuss.elastic.co/t/sequential-data-processing/131520/5 "2018-05-14T07:58:51Z")

</div>

Doing this type of processing in Logstash often means that all events need to go through the same thread, which is inefficient and limits performance. Another way to do this may be to create a process that runs periodically and processes data that has been indexed recently. This approach will naturally lag a bit and requires custom code but should scale better.

---

<div class="post-metadata">

**Author:** ![nabha](https://avatars.discourse-cdn.com/v4/letter/n/bbce88/32.png) [@nabha](https://discuss.elastic.co/u/nabha)\
**Post date:** [May 14, 2018, 10:18am UTC](https://discuss.elastic.co/t/sequential-data-processing/131520/6 "2018-05-14T10:18:04Z")

</div>

Actually where does it have limitations? While subtracting a value from last day's value or while adding values of all records of a day?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 11, 2018, 10:18am UTC](https://discuss.elastic.co/t/sequential-data-processing/131520/7 "2018-06-11T10:18:09Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
