Re: kernel.org mirroring (Re: [GIT PULL] MMC update)

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Martin Langhoff <martin.langhoff@...>, Git Mailing List <git@...>
Cc: Linus Torvalds <torvalds@...>, Jeff Garzik <jeff@...>, H. Peter Anvin <hpa@...>, Rogan Dawes <discard@...>, Kernel Org Admin <ftpadmin@...>
Date: Saturday, December 9, 2006 - 7:51 am

Martin Langhoff wrote:


First, it would (and could) work only for serving gitweb over mod_perl.
I'm not sure if overhead with IPC and complications implementing are
worth it: this perhaps be better solved by caching engine.

But let us put aside for a while actual caching (writing HTML version
of the page to a common temp directory, and serving this static page
if possible), and talk a bit what gitweb can do with respect to
cache validation.

In addition to setting either Expires: header or Cache-Control: max-age
gitweb should also set Last-Modified: and ETag headers, and also 
probably respond to If-Modified-Since: and If-None-Match: requests.

Would be worth implementing this?
 

For some pages ETag is natural; for other Last-Modified: would be more
natural.


What uniquely identifies contents in "object" views ("commit", "tag",
"tree", "blob") is either h=SHA1, or hb=SHA1;f=FILENAME (with absence
of h=SHA1). If both h=SHA1 and hb=SHA1 is present, hb=SHA1 serves as
backlink. The "diff" views ("commitdiff", "blobdiff") are uniquely
identified by pair of object identifiers (pairs of SHA1, or pairs of
hb SHA1 + FILENAME).

Three of those views ("blob", "commitdiff", "blobdiff") have their 
"plain" version; so ETag should include displaytype (action, 'a' 
parameter).

The hb=SHA1;f=FILENAME indentifier can be converted at cost of one
call to git command (but which is a bit expensive as it recurses
trees), namely to git-ls-tree.

ETag can be simply args (query), if all h/hb/hbp parameters are SHA1.
Or ETag can be SHA1 of an object (or pair of SHA1 in the case of diff),
but this is little more costly to verify. Although we usually (always?) 
convert hb=SHA1;f=FILENAME to h=SHA1 anyway when displaying/generating 
page.

Usualy you can compare ETags base on URL alone.
   

For objects views we can simply convert refname to SHA1. I'm not sure if 
it is worth it. In the cases when for view we have to calculate SHA1 of 
object anyway, we can return (and validate) ETag with SHA1 as above.

- ETag and/or Last-Modified headers for "log" views: "log", 
"shortlog" (is part of summary view), "history", "rss"/"atom" views.

On one hand all log views (at least now) are identified by their 
parameters (action/view name, and filename in the case of history view) 
and SHA1 of top commit. On the other hand it might be easier to use 
Last-Modified with date of top commit... Verifying SHA1 based ETag 
could add some overhead in the case of miss.


Wouldn't it be simplier to just set Last-Modified: header (and check
it?)


P.S. Can anyone post some benchmark comparing gitweb deployed under 
mod_perl as compared to deployed as CGI script? Does kernel.org use 
mod_perl, or CGI version of gitweb?

