Mars Hall created PIO-115:
-----------------------------

             Summary: Cache name-to-ID lookups for Storage app & channel
                 Key: PIO-115
                 URL: https://issues.apache.org/jira/browse/PIO-115
             Project: PredictionIO
          Issue Type: Improvement
          Components: Core
    Affects Versions: 0.11.0-incubating
            Reporter: Mars Hall
            Assignee: Mars Hall


When stress testing the Universal Recommender with high-concurrency HTTP/REST 
queries, we observed that Elasticsearch traffic was majority composed of 
requests resolving the Storage app's name & channel, over and over and over 
again! In this case, [each per-query call to 
`LEventStore.findByEntity`|https://github.com/heroku/predictionio-engine-ur/blob/master/src/main/scala/URAlgorithm.scala#L694]
 re-resolves the app name to an ID.

This changeset implements memoization for the function that performs these 
name-to-ID lookups, so that only one set of lookups is performed per process 
for each app+channel combination. As a result, we've seen overall throughput 
increase 📈 and error rate drop dramatically 📉.

This common optimization effects all storage backends, not just Elasticsearch.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to