Return-Path: william@bourbon.usc.edu Delivery-Date: Wed Nov 19 14:28:53 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 mAJMSrXu001922 for ; Wed, 19 Nov 2008 14:28:53 -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 mAJMQ0G5012031 for ; Wed, 19 Nov 2008 14:26:00 -0800 Message-Id: <200811192226.mAJMQ0G5012031@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: CSCI 551: final project 2 : Doubt in store Date: Wed, 19 Nov 2008 14:26:00 -0800 From: Bill Cheng Someone wrote: > I meant the store message for the file blondie1.mp3 ( size around 5 > MB). Should the entire file be sent at one go ? I'm not sure what you are referring to. The maximum buffer size allowed for part (2) is 8192 bytes. So, you cannot read the whole file into a 5MB buffer. So, you must read it 8192 bytes at a time and write it out 8192 bytes at a time (which is not much different from reading/writing one byte at a time in warmup #1). But all of these goes into one messages. > "For part (2), the maximum size of a memory buffer is limited to 8,192 > bytes. There is no limit for part (1). " > > What does this statement mean then ? > > I was under the assumption that a huge file greater than 8192 bytes > needs to be sent in parts in order to adhere to the 8192 limit. TCP has a stream abstraction. You can write the stream one byte at a time (as was done in warmup #1), or you can write it 8192 bytes at a time. But this it *not* "sent int parts". There is only one stream. -- Bill Cheng // bill.cheng@usc.edu On Wed, Nov 19, 2008 at 1:52 PM, Bill Cheng wrote: > Someone wrote: > > > I have 2 questions in final project 2: > > > > 1. When I flood the store message to my neighbors - Assume i am > > sending the file in parts : Say 4 parts. > > Is it fine if all these parts have the same UOID in message header ? > > I'm not sure what you meant by parts. In one STORE message, > you have to put all the data of the file int it. There is > only one message! May be you should come see me during > office hours about this! > > > 2. Suppose a node gets a store request from its neighbor. If it wants > > to forward the store, Can it generate a new UOID for the forwarded msg > > ? Or should it have the same UOID as the original store msg. > > If you are *forwarding* a message (of *any* type), the only > thing you can change in the message is the TTL. You must > *not* change anything else in the message > -- > Bill Cheng // bill.cheng@usc.edu