-- 
Jakub Narebski
Poland
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Linus Torvalds, (Thu Dec 7, 3:05 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Jakub Narebski, (Fri Dec 8, 5:43 am)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), H. Peter Anvin, (Thu Dec 7, 3:16 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Linus Torvalds, (Thu Dec 7, 3:30 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Junio C Hamano, (Thu Dec 7, 4:05 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), H. Peter Anvin, (Thu Dec 7, 4:09 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Junio C Hamano, (Thu Dec 7, 6:11 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Shawn Pearce, (Thu Dec 7, 3:39 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Linus Torvalds, (Thu Dec 7, 3:58 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Michael K. Edwards, (Thu Dec 7, 7:33 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), H. Peter Anvin, (Thu Dec 7, 3:58 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Olivier Galibert, (Thu Dec 7, 3:30 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), H. Peter Anvin, (Thu Dec 7, 3:57 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Rogan Dawes, (Fri Dec 8, 8:57 am)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), H. Peter Anvin, (Fri Dec 8, 12:16 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Linus Torvalds, (Fri Dec 8, 12:35 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Jeff Garzik, (Fri Dec 8, 12:54 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Linus Torvalds, (Fri Dec 8, 7:27 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Steven Grimm, (Sat Dec 9, 3:56 am)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Martin Langhoff, (Fri Dec 8, 9:56 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Jakub Narebski, (Sat Dec 9, 7:51 am)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Jeff Garzik, (Sat Dec 9, 8:42 am)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Martin Langhoff, (Sat Dec 9, 11:55 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), H. Peter Anvin, (Sun Dec 10, 3:05 am)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Jakub Narebski, (Tue Dec 12, 5:19 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Linus Torvalds, (Sat Dec 9, 2:04 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), H. Peter Anvin, (Sat Dec 9, 2:30 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Jakub Narebski, (Sat Dec 9, 9:37 am)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Martin Langhoff, (Sun Dec 10, 12:07 am)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Jakub Narebski, (Sun Dec 10, 6:09 am)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Jeff Garzik, (Sun Dec 10, 8:41 am)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Jakub Narebski, (Sun Dec 10, 9:02 am)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Jeff Garzik, (Sun Dec 10, 9:45 am)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Jakub Narebski, (Sun Dec 10, 3:11 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Jeff Garzik, (Sun Dec 10, 6:05 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Jakub Narebski, (Sun Dec 10, 6:59 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Martin Langhoff, (Sun Dec 10, 10:16 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Jakub Narebski, (Mon Dec 11, 4:59 am)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Martin Langhoff, (Mon Dec 11, 6:18 am)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Linus Torvalds, (Sun Dec 10, 3:50 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), H. Peter Anvin, (Sun Dec 10, 5:01 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Jakub Narebski, (Sun Dec 10, 4:27 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Linus Torvalds, (Sun Dec 10, 4:30 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Jeff Garzik, (Sun Dec 10, 6:08 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Martin Langhoff, (Sun Dec 10, 6:01 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Jeff Garzik, (Sun Dec 10, 6:14 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Jeff Garzik, (Sat Dec 9, 10:43 am)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Jakub Narebski, (Sat Dec 9, 1:02 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Jeff Garzik, (Sat Dec 9, 1:27 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Michael K. Edwards, (Fri Dec 8, 7:46 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Linus Torvalds, (Fri Dec 8, 8:49 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Jeff Garzik, (Sat Dec 9, 5:27 am)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Michael K. Edwards, (Sat Dec 9, 12:36 am)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), H. Peter Anvin, (Fri Dec 8, 8:51 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), H. Peter Anvin, (Fri Dec 8, 7:49 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Michael K. Edwards, (Fri Dec 8, 8:18 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), H. Peter Anvin, (Fri Dec 8, 8:23 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), H. Peter Anvin, (Fri Dec 8, 1:04 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Jeff Garzik, (Fri Dec 8, 1:40 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), H. Peter Anvin, (Fri Dec 8, 12:42 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Lars Hjemli, (Fri Dec 8, 3:49 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), H. Peter Anvin, (Fri Dec 8, 3:51 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Lars Hjemli, (Fri Dec 8, 3:59 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), H. Peter Anvin, (Fri Dec 8, 4:02 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Jakub Narebski, (Fri Dec 8, 9:38 am)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Martin Langhoff, (Fri Dec 8, 9:28 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), H. Peter Anvin, (Fri Dec 8, 10:03 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Martin Langhoff, (Fri Dec 8, 10:52 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), H. Peter Anvin, (Sat Dec 9, 1:09 am)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Martin Langhoff, (Sat Dec 9, 1:34 am)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), H. Peter Anvin, (Sat Dec 9, 12:26 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Rogan Dawes, (Fri Dec 8, 10:31 am)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Jonas Fonseca, (Fri Dec 8, 11:38 am)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Olivier Galibert, (Thu Dec 7, 7:50 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), H. Peter Anvin, (Thu Dec 7, 7:56 pm)