You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Ertio Lew (JIRA)" <de...@myfaces.apache.org> on 2013/09/23 12:56:03 UTC

[jira] [Comment Edited] (MYFACES-3779) Mixed mode(Server+client) for state saving

    [ https://issues.apache.org/jira/browse/MYFACES-3779?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13774448#comment-13774448 ] 

Ertio Lew edited comment on MYFACES-3779 at 9/23/13 10:54 AM:
--------------------------------------------------------------

To deal with ViewExpiredExceptions most of us are forced to use client side saving even when cost of state saving on server is minimal but when using the client side saving, there are associated CPU costs to encrypt/decrypt the state when transferring between client & server. With client side saving, there are a lot of hidden input fields for viewstate data containing large amount of texts which increase the page size considerably when pages are relatively small. Thus I just feel when we use client side saving we a loosing a bit of performance, so why not just opt for client side saving when it becomes real necessity & otherwise use server saving, as per above mixed mode strategy. 

I think dealing with ViewExpiredException is a necessity for almost all public facing applications & right now using client side saving is the only way to deal with this but it has its own issues(as described above), thus this mixed mode looks somewhat addressing these concerns. 
                
      was (Author: ertiop93):
    To deal with ViewExpiredExceptions most of us are forced to use client side saving even when cost of state saving on server is minimal but when using the client side saving, there are associated CPU costs to encrypt/decrypt the state when transferring between client & server. Also I see lot of hidden fields containing large amount of text for viewstate data which increase the page size considerably when pages are relatively small. Thus I just feel when we use client side saving we a loosing a bit of performance, so why not just opt for client side saving when it becomes real necessarily & otherwise use server saving. 

I think dealing with ViewExpiredException is a necessity for almost all public facing applications & above strategy looks somewhat addressing that concern.
                  
> Mixed mode(Server+client) for state saving
> ------------------------------------------
>
>                 Key: MYFACES-3779
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3779
>             Project: MyFaces Core
>          Issue Type: New Feature
>            Reporter: Ertio Lew
>
> How about having a mixed mode for state saving whereby state is initially kept on server for a configurable amount of time (so that fast frequent requests are served without transferring the state from client to server several times, the drawback with client side saving) & after that period of time if the page is still alive in browser but it is idle, a javascript request is triggered which asks the server for that state data & now it will be kept on client side, now the client & the server both know that state for this session is there on client. If the page has died & no request has been sent to server asking for state data till that period of time, then state data would be removed from server.
> A further enhancement could be that you could set a fixed amount out of all memory on server that you want to allocate for state saving of all sessions. Till the time that quota remains, state is kept on server using that quota. But when that quota is over all the state information for further sessions is kept using client side state saving. Also a mixed mode.
> Such mixed modes would be very helpful in improving performance, & better utilization of the server resources.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira