Closed SoerenSilkjaer closed 1 year ago
Closed because this does not help at all. The issue is rather that in the current solution all events are downloaded into memory and iterated on the server. This becomes very expensive as soon as there are more than few thousands events.
Hi, I think that if you use elasticsearch as a backend for events, things are made by ES. For other backend, it is not possible to rely on DB so it's done in memory ...
Hi. Thank you for the response.
I think postgres backend could do it too, a relational database should be able to do that. I am currently using the postgres backend.
Switching to elasticsearch seems like quite the hassle since we already switched from redis to postgres.
Hi, you're right the postgresql backend should do that to !
Great! Is that something you guys have the time to implement or would you prefer I take a stab at it?
@pierrebruninmaif or @ptitFicus do you have time to work on that ?
https://github.com/MAIF/izanami/issues/706
This is probably just the beginning. In order to really fix this issue the experiment result query must be offloaded to the store. In the current solution all events are downloaded into memory and iterated on the server, but this becomes very expensive when there are millions of events.
The experiment result is generated in the implementations of this trait https://github.com/maif/izanami/blob/master/izanami-server/app/domains/abtesting/events/events.scala#L193-L195