Return-Path: william@bourbon.usc.edu Delivery-Date: Mon Nov 17 09:15:17 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id mAHHFH6Y004240 for ; Mon, 17 Nov 2008 09:15:17 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.14.2/8.14.1) with ESMTP id mAHHBnTW024667 for ; Mon, 17 Nov 2008 09:11:49 -0800 Message-Id: <200811171711.mAHHBnTW024667@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Store question Date: Mon, 17 Nov 2008 09:11:48 -0800 From: Bill Cheng Someone wrote: > Upon your comments about STORE message below, I conclude that when > receiving STORE message, the node doesn't need to check if it already > has a copy of the file. Because it's impossible since the nonce must be > different. Correct. > What about when forwarding GET message? I think after it flips the > coin and decides to cache the file, it needs to check if it already has > a copy of the file, correct? Correct. > If it is correct, besides forwarding GET message and receiving GET > message, is there any other situation we need to check if it already has > a copy of the file? I cannot think of anything at this point. If you see a situation where it needs to be done, then you need to write code for it. -- Bill Cheng // bill.cheng@usc.edu Bill Cheng wrote: > Someone wrote: > > > Had a few doubts on the store feature ... > > Is it possible for the same file to be stored twice on the > > network? > > Yes. > > > Seems possible so when I get a store response on a node > > I need to check if the file already exists on the node before > > storing it (in the Cache area). > > You don't need to check if you already has a copy of the file > if you are just caching it. (Of course, you need check if > you have seen the *message* by looking at the message UOID > and discard duplicate messages -- this is what you do for > messages of all types anyway.) > > > While matching should the > > filename and the SHA value be enough or should we match the > > keywords also ? > > No. FileName, SHA1, *and* Nonce. > > > Should we consider the files to be different if > > they have the same name and content but different keywords ? > > Just FileName, SHA1, *and* Nonce. If the keywords are > different for the same file, Nonce must also be different! > > > If I already have the file do I still need to probabilistically > > flood it ? > > Yes. You should *not* even be checking if you have the > file already if you are forwarding a file. > -- > Bill Cheng // bill.cheng@usc.edu