Return-Path: william@bourbon.usc.edu Delivery-Date: Sat Nov 22 08:33:51 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 mAMGXpfS002920 for ; Sat, 22 Nov 2008 08:33:51 -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 mAMGVgk7011805 for ; Sat, 22 Nov 2008 08:31:42 -0800 Message-Id: <200811221631.mAMGVgk7011805@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: About FileID Date: Sat, 22 Nov 2008 08:31:42 -0800 From: Bill Cheng Someone wrote: > When a node receive a search request and find it has the file, it > generate a FileID for the file and send a search response back. It > should remember the FileID so if it receive a get msg later, it can send > the file back. My question is, "how long will it keep the FileID? " Forever! Well, until the node goes down since this only has to be an in-memory data structure. > Basically, the question is same as "if later another node send a search > request for the same file, would it generate another FileID, or just use > the one it has used before?" (If it's the second case, I guess we should > save the FileID as a file) You can use the same FileID as the one in your in-memory data structure. It's also perfectly valid to have a permanent FileID. When you decide to keep a file in your mini-filesystem, you can generate a random FileID and store it in #.fileid. The important thing for a FileID is that it's unique network-wide so you only retrieve one file when you do a GET. -- Bill Cheng // bill.cheng@usc.edu