My favorites | Sign in
Project Home Downloads Wiki Issues Source
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 344: automatically refresh dashboard with new changes
4 people starred this issue and may be notified of changes. Back to list
Status:  Accepted
Owner:  ----


Sign in to add a comment
 
Reported by sop+code@google.com, Nov 18, 2009
I often just leave my browser open, but lock the screen with xlock when
I walk away from my workstation.  GMail and other applications like the
code.google.com issue tracker keep me signed in over night when the window
is open, but Gerrit doesn't.

We should either consider a longer session timeout, or use an idle timer
in the web page to poke the session every few hours if the window is still
open but the user hasn't performed any RPCs in a while.
Nov 18, 2009
Project Member #1 bklarson@gmail.com
I don't think we need to make it more secure than gmail... I'd be fine with just 
increasing the session timeout
Nov 18, 2009
#2 sop+code@google.com
Depends.  Some of us actually care about how secure our code storage is.  :-)

That said, I think GMail manages their session lifespan by the browser pings.  Ever 
notice how it seems to automatically refresh with your new email as soon as someone 
sends a message to you?  Yea, the browser is pinging the server every few seconds.
So the server has a pretty good idea whether or not you have a session open.

Gerrit by contrast never pings.  Actually, its downright annoying.  I'd like to have
my dashboard automatically update with new changes "fairly quickly" after they are
put into my review queue.  If we had an idle timer that polled for these we would
automatically use that polling to also piggy back the session update onto.
Nov 18, 2009
Project Member #3 bklarson@gmail.com
True, my desk is fairly secure and I'm not too worried about coworkers publishing a 
bunch of review comments as me.

From what I understand, gmail uses long polling/comet-style requests for server-
initiated messages.  It'd be awesome if Gerrit did something similar.  There is a fun 
GWT/Comet implementation for Jetty I used a while ago on a hobby project - details at 
http://docs.codehaus.org/display/JETTY/GWT.  I'm not sure how closely this compares 
with gmail/wave/etc.
Nov 18, 2009
#4 sop+code@google.com
Actually, I think GMail stopped using long polling/comet-style requests.

Comet works great on a small site when you have 20 users.  Imagine instead over
a million GMail users, all with their browsers open at once.  Yup, your firewall
now has to have over a million active TCP connections doing nothing at all, and
your web servers are sitting there holding over a million idle HTTP connections.

I think if you watch GMail activity in Firebug these days you'll observe it no
longer does a "hanging GET" but instead just issues a request every 6 seconds.
Though the Chat widget might violate this.

We're probably just fine to do a poll every 5-10 seconds.  Most Gerrit responses
are are sub 100 ms response time, even factoring in network latency.  We might
even be able to ease the load by finding some way to cache on the server the list
of items in your dashboard and send back only an "UNCHANGED" response when the
new query turns up the same result set.
Nov 18, 2009
Project Member #5 bklarson@gmail.com
Ah you might be right about gmail... maybe it switches to a hanging get for chat?  
Chat response must be done with a hanging get though... it is way too responsive.

I agree that polling makes sense for Gerrit.  I guess it is a tradeoff between active 
connections and bandwidth - immediate responses to the polls means 6-12 times the 
requests per client (every 5-10 seconds instead of ~60 seconds), but far fewer open 
connections.  I've never really considered the number of open connections.
Nov 18, 2009
#6 sop+code@google.com
(No comment was entered for this change.)
Summary: automatically refresh dashboard with new changes
Nov 19, 2009
Project Member #7 bklarson@gmail.com
Thinking about it a bit more - I don't think gmail uses the polling to keep you signed 
in.  I can close my gmail tab and open a new one tomorrow and I'll still be signed in 
as long as I don't shut down Chrome.  It signs me out if I close my browser though.

Sorry if this is starting to get off-topic.
Sign in to add a comment

Powered by Google Project Hosting