Great improvements hasitha. This should help us get consistent task
creation time.

Lets add the cache invalidation config time to human task configuration
file under the people query evaluator section.  30 seconds should be fine
as we are making it configurable.

Regards
Nandika


On Thu, Jan 9, 2014 at 7:46 AM, Hasitha Aravinda <[email protected]> wrote:

> Hi all,
>
> In humantask engine we are facing following problems,
>
>    - Every task operations requires users/roles validation. If the task
>    has expression based user assignment or excluded owners, this validation
>    becomes expensive since it requires additional user store calls. ( Many of
>    them are redundant calls)
>    - Many operations are sequential operations. (eg. loadTask -> claim ->
>    start , loadTask-> complete). This causes to invoke redundant user store
>    calls.
>    - If the user store has many users/role these calls will take some
>    time to complete and eventually task engine becomes slow.
>
> So the main idea is, to avoid those redundant user store calls by caching
> task's users/roles related data at the humantask engine side.
>
> I have completed the caching implementation for PeopleQueryEvaluator and
> results of following operation will be cached at humantask engine.
>
>    - Is Existing User - (User name, true/false)
>    - Is Existing Role - (Role name, true/false)
>    - Role name List for User. (User name, role list)
>    - User name List for Role. (Role name, user list)
>
> I conducted a task creation test in order to measure the performance
> improvement with caching. For this test, I used a LDAP which has 20 groups
> and each group has 1000 of users. The Humantask has expression based user
> assignment, including 4 potential owner groups, 2 excluded owner groups and
> 3 business  administrator groups.
>
> I ran a soapUI load test to create 1000 tasks using 10 concurrency with 0
> test delay. Following are the result.
>
>
>
> *min (ms)*
> *max (ms)*
> *avg (ms)*
> *last (ms)* *total count*
> *tps* *bytes* *bps* *err* *rat*  *Without caching* 898 3653 1698.29 1077
> 1000 5.87 354000 2080 0 0  *With Caching* 43 2467 184.16 127 1000 53.72
> 354000 19017 0 0
>
> According to the results, there is 9X performance improvement with
> caching.
>
> Now I am working on making cache expiry time configurable via humantask
> configuration. I think default 30s is ok for most of the scenarios.
>
> *User Name List for Role* operation can return a large result set. So my
> question is, is it ok to cache such a large result sets ?
> Suggestions and thoughts are welcome.
>
> Thanks,
> Hasitha.
>
> --
> Hasitha Aravinda,
> Software Engineer,
> WSO2 Inc.
> Email: [email protected]
> Mobile: +94 71 8 210 200
>
>


-- 
Nandika Jayawardana
Senior Technical Lead
WSO2 Inc ; http://wso2.com
lean.enterprise.middleware
_______________________________________________
Architecture mailing list
[email protected]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture

Reply via email to