Return-Path: william@bourbon.usc.edu
Delivery-Date: Fri Apr 20 19:53:25 2007
X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu
X-Spam-Level: 
X-Spam-Status: No, score=-3.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,
	NO_REAL_NAME autolearn=ham version=3.1.3
Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75])
	by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id l3L2rPNm026263
	for <cs551@merlot.usc.edu>; Fri, 20 Apr 2007 19:53:25 -0700
Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1])
	by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id l3L2rGFS019783
	for <cs551@merlot>; Fri, 20 Apr 2007 19:53:16 -0700
Message-Id: <200704210253.l3L2rGFS019783@bourbon.usc.edu>
To: cs551@merlot.usc.edu
Subject: Re: CS551 - Final Project - Question on Grading guidelines 
Date: Fri, 20 Apr 2007 19:53:16 -0700
From: william@bourbon.usc.edu

Someone wrote:

  > By the way, "if the node had to check for duplicate file", it wouldn't need
  > to wait until it sends a get request and then receives a "get response" from
  > a remote node and then see that it already has the same file in its
  > permanent area. It is possible to check this duplication before it self
  > since we have the meta data in the search results (SHA1, file name and
  > Nonce).

Yes, it's possible.  When you get your SEARCH responses, you
need to keep track of the FileIDs and printout some file
metadata to the screen.  If you only keep the FileIDs around,
then when you do a GET, you wouldn't know what the FileName,
SHA1, and Nonce of the file.  If you do keep the file
metadata, then you can do the lookup you mentioned above.
So, it depends on how you have implemented things.

  > My understanding is that the spec does not want us to do this. Instead,
  > just get the actual file that the user is asking for.

In general, I like a more generic solution and not write
code to check all kinds of special conditions.  So, the
result would not be as efficient as possible, but then
you may end up with less bugs!
--
Bill Cheng // bill.cheng@usc.edu <URL:http://merlot.usc.edu/william/usc/>
