Hi all,
Since we are displaying the branch count in the user home we cannot simply
use the above solution since if branch count is updated we should update
the cache for the completed applications as well. What is the essence of
the branch count in user home? Do we really need to show it? If it is not,
we can use the above method since only dynamic field is
*applicationCreationStatus
*and therefore we can cache the completed apps in the user home and only
lookup for change in *applicationCreationStatus *of pending applications.
If branch count is needed to display, what we can do is,each time we can
send a backend call to retrieve branch count of the all the completed
applications and show it in the home page.
WDYT?

Thanks,
Samith

On Thu, Oct 9, 2014 at 6:33 PM, Samith Dassanayake <sam...@wso2.com> wrote:

> What we are going to do is, when we are polling, first we'll get the app
> keys of the pending application list, from the cache and then we request
> user home data only for the those keys. For that we will implement a method
> to retrieve app home data for given array of appkeys:
> getUserHomeData(String[] appkeys) and update the cache accordingly based on
> the status of the retrieved user home data.
>
> On Thu, Oct 9, 2014 at 6:24 PM, Danushka Fernando <danush...@wso2.com>
> wrote:
>
>> Hi Samith
>> So say we create a new application. It goes to the pending list. So we
>> are polling pending and failed lists. So this application creates
>> successfully. Then it will disappear from pending. On what approach we are
>> updating the UI saying the new application is successfully created?
>>
>> Thanks & Regards
>> Danushka Fernando
>> Software Engineer
>> WSO2 inc. http://wso2.com/
>> Mobile : +94716332729
>>
>> On Thu, Oct 9, 2014 at 5:56 PM, Samith Dassanayake <sam...@wso2.com>
>> wrote:
>>
>>>
>>> Hi all,
>>>
>>> I have started to work on $subject[1]. Currently we poll all the user
>>> home data based on a timeout to update the user home and in current
>>> implementation we are fetching all the application's data each time
>>> regardless of the *applicationCreationStatus*.This operation causes
>>> huge delay in user home. On the other hand we cannot cache
>>> *userHomeInfo* directly since it includes a dynamic data 
>>> element,*applicationCreationStatus[2]
>>> and a*s a solution the approach that we going to take here is, first
>>> we'll retrieve the User Home data based on each
>>> *applicationCreationStatus* and cache them separately as
>>> user_home_apps_completed, user_home_apps_pending, user_home_apps_failed and
>>> then we'll only poll for the pending and failed applications based on the
>>> cached app info and update the cache accordingly. This we reduce the delay
>>> in the home page after the the first login.
>>>
>>> [1] https://wso2.org/jira/browse/APPFAC-2396
>>> [2] Mail thread: [AppFactory] Updating ApplicationInfoService
>>>
>>> Thanks,
>>> Samith
>>> --
>>> Best Regards
>>>
>>> Samith Dassanayake
>>> Software Engineer, WSO2 Inc.
>>>
>>>
>>> _______________________________________________
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>
>
> --
> Best Regards
>
> Samith Dassanayake
> Software Engineer, WSO2 Inc.
>
>


-- 
Best Regards

Samith Dassanayake
Software Engineer, WSO2 Inc.
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to