Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Nov 16 20:02:37 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 mAH42aXG029328 for ; Sun, 16 Nov 2008 20:02:36 -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 mAH3wxgm016783 for ; Sun, 16 Nov 2008 19:58:59 -0800 Message-Id: <200811170358.mAH3wxgm016783@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Store question Date: Sun, 16 Nov 2008 19:58:59 -0800 From: Bill Cheng 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