Return-Path: william@bourbon.usc.edu Delivery-Date: Fri Nov 21 20:36:22 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 mAM4aMMD028994 for ; Fri, 21 Nov 2008 20:36:22 -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 mAM4Y5Zv005614 for ; Fri, 21 Nov 2008 20:34:05 -0800 Message-Id: <200811220434.mAM4Y5Zv005614@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Doubt regarding file storages Date: Fri, 21 Nov 2008 20:34:05 -0800 From: Bill Cheng Someone wrote: > I have a few questions regarding the storage of files: > > 1) Whenever a store is given, we store the files in the mini-filesystem as > #.meta and #.data. These files are called the "cached" files right ? You need to follow the rules to determine if they are in the cache or in permanent storage. We have many many postings talking about this issue. > In the > single beacon node case, should we "always" store the file or is it also > dependent on the "StoreProb" ? Please just following the protocol! If the protocol doesn't say anything about if a node is a beacon node, then it applies to all nodes. > 2) Suppose the user enters "get 3" and it turns out that the filename is > "chess.jpg". This has to be stored in the CWD right ? Please see my message with timestamp "Wed 19 Nov 10:05". > 3) Also, its mentioned in the spec that if the file "chess.jpg" already > exists, we must ask the user if he wants to replace it. Now what would > happen if this newer version of chess.jpg we want to store is actually a > different file with a different "sha1" value. Should we still over write it > and store it in our CWD anyway ? If the user says yes, you should overwrite it. (If you want to help the user out by providing more information, you can print the old filesize and new filesize. But this is not required.) -- Bill Cheng // bill.cheng@usc.edu