# Is it wise to use ES for saving shopping Carts?

**URL:** <https://discuss.elastic.co/t/is-it-wise-to-use-es-for-saving-shopping-carts/17677>\
**Category:** Elasticsearch\
**Created:** [May 22, 2014, 1:54pm UTC](https://discuss.elastic.co/t/is-it-wise-to-use-es-for-saving-shopping-carts/17677 "2014-05-22T13:54:06Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matthias\_Feist](https://avatars.discourse-cdn.com/v4/letter/m/cab0a1/32.png) [@Matthias\_Feist](https://discuss.elastic.co/u/Matthias_Feist)\
**Post date:** [May 22, 2014, 1:54pm UTC](https://discuss.elastic.co/t/is-it-wise-to-use-es-for-saving-shopping-carts/17677/1 "2014-05-22T13:54:06Z")

</div>

Hi Guys,

I'm working on an online shop. Currently we are storing the cart's content  
in a MySQL Database so we can very easy access the amount of a certain  
product and determine the reserved quantity.  
This is very important as the amount in the user's carts is reserved so  
other users my not by them.

What do you think: Is it wise to implement such a system in elasticsearch?  
I'm mostly worried about the time between the "add to cart" (inserting a  
document) and being able to access the total value due to the flushing  
delay.

Thanks for your advice.

Kind regards  
Matthias

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/0c48d418-b8b9-4d9a-b659-5aca07e60eb4%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/0c48d418-b8b9-4d9a-b659-5aca07e60eb4%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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 22, 2014, 9:13pm UTC](https://discuss.elastic.co/t/is-it-wise-to-use-es-for-saving-shopping-carts/17677/2 "2014-05-22T21:13:17Z")

</div>

ES is eventually consistent, so it may not make sense if you're latency  
requirements are very strict.  
If you can introduce a delay then it should work.

Regards,  
Mark Walkom

Infrastructure Engineer  
Campaign Monitor  
email: [markw@campaignmonitor.com](mailto:markw@campaignmonitor.com)  
web: [www.campaignmonitor.com](http://www.campaignmonitor.com)

On 22 May 2014 23:54, Matthias Feist [matf.de@gmail.com](mailto:matf.de@gmail.com) wrote:

> Hi Guys,
> 
> I'm working on an online shop. Currently we are storing the cart's content  
> in a MySQL Database so we can very easy access the amount of a certain  
> product and determine the reserved quantity.  
> This is very important as the amount in the user's carts is reserved so  
> other users my not by them.
> 
> What do you think: Is it wise to implement such a system in elasticsearch?  
> I'm mostly worried about the time between the "add to cart" (inserting a  
> document) and being able to access the total value due to the flushing  
> delay.
> 
> Thanks for your advice.
> 
> Kind regards  
> Matthias
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/0c48d418-b8b9-4d9a-b659-5aca07e60eb4%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/0c48d418-b8b9-4d9a-b659-5aca07e60eb4%40googlegroups.com)[https://groups.google.com/d/msgid/elasticsearch/0c48d418-b8b9-4d9a-b659-5aca07e60eb4%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/0c48d418-b8b9-4d9a-b659-5aca07e60eb4%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAEM624ZM\_fk9i49SpQtRmb2rr5Xy6WV3omwsCB8baBh4tic3Bw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAEM624ZM_fk9i49SpQtRmb2rr5Xy6WV3omwsCB8baBh4tic3Bw%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![jpountz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jpountz/32/45836_2.png) [@jpountz](https://discuss.elastic.co/u/jpountz)\
**Post date:** [May 22, 2014, 11:45pm UTC](https://discuss.elastic.co/t/is-it-wise-to-use-es-for-saving-shopping-carts/17677/3 "2014-05-22T23:45:03Z")

</div>

On Thu, May 22, 2014 at 3:54 PM, Matthias Feist [matf.de@gmail.com](mailto:matf.de@gmail.com) wrote:

> What do you think: Is it wise to implement such a system in elasticsearch?  
> I'm mostly worried about the time between the "add to cart" (inserting a  
> document) and being able to access the total value due to the flushing  
> delay.

For your information, this flushing delay only exists for search  
operations. We call it a near realtime operation because of this delay that  
you need to wait after having indexed a document and before being able to  
search for it (1 second by default).

However Elasticsearch doesn't only have a search API, it also has a GET API  
that is realtime[1] and basically allows you to use Elasticsearch as a  
key-value store.

[1]

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

--  
Adrien Grand

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAL6Z4j49hmhz7Av15FM13Nnpizh6GZEwn3dWmE\_d2nZNCSXvow%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAL6Z4j49hmhz7Av15FM13Nnpizh6GZEwn3dWmE_d2nZNCSXvow%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Matthias\_Feist](https://avatars.discourse-cdn.com/v4/letter/m/cab0a1/32.png) [@Matthias\_Feist](https://discuss.elastic.co/u/Matthias_Feist)\
**Post date:** [May 23, 2014, 7:39am UTC](https://discuss.elastic.co/t/is-it-wise-to-use-es-for-saving-shopping-carts/17677/4 "2014-05-23T07:39:24Z")

</div>

Thanks for your help.  
I will take a look into your links.

Matthias

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/228e8183-faaa-41f9-935e-60809bad6daf%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/228e8183-faaa-41f9-935e-60809bad6daf%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:** [July 6, 2017, 1:27am UTC](https://discuss.elastic.co/t/is-it-wise-to-use-es-for-saving-shopping-carts/17677/5 "2017-07-06T01:27:28Z")

</div>


