Return-Path: william@bourbon.usc.edu Delivery-Date: Wed Jan 3 13:42:17 2007 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.2 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id l03LgGc3000753; Wed, 3 Jan 2007 13:42:16 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id l03LcGYv000828; Wed, 3 Jan 2007 13:38:16 -0800 Message-Id: <200701032138.l03LcGYv000828@bourbon.usc.edu> To: csac@merlot.usc.edu, cs551@merlot.usc.edu Cc: Andreas Binnewies Subject: FWD: A job with meebo... In-reply-to: References: Comments: In-reply-to Andreas Binnewies message dated "Tue, 02 Jan 2007 13:11:01 -0800." Date: Wed, 03 Jan 2007 13:38:16 -0800 From: william@bourbon.usc.edu Dear Students, I've received the following e-mail. I'm just forwarding it to you in case you are interested. -- Bill Cheng // bill.cheng@usc.edu -----Original Message----- Date: Tue, 02 Jan 2007 13:11:01 -0800 From: Andreas Binnewies To: chengw@usc.edu Subject: A job with meebo for your students Hi Professor Cheng, My name is Andreas, and I am one of the developers for meebo , a web based instant messaging application. I remember back in 2005, I started flipping out as graduation approached because I didn't have a job for after school. Not knowing what to do, I went to all of the professors that I had close rapport with, and asked them if they knew of any career opportunties that I could pursue. Many of them did, which really helped to (a) calm my nerves and (b) kick start my job search. I was very thankful for their assistance. Just in case any near graduates come to you in a panic (like I did :), I would like to let you know about some awesome opportunities that meebo has available for your CS students. We are currently looking for talented and energetic Javascript and C/C++ programmers (both full-time and intern) that would feel right at home in a fast-paced and exciting environment. We have openings for: * Front End Intern (JavaScript) * Front End Full Time (JavaScript) * Backend Full Time (C/C++) * Systems Administrator Intern (Unix) * Systems Administrator (Unix) You can also point them to http://blog.meebo.com/jobs for more information about the openings. Please feel free to email me if you have any questions or comments, or definitely pass my email along to potential candidates. Thank you so much! Happy Holidays! -Andreas Return-Path: william@bourbon.usc.edu Delivery-Date: Tue Dec 19 17:07:01 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.2 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kBK171Kd027039 for ; Tue, 19 Dec 2006 17:07:01 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kBK13t2r016831 for ; Tue, 19 Dec 2006 17:03:55 -0800 Received: (from william@localhost) by bourbon.usc.edu (8.13.5/8.13.5/Submit) id kBK13tpg016830 for cs551@merlot; Tue, 19 Dec 2006 17:03:55 -0800 Date: Tue, 19 Dec 2006 17:03:55 -0800 From: william@bourbon.usc.edu Message-Id: <200612200103.kBK13tpg016830@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Please make backups of projects specs! Hi, The current project specs will be deleted soon. There may be a chance that in a future semester, you would like to update your resume or get ready for an interview, and you would want to recall exactly what were in the project specs for this semester. Please make a backup copy of the *specs* now! (If you ask me to put them back on the web again in the future, I may not be able to do it.) -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Wed Dec 13 11:11:07 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.2 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kBDJB2U5003355; Wed, 13 Dec 2006 11:11:02 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kBDJ8I2c014754; Wed, 13 Dec 2006 11:08:18 -0800 Message-Id: <200612131908.kBDJ8I2c014754@bourbon.usc.edu> To: cs551@merlot.usc.edu To: csac@merlot.usc.edu Subject: FWD: Software Engineering positions in Southern California Date: Wed, 13 Dec 2006 11:08:18 -0800 From: william@bourbon.usc.edu Dear Students, I'm forwarding an e-mail from someone in Aerotek who has a couple of positions opened. Please read through the entire e-mail *carefully* before applying. US Citizenship is not required, but they are *not* looking to provide H1 sponsorship for a short term project. There is also a permanent position for a more Senior level person where they might be willing to sponsor. All candidates must have at least a Bachelors, and a Masters is preferred. Please contact Chris Northup if you are qualified and interested. -- Bill Cheng // bill.cheng@usc.edu -----Original Message----- Date: Wed, 13 Dec 2006 10:24:07 -0800 (PST) From: Chris Northup To: chengw@usc.edu Subject: Software Engineering positions in Southern California Hi Bill, I got your name from the USC Engineering directory and I wanted to reach out for a little guidance. Aerotek (www.aerotek.com) is the largest privately held placement firm in the US and I focus on technical positions from San Diego to Seattle. Currently we have a client in San Clemente looking for a couple Software Engineers for a 6-9 month project. The ideal candidate might possibly be someone you know. They are looking for someone with 1-3 years of development experience with C++, some test script development experience, and as much formal education as possible. This could be an excellent opportunity for someone to really accelerate their career growth while helping others (the client makes heart related medical devices). Pay depends on experience and should range from $35-$50/hr. If you know anyone who might fit, pass this along. If you have questions, feel free to reach out to me directly at 503-403-1937 or wnorthup@aerotek.com Thanks for your time, Chris Northup Sr. Technical Recruiter Return-Path: william@bourbon.usc.edu Delivery-Date: Tue Dec 12 11:02:10 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.2 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kBCJ2Akm000679 for ; Tue, 12 Dec 2006 11:02:10 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kBCIxT3e031341 for ; Tue, 12 Dec 2006 10:59:29 -0800 Received: (from william@localhost) by bourbon.usc.edu (8.13.5/8.13.5/Submit) id kBCIxTnw031340 for cs551@merlot; Tue, 12 Dec 2006 10:59:29 -0800 Date: Tue, 12 Dec 2006 10:59:29 -0800 From: william@bourbon.usc.edu Message-Id: <200612121859.kBCIxTnw031340@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: final exam grading schedule... Hi, I'm planning to grade your final exam today and tomorrow. You should get e-mails from me regarding your final exam score and your letter grade by the end of this Thursday (12/14). So, it would be great if you can resolve your grading issue with final project part (2) by then. If not, there is no big deal since we can always change the grade later. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Tue Dec 12 10:58:10 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.2 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kBCIwAE1032748 for ; Tue, 12 Dec 2006 10:58:10 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kBCItTJS031147 for ; Tue, 12 Dec 2006 10:55:29 -0800 Received: (from william@localhost) by bourbon.usc.edu (8.13.5/8.13.5/Submit) id kBCItT2o031146 for cs551@merlot; Tue, 12 Dec 2006 10:55:29 -0800 Date: Tue, 12 Dec 2006 10:55:29 -0800 From: william@bourbon.usc.edu Message-Id: <200612121855.kBCItT2o031146@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: CS 551 Final Project Part (2) grade... Hi, I just sent your final project part (2) scores to all of you. Since it's the end of the semester, if you need a regrade, please follow the procedure in the previous e-mail to request for a regrade ASAP. The TA is also leaving town on 12/17. If things cannot be resolved, I will still have to send in your letter grades by the end of this week. However, grades can be changed with a simple form. So, if it takes too long to regrade, please do not stress out. We can come back to it after the TA returns on 1/5/2007. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Mon Dec 11 21:42:47 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.2 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kBC5gld5012065 for ; Mon, 11 Dec 2006 21:42:47 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kBC5e9Hr020766 for ; Mon, 11 Dec 2006 21:40:09 -0800 Message-Id: <200612120540.kBC5e9Hr020766@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: regarding final Date: Mon, 11 Dec 2006 21:40:09 -0800 From: william@bourbon.usc.edu Someone worte: > Could you please suggest some of the topic for > problem question, as you suggested fair queue last time. This > would help in preparation. Sorry that I will not make any suggestions. The reason I made suggestions for the midterm was that people did not know what to expect. Now that you've seen the midterm, you should know more about what to expect. Just like the midterm, the final exam will be pretty spread out and cover a wide variety of topics. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Mon Dec 11 16:32:12 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.2 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kBC0WC0C024758 for ; Mon, 11 Dec 2006 16:32:12 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kBC0TYYA018308 for ; Mon, 11 Dec 2006 16:29:34 -0800 Received: (from william@localhost) by bourbon.usc.edu (8.13.5/8.13.5/Submit) id kBC0TYiD018307 for cs551@merlot; Mon, 11 Dec 2006 16:29:34 -0800 Date: Mon, 11 Dec 2006 16:29:34 -0800 From: william@bourbon.usc.edu Message-Id: <200612120029.kBC0TYiD018307@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: CS 551 final exam is in VKC 258 tomorrow 8-10am... Hi, Just a reminder that you should go to VKC 258 for the final exam tomorrow morning. If you go to the wrong place, I cannot give you extra time to take the exam. Also, please do not be late (I know it's not easy to get up so early). But I also cannot give you extra time to take the exam if you show up late. VKC 258 is on the East wing of VKC on the 2nd floor. There will be assigned seating. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sat Dec 9 10:47:40 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.2 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kB9Ilerq020874 for ; Sat, 9 Dec 2006 10:47:40 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kB9IjAkK028427 for ; Sat, 9 Dec 2006 10:45:10 -0800 Message-Id: <200612091845.kB9IjAkK028427@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Mobile IP - Tunneling Date: Sat, 09 Dec 2006 10:45:10 -0800 From: william@bourbon.usc.edu Someone wrote: > When CH want to talk to a mobile server > 1. CH opens a socket connection to server and send the packets. > 2. HA intercepts this packets and tunnel it to FA > 3. FA decapsulates it and send it to MH > 4. When MH replies directly to CH, what IP address it'll use (new > - got from FA, or Old one - got from HA)? > > Could you please explain how the socket connection will work The main reason for Mobile IP is to for MH to keep the IP address. So, my understanding is that the default action is reply with its original IP address. Since the FA is aware of Mobile IP, it will not drop the return packet even through the IP address is not from it's domain. It will also not tunnel it back to HA since CH's IP address in already in the destination field of the packet. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sat Dec 9 10:43:01 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.2 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kB9Ih1bi020601 for ; Sat, 9 Dec 2006 10:43:01 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kB9IeVTM028373 for ; Sat, 9 Dec 2006 10:40:31 -0800 Message-Id: <200612091840.kB9IeVTM028373@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: cs551: SSM Date: Sat, 09 Dec 2006 10:40:31 -0800 From: william@bourbon.usc.edu Someone wrote: > Why do we need "best effort counting" of receivers in single source > multicast? Are you asking why we need "best effort" or "counting"? The reason for "counting" is because there are applications that would like to have this service. The reason for "best effort" is that it's very difficult to count the actual number of receivers. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Thu Dec 7 22:28:30 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.2 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kB86SUIv009364 for ; Thu, 7 Dec 2006 22:28:30 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kB86Q6UB003890 for ; Thu, 7 Dec 2006 22:26:06 -0800 Message-Id: <200612080626.kB86Q6UB003890@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: cs551: diff serve Date: Thu, 07 Dec 2006 22:26:06 -0800 From: william@bourbon.usc.edu Someone wrote: > This is with respect to the 2-bit differentiated services model. > It seems that if there is an out-of-profile packet and P-bit is set, it > is *dropped for sure* no matter what. But if an out-of-profile packet > with A-bit set arrives then it is just *unmarked and forwarded*. I'm > guessing it'll be dropped further down the network only if there is a > congestion. Does this make the Assured service type more desirable to > have than Premium service type? If yes, shouldn't it be the other way > round? But *if* Premium traffic is *not* out-of-profile, it is served with high priority at every router! So, all Premium traffic has to do is to stay in-profile and it will receive the best service. If you have a traffic that you cannot control, then it's possible that you may want to make it Assured rather than Premium. This may depend on how often do you expect it to be out-of-profile, what protocol you use, how much extra do you pay, etc. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Wed Dec 6 21:11:13 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.2 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kB75BDrS008806 for ; Wed, 6 Dec 2006 21:11:13 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kB758rmu017864 for ; Wed, 6 Dec 2006 21:08:53 -0800 Message-Id: <200612070508.kB758rmu017864@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: cs551: freenet Date: Wed, 06 Dec 2006 21:08:53 -0800 From: william@bourbon.usc.edu Someone wrote: > I have the following questions with reference to freenet: > 1. If the TTL is large enough, then a search (for a file that exists in > the network) will always be a success. Right? I think so. The query may end up visiting every node in this case. > 2. Is the caching of files at intermediate nodes probabilistic or > "always done"? I think the basic protocol requires caching to be done at intermediate nodes at all time. But I won't be surprise if there is a way to configure a node to cache probabilistically. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Tue Dec 5 22:53:15 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kB66rFC0017897 for ; Tue, 5 Dec 2006 22:53:15 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kB66owXH032433 for ; Tue, 5 Dec 2006 22:50:58 -0800 Message-Id: <200612060650.kB66owXH032433@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Final Exam Date: Tue, 05 Dec 2006 22:50:58 -0800 From: william@bourbon.usc.edu Someone wrote: > I was goin through the slides. > the paper by padhye on modeling tcp throughput... > wut are we gathering from that paper? > coz all we do is just observe the results which is that to do happen > alot.. is that it? I think I've mentioned that during lectures. If you are not sure about a particular topic, it's probably a good idea to review the lectures and not just flip through the slides. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sat Dec 2 09:35:35 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kB2HZZwF021500 for ; Sat, 2 Dec 2006 09:35:35 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kB2HXVOb016171 for ; Sat, 2 Dec 2006 09:33:31 -0800 Received: (from william@localhost) by bourbon.usc.edu (8.13.5/8.13.5/Submit) id kB2HXVZ4016170 for cs551@merlot; Sat, 2 Dec 2006 09:33:31 -0800 Date: Sat, 2 Dec 2006 09:33:31 -0800 From: william@bourbon.usc.edu Message-Id: <200612021733.kB2HXVZ4016170@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: please declare your part (2) partner, if you haven't done so already Hi, Please make sure that you have at least sent me an e-mail telling me who your partner is ASAP, especially if both you and your parter have made a submission. I'm going to run your submissions against MOSS soon. Once I contact you about plagiarism, it would be too late to say that so and so is your partner. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sat Dec 2 09:08:09 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kB2H89BN019563 for ; Sat, 2 Dec 2006 09:08:09 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kB2H64g2015280 for ; Sat, 2 Dec 2006 09:06:04 -0800 Received: (from william@localhost) by bourbon.usc.edu (8.13.5/8.13.5/Submit) id kB2H64fQ015279 for cs551@merlot; Sat, 2 Dec 2006 09:06:04 -0800 Date: Sat, 2 Dec 2006 09:06:04 -0800 From: william@bourbon.usc.edu Message-Id: <200612021706.kB2H64fQ015279@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: reminder about modifications... Hi, Just a reminder that it's a good idea to very what you have submitted. Please see: http://merlot.usc.edu/cs551-f06/submit.html#verify If you have minor modifications, please follow the instructions at the following URL: http://merlot.usc.edu/cs551-f06/projects.html#mods -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Fri Dec 1 19:24:52 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kB23OptR021968 for ; Fri, 1 Dec 2006 19:24:51 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kB23MnZZ004263 for ; Fri, 1 Dec 2006 19:22:49 -0800 Message-Id: <200612020322.kB23MnZZ004263@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Cache & Perm size and Probability in test case Date: Fri, 01 Dec 2006 19:22:49 -0800 From: william@bourbon.usc.edu Someone wrote: > Does the term cache and perm size only consider *.data files in > the folder? In my message with timestamp "Wed 15 Nov 15:35", I mentioned that you only have to count *.data. But if you want to count other files, that's finen too. > Because, in the test case b6, if we accounting all > filesizes (*.cert *.meta *.data), the cache can only store 1 > file. I see. So, it would be great if you can document this in your README file. If the TA grades it incorrectly, you can always ask for a regrade. > I think the probability that a node will store file is not 50%, > since if n00 is not flood message to n01 but flood to n02, node > n02 will flood back to n01. Therefore chance should be .7*.7 + > .7*.7*.7. I wonder if I am correct. Correct. It depends on these probabilities in the startup configuration file. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Fri Dec 1 19:15:39 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kB23FcIo021301 for ; Fri, 1 Dec 2006 19:15:38 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kB23DaDu004092 for ; Fri, 1 Dec 2006 19:13:36 -0800 Message-Id: <200612020313.kB23DaDu004092@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: [cs 551] Date: Fri, 01 Dec 2006 19:13:36 -0800 From: william@bourbon.usc.edu Someone wrote: > I presume I cannot use a different include directory than library directory? As far as our code is concerned, openssl-0.9.7g is pretty much the same as openssl-0.9.8a. But, as I mentioned in my previous e-mail, there are risks using what's in /usr/lsd. > including -I/usr/lsd/openssl/0.9.7g/include while linking > -L/home/scf-22/csci551b/openssl/lib provides: > > gcc -g -I/usr/lsd/openssl/0.9.7g/include > -L/home/scf-22/csci551b/openssl/lib -lnsl -lsocket -lresolv -lcrypto > -lpthread -lstdc++ -lm -o sv_node fileSystem.o hash.o sv_node.o UOID.o > timerManager.o command.o globalVars.o iniParser.o routingTable.o > helperFns.o helperThreads.o neighbor.o message.o > Undefined first referenced > symbol in file > MD5 fileSystem.o > SHA1 fileSystem.o > SHA1_Init fileSystem.o > SHA1_Update fileSystem.o > SHA1_Final fileSystem.o > ld: fatal: Symbol referencing errors. No output written to sv_node > collect2: ld returned 1 exit status > *** Error code 1 I think you have should all your *.o files before all the libraries. Please try: gcc -g -I/usr/lsd/openssl/0.9.7g/include fileSystem.o hash.o sv_node.o UOID.o timerManager.o command.o globalVars.o iniParser.o routingTable.o helperFns.o helperThreads.o neighbor.o message.o -L/home/scf-22/csci551b/openssl/lib -lnsl -lsocket -lresolv -lcrypto -lpthread -lstdc++ -lm -o sv_node -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Fri Dec 1 19:07:49 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kB237nwk020764 for ; Fri, 1 Dec 2006 19:07:49 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kB235kVc003937 for ; Fri, 1 Dec 2006 19:05:46 -0800 Message-Id: <200612020305.kB235kVc003937@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: [cs 551] Date: Fri, 01 Dec 2006 19:05:46 -0800 From: william@bourbon.usc.edu Someone wrote: > Update on the openssl compile issue... > > if I compile with: -I/usr/lsd/openssl/0.9.7g/include > Instead of your advised: -I/home/scf-22/csci551b/openssl/include > > I get no errors. Hmm... I would be surprised that ISD actually modified the include files in openssl. Anyway, please do not use what's in /usr/lsd and use what's specified in the spec. The problem is that ISD is known to remove files from /usr without warning. If you use it and it disappears between now and grading time, your program may not be gradable and will receive only 1 point. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Fri Dec 1 19:03:29 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kB233TCq020497 for ; Fri, 1 Dec 2006 19:03:29 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kB231RSf003848 for ; Fri, 1 Dec 2006 19:01:27 -0800 Message-Id: <200612020301.kB231RSf003848@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: openssl compile problems Date: Fri, 01 Dec 2006 19:01:27 -0800 From: william@bourbon.usc.edu Someone wrote: > I'm porting my work to nunki, and find that I'm having trouble > compiling with the openssl directions provided at > http://merlot.usc.edu/cs551-f06/projects/openssl.html > > Could you advise? The code is working / compiling on my macbook =/ > > Thanks > > nunki.usc.edu(19): make > gcc -g -I/home/hrm/include -I/home/scf-22/csci551b/openssl/include > -c fileSystem.C > In file included from fileSystem.C:1: > /home/scf-22/csci551b/openssl/include/openssl/sha.h:109: error: type specifier > omitted for parameter `size_t' > /home/scf-22/csci551b/openssl/include/openssl/sha.h:109: error: parse error > before `)' token > /home/scf-22/csci551b/openssl/include/openssl/sha.h:111: error: type specifier > omitted for parameter `size_t' > /home/scf-22/csci551b/openssl/include/openssl/sha.h:111: error: parse error > before `,' token > /home/scf-22/csci551b/openssl/include/openssl/sha.h:116: error: type specifier > omitted for parameter `size_t' Usually, I include a bunch of stuff before including : #include #include #include #include #include #include #include #include #include #include #include If nunki does not have one of these files, just delete it. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Fri Dec 1 18:58:21 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kB22wLtS020217 for ; Fri, 1 Dec 2006 18:58:21 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kB22uIFO003680 for ; Fri, 1 Dec 2006 18:56:19 -0800 Message-Id: <200612020256.kB22uIFO003680@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: regarding deletion of file Date: Fri, 01 Dec 2006 18:56:18 -0800 From: william@bourbon.usc.edu Someone wrote: > For the deletion of files while -reset option, i > am doing, > str= path of "file" folder/* > e.g. > str=$HomeDir/files/* > > and then remove(str); > > But this doesnt work, it return the error message " No > such file or directory". > If i use that the same path from unix prompt, from any > other directory, wih rm , then that works. > > could you suggest me what should be the other way > around. The idea here is to use your index files to determine what are the files in the files directory and remove them one by one using unlink(). This is only worth 2 points, if you have a working program, please make sure you make an submission before you try to fix this. > Problem2: > i am creating the subdirectory, "files" at startup. > with the command, > mkdir(temp_buffer,777); > > but the directory is created with the mode "400" only, > i.e. the read by user only. > > How could i fix that problem too. The last argument should be 0777 (octal) and not 777 (decimal). -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Fri Dec 1 14:10:17 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kB1MAHOV001740 for ; Fri, 1 Dec 2006 14:10:17 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kB1M8Gb7000750 for ; Fri, 1 Dec 2006 14:08:16 -0800 Message-Id: <200612012208.kB1M8Gb7000750@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Cannot open file Date: Fri, 01 Dec 2006 14:08:16 -0800 From: william@bourbon.usc.edu Someone wrote: > Thank you for your suggestion. My previous information about errror > message "Too many open files" may mislead you to my actual problem. > > Actually, when I run *sv_node" at each directory (n00, n01, n02, ...), > and if I use command to open file like store/get command, it can access > that file properly (I only use fopen(filename) with no path since that > file is existing in the current working dir). However, if I run > *sv_node* at another dir(not home dir), although the filename that I > type at the commandline of the program is still being at the same dir, > my code see it as 'homedir' (the code to open file is the same); > resulting in wrong path to access that file. In my opinion, I may need > to use something like getcwd(), right? or this is not a right way. I assume currently you are doing something like the following to create files such as "1.data":: char *path=(char*)malloc(buf_size); snprintf(path, buf_size, "files/%1d.data", number); fopen(path, "w")... What you should do is to use HomeDir from your startup configuration. For example, in b3-n00.ini, we have: HomeDir=/home/scf-22/csci551b/tmp/final2/n00 Assuming that you store this directory in a variable, say (char*)homedir, you should do the following instead: char *path=(char*)malloc(buf_size); snprintf(path, buf_size, "%s/files/%1d.data", homedir, number); fopen(path, "w")... If you never changed your working directory (by calling chdir()), then you don't need to do getcwd() when you save a copy of your file. You can simply just do: fopen(filename, "w)... to create a file for writing in the current working directory. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Fri Dec 1 07:33:00 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kB1FWxNU008906 for ; Fri, 1 Dec 2006 07:32:59 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kB1FUxqO028959 for ; Fri, 1 Dec 2006 07:30:59 -0800 Message-Id: <200612011530.kB1FUxqO028959@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Cannot open file Date: Fri, 01 Dec 2006 07:30:59 -0800 From: william@bourbon.usc.edu Someone wrote: > When I copy *sv_node* file to each dir (n00, n01, n02, ...) and run each > windows in that directory, my code is working well. However, when I run > from another directory not my home directory(in ini file), it cannot > open file and occur this error message "Too many open files" from > perror(). Due to this problem, could you please suggest me any idea? My guess is that you are writing past end of buffers! Check your memory allocation code when you construct the file path. You probably have something like (assuming HomeDir is a variable that contains HomeDir from your startup configuration file and filenumber is the file you are trying to access): char *path=(char*)malloc(strlen(HomeDir)+80); snprintf(path, strlen(HomeDir)+80, "%s/%s/%1d.data", HomeDir, "files", filenumber); You can calculate the exact number of bytes you need for this buffer, but I use 80 just to have extra room. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Thu Nov 30 22:07:33 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kB167WGk004595 for ; Thu, 30 Nov 2006 22:07:32 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kB165XC7023883 for ; Thu, 30 Nov 2006 22:05:33 -0800 Message-Id: <200612010605.kB165XC7023883@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Logfile when no connection Date: Thu, 30 Nov 2006 22:05:33 -0800 From: william@bourbon.usc.edu Someone wrote: > I wonder when we have only 1 node (no connection), do we > have to write anything to log file since no message has been sent Off the top of my head, I cannot think of anything. But I can be wrong. (Please remmeber that you can still log debugging messages.) -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Thu Nov 30 07:34:00 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kAUFY0sx012797 for ; Thu, 30 Nov 2006 07:34:00 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kAUFW393014146 for ; Thu, 30 Nov 2006 07:32:03 -0800 Message-Id: <200611301532.kAUFW393014146@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: cs551 get response Date: Thu, 30 Nov 2006 07:32:03 -0800 From: william@bourbon.usc.edu Someone wrote: > > also, just a clarification: a file that has been received using Get, > > is not a part of the permanent or cache space and will not appear in > > any search responses for that node. am i correct? > > Are you talking about the special case that when you do a GET > and there is not enough space in either the perm space or the > cache space? If that is the case, the file you've just > received should not be part of your node (although the > file data may be saved in the current working directory). > > ----- > > No, I'm referring to the case that there is enough space in cache > and permanent. > Is the response of Get only saved in current directory, or also stored > in Home Directory(along with metadata and certificate), and > correspondingly indexed? > > Because, I believe, the files in current working directory are not > part of the search path for the network and hence should not be > indexed. When you do a GET, everything about the file goes into your system. This includes all the files you need to create in $HomeDir/files, all the index structures, and whatever additional stuff you need to create/update for a new file that got added to your system. Saving a copy of the file data in the current working directory is just a *side effect*. The main purpose of the GET is to get a copy of everything about a particular file and serve it. Also, GET lets other (anonymous) nodes along the path of the GET to have a chance at also caching the file and serve it. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Wed Nov 29 22:27:09 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kAU6R9e1010109 for ; Wed, 29 Nov 2006 22:27:09 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kAU6PE3h009065 for ; Wed, 29 Nov 2006 22:25:14 -0800 Message-Id: <200611300625.kAU6PE3h009065@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: cs551 get response Date: Wed, 29 Nov 2006 22:25:14 -0800 From: william@bourbon.usc.edu Someone wrote: > The Get response also contains the metainformation and certificate for > the file being transferred. Do these corresponding Metafiles and > Certificate files have to be created in the current directory along > with the actual data file ? No. Only the file data needs to be copied into the current working directory. > also, just a clarification: a file that has been received using Get, > is not a part of the permanent or cache space and will not appear in > any search responses for that node. am i correct? Are you talking about the special case that when you do a GET and there is not enough space in either the perm space or the cache space? If that is the case, the file you've just received should not be part of your node (although the file data may be saved in the current working directory). -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Wed Nov 29 22:08:29 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kAU68TDc008932 for ; Wed, 29 Nov 2006 22:08:29 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kAU66Y6B008794 for ; Wed, 29 Nov 2006 22:06:34 -0800 Message-Id: <200611300606.kAU66Y6B008794@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Command-line behavior on GET Date: Wed, 29 Nov 2006 22:06:34 -0800 From: william@bourbon.usc.edu Someone wrote: > When the user asks to get a file, should the program get the file > in the background and return control to the user immediately, or > wait to give the command-line prompt back until the file is fully > received? Just like any other command that expects a response (or responses), your program should wait for the response or before returning control back to the user. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Wed Nov 29 13:07:01 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kATL71Ys006573 for ; Wed, 29 Nov 2006 13:07:01 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kATL57Dt003111 for ; Wed, 29 Nov 2006 13:05:07 -0800 Message-Id: <200611292105.kATL57Dt003111@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: cs551 search and get Date: Wed, 29 Nov 2006 13:05:07 -0800 From: william@bourbon.usc.edu Someone wrote: > > 1. When user enters a search command, do we search in the current > > node's files directory also? > > Yes. If TTL is 0, you only search in the current node. > > > > Referring to the above discussion: > > If a search TTL then is 0, and a match is found, and then > the user does a GET, > > then, the program must do a check for its own FileID index structure > and look for match before sending out the get request. Correct? Or in > this case, does a GET message get sent at all ? The TTL value for GET comes from the startup configuration file. You should use that TTL for your GET in any case. I think if you try to code up special cases, your program logic will be very complicated and easy to break if you decide to change something (e.g., bug fixes). In this case, whenever you do a GET, you should *always* check the FileID index structure and look for a match, regardless of what TTL value is in your startup configuration file. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Wed Nov 29 11:06:40 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kATJ6edE031356 for ; Wed, 29 Nov 2006 11:06:40 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kATJ4k3s001530 for ; Wed, 29 Nov 2006 11:04:46 -0800 Received: (from william@localhost) by bourbon.usc.edu (8.13.5/8.13.5/Submit) id kATJ4kus001529 for cs551@merlot; Wed, 29 Nov 2006 11:04:46 -0800 Date: Wed, 29 Nov 2006 11:04:46 -0800 From: william@bourbon.usc.edu Message-Id: <200611291904.kATJ4kus001529@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: CS 551 Final Exam will be in VKC 258 Hi, I think the room we use for lectures is a little bit small for the exams, so I requested a larger room. The final exam will be between 8am and 10am on Tuesday, 12/12/2006, in VKC 258. The final exam will be closed book, closed notes, and closed everything (and no "cheat sheet"). Also, no calculators, cell phones, or any electronic gadgets are allowed. Please bring a photo ID. Your ID will be collected at the beginning of the exam and will be returned to you when you turn in your exam. There will be assigned seating. I've updated the class web page to list a summary of topics. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Wed Nov 29 10:33:20 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kATIXK2N029053 for ; Wed, 29 Nov 2006 10:33:20 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kATIVQXM001023 for ; Wed, 29 Nov 2006 10:31:26 -0800 Message-Id: <200611291831.kATIVQXM001023@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: cs551 Search Response format Date: Wed, 29 Nov 2006 10:31:26 -0800 From: william@bourbon.usc.edu Someone wrote: > is it ok if i show my search response in the following format: > > [1] FileID= > Filename= > Filesize= > . > . > . > > [2] FileID= > Filename= > Filesize= > . > . > . > > instead of as in spec: > [1] FileID= > Filename= > Filesize= > . > . > . > > [2] FileID= > Filename= > Filesize= > . > . > . That would be fine. (I see that you are just dumping the metadata.) -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Tue Nov 28 22:42:10 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kAT6gABU009533 for ; Tue, 28 Nov 2006 22:42:10 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kAT6eIkO027052 for ; Tue, 28 Nov 2006 22:40:18 -0800 Message-Id: <200611290640.kAT6eIkO027052@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Grading guideline Date: Tue, 28 Nov 2006 22:40:18 -0800 From: william@bourbon.usc.edu Someone wrote: > I have a question regarding the following guideline. > > Failing "-reset" : -2 points > start a working node with "-reset" and make sure that all > files in $HomeDir, $HomeDir/files are deleted. It's > okay not to remove subdirectories, but it's not okay to > have files in any of these directories and subdirectories. > > When a node starts, I look for a certificate in the home > directory and if I don't find one, I generate one. If -reset > option is enabled, I delete all files first and then generate the > certificate file again. Is this behavior is OK? You can look at > the timestamp of the certificate file to verify that it is > generated fresh. In this case, when you have -reset enabled, I'll > have 3 files created > > 1. cert.pem > 2. private.pem > 3. log file (it'll be empty). This is the correct behavior. I've added the following to the above item in the grading guidelines: please beware that some files (such as the public key certificate, private key file, logfile, etc.) may have been deleted and then created immediately and that is the expected behavior. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Tue Nov 28 22:35:01 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kAT6Z10G008947 for ; Tue, 28 Nov 2006 22:35:01 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kAT6X99r026886 for ; Tue, 28 Nov 2006 22:33:09 -0800 Message-Id: <200611290633.kAT6X99r026886@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: search result Date: Tue, 28 Nov 2006 22:33:09 -0800 From: william@bourbon.usc.edu Someone wrote: > Copies of file X have the same fileName, SHA1, and Nonce, but they have > different fileID. Therefore, the requesting node of *search* command may > receieve copies of file X from other nodes, should we have to compare > and display any one of its copies? In this case, FileID is there to distinguish different copies of the same file so that when you do a GET, only one node will respond. If you get N search responses, you must display all N results (even if they all have identical FileName, SHA1, and Nonce). -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Tue Nov 28 22:28:51 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kAT6Sp4c008547 for ; Tue, 28 Nov 2006 22:28:51 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kAT6Qxhl026746 for ; Tue, 28 Nov 2006 22:26:59 -0800 Message-Id: <200611290626.kAT6Qxhl026746@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: search result Date: Tue, 28 Nov 2006 22:26:59 -0800 From: william@bourbon.usc.edu Someone wrote: > Copies of file X have the same fileName, SHA1, and Nonce, but they have > different fileID. Therefore, the requesting node of store command may > receieve copies of file X from other nodes, should we have to compare > and display any one of its copies? FileID is not part of metadata (and therefore, not part of a STORE message). So, you may not distinguish a file by comparing FileName, SHA1, Nonce, and FileID. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Tue Nov 28 18:07:35 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kAT27Z77024179 for ; Tue, 28 Nov 2006 18:07:35 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kAT25hRL024674 for ; Tue, 28 Nov 2006 18:05:43 -0800 Message-Id: <200611290205.kAT25hRL024674@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: CS551: init_nbr_list port numbers Date: Tue, 28 Nov 2006 18:05:43 -0800 From: william@bourbon.usc.edu Hi, As someone pointed out in class today, I misunderstood the question. The question was about the init-i.0? files. I've just updated the grading guidelines to use scripts/setup-r789 instead of scripts/setup.r789. This should setup the port numbers in the init_neighbor_list files. -- Bill Cheng // bill.cheng@usc.edu -----Original Message----- Date: Tue, 28 Nov 2006 10:13:13 -0800 From: william@bourbon.usc.edu To: cs551@merlot.usc.edu Subject: Re: CS551: init_nbr_list port numbers Someone wrote: > For the testcases in section (B), is there a script to change all the > port numbers in init_neighbor_list to *OUR* port numbers? Yes. Please see the bottom of: http://merlot.usc.edu/cs551-f06/projects/testcases/p2.html -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Tue Nov 28 12:53:13 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kASKrD1e004230 for ; Tue, 28 Nov 2006 12:53:13 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kASKpMld021968 for ; Tue, 28 Nov 2006 12:51:22 -0800 Message-Id: <200611282051.kASKpMld021968@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: init neighbor list Date: Tue, 28 Nov 2006 12:51:22 -0800 From: william@bourbon.usc.edu Someone wrote: > When we do a reset from command line, do we have to delete > all the index files and files directory? Yes. Your node should know what files were created and you need to delete them. If you have created subdirectories, you do *not* have to delete the subdirectories themselves (but you need to delete all files in them). > I though we'll run the reset2 script to achieve this. That's just part of the grading script and not part of how your node should work. -- Bill Cheng // bill.cheng@usc.edu ----- Original Message ----- From: william@bourbon.usc.edu Date: Tuesday, November 28, 2006 10:11 am Subject: Re: init neighbor list To: cs551@merlot.usc.edu > Someone wrote: > > > As I don't have * join * in the final project #2, if the TA > run with > > -reset mode, could my program clears every data/files except the > > init_neighbor_list? > > Please also delete the init_neighbor_list file. > -- > Bill Cheng // bill.cheng@usc.edu > Return-Path: william@bourbon.usc.edu Delivery-Date: Tue Nov 28 10:15:03 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kASIF3AR026275 for ; Tue, 28 Nov 2006 10:15:03 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kASIDDgO020577 for ; Tue, 28 Nov 2006 10:13:13 -0800 Message-Id: <200611281813.kASIDDgO020577@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: CS551: init_nbr_list port numbers Date: Tue, 28 Nov 2006 10:13:13 -0800 From: william@bourbon.usc.edu Someone wrote: > For the testcases in section (B), is there a script to change all the > port numbers in init_neighbor_list to *OUR* port numbers? Yes. Please see the bottom of: http://merlot.usc.edu/cs551-f06/projects/testcases/p2.html -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Tue Nov 28 10:13:08 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kASID8Tl026136 for ; Tue, 28 Nov 2006 10:13:08 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kASIBIUa020530 for ; Tue, 28 Nov 2006 10:11:18 -0800 Message-Id: <200611281811.kASIBIUa020530@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: init neighbor list Date: Tue, 28 Nov 2006 10:11:18 -0800 From: william@bourbon.usc.edu Someone wrote: > As I don't have * join * in the final project #2, if the TA run with > -reset mode, could my program clears every data/files except the > init_neighbor_list? Please also delete the init_neighbor_list file. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Tue Nov 28 10:11:30 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kASIBUa0025998 for ; Tue, 28 Nov 2006 10:11:30 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kASI9e7L020478 for ; Tue, 28 Nov 2006 10:09:40 -0800 Message-Id: <200611281809.kASI9e7L020478@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Grading guideline Date: Tue, 28 Nov 2006 10:09:40 -0800 From: william@bourbon.usc.edu Someone wrote: > In section B(1) > > search keywords=category > should get 5 responses, look for the FileID that > matches the FileID at node *00, let's call this x, > then type: > > I'm getting 4 responses. Please note that we did perform a > shutdown on third window. We only have 4 node that contains > the files. Could you please take a look? You are correct! Thanks for catching this. I've updated the gradeline guidelines. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Mon Nov 27 22:32:23 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kAS6WNlc013134 for ; Mon, 27 Nov 2006 22:32:23 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kAS6UZcM013440 for ; Mon, 27 Nov 2006 22:30:35 -0800 Message-Id: <200611280630.kAS6UZcM013440@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: grading guideline question Date: Mon, 27 Nov 2006 22:30:35 -0800 From: william@bourbon.usc.edu Someone wrote: > In section B(1) > > in 5th window (node *02), type: > (+1 points) > store google.gif 1 category="picture gif" > type "status files 1 02.out", look at "02.out", > only node *02 should have this file, other nodes > should not have this file because CacheSize is 5K) > > ... > > (+1 points) > response should come from only nodes *02, *03, and > *04, node *02 should have no files and nodes *03 > and *04 should have a copy of "usctommy.gif" > > node 2 will have google.gif as it is not deleted. Could you please > take a look? You are correct. Instead trying to fix the last case above, I'm adding a DELETE command right after the abore STORE command to remove "google.gif" immediately. Thanks for catching this bug! -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Mon Nov 27 14:36:07 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kARMa7kY015214 for ; Mon, 27 Nov 2006 14:36:07 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kARMYK5c004411 for ; Mon, 27 Nov 2006 14:34:20 -0800 Message-Id: <200611272234.kARMYK5c004411@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: CS551: testcase (2)(a) Date: Mon, 27 Nov 2006 14:34:20 -0800 From: william@bourbon.usc.edu Someone wrote: > Just need one last clarification. The idea of *not getting duplicate > files* does not blend-in with the rest of the spec. I thought our discussions was about not *storing* duplicate files where duplicate is defined as having the same FileName, Nonce, and SHA1. > For, suppose we do > not store the file if it already exists, then: > 1. We need not send a GTRQ to other nodes if the node itself has the > file (even if the get was done for a fileID belonging to another node > which has the same file). I would agree that if you have the file with the given FileID, you don't need to flood a GET request. (I tried looking through the message archive and I couldn't find where I said you have to flood; although I recall that I may have said something like that. But I remember that no one argued against it.) > 2. Extending the same idea backwards, we need not even flood a "search" > message in the first place when the user searches for a file and the > node has it. Because even if we search for this file throughout the > network and create a list of responses, and get a particular file, > ultimately, we will see that the node itself has the file and discard > the GTRS anyways. If this node has a copy of the file, it is possible that another node may have a file that has a different nonce (which is by definition a different file). Then this node can get that file and keep a copy of it. (Since SHA1 has been "broken", it is conceivable that two files, having the same SHA1, have different content.) -- Bill Cheng // bill.cheng@usc.edu -----Original Message----- From: william@bourbon.usc.edu [mailto:william@bourbon.usc.edu] Sent: Monday, November 27, 2006 1:37 PM To: cs551@merlot.usc.edu Subject: Re: CS551: testcase (2)(a) Someone wrote: > On the other hand, can I maintain another index structure (and a disk > image nonce_index) for nonce and do a lookup only on the nonce before > saving a file? (Nonce is guaranteed to be unique network wide for each > file successfully stored) You can certainly have additional index structures than what's required. (There is also nothing wrong with index structures that need to resolve collisions.) -- Bill Cheng // bill.cheng@usc.edu -----Original Message----- From: william@bourbon.usc.edu [mailto:william@bourbon.usc.edu] Sent: Monday, November 27, 2006 12:53 PM To: cs551@merlot.usc.edu Subject: Re: CS551: testcase (2)(a) Someone wrote: > Well, although it is a *nice to have* feature to check if we have the > exact same FileName, SHA1 and Nonce before storing a file, the only way > of doing this is to open each metadata file and compare these 3 keys > every time we are storing a file -> Since we don't have an index > structure for "Nonce", this seems very inefficient and slow. And since > the user is "asking" for the same file to be retrieved form different > locations, I don't see any problem in storing the same file 3 times as > long as there is enough space. Also, the spec does not mention how to > handle this situation. So is it OK if I store multiple copies of the > file in my implementation as long as there is enough Permanent space? I think I've mentioned somewhere that you should use either the names index structure or the sha1 index structure to do look up. So, you do not need to compare this with the metadata of every file. Let's say you use the SHA1 index, you should find a collection of files having the same SHA1 values. Then you should compare the FileName and Nonce of all these files against the one you are trying to save. It is not okay to store multiple copies of the same file (i.e., having the same FileName, Nonce, and SHA1). -- Bill Cheng // bill.cheng@usc.edu -----Original Message----- From: william@bourbon.usc.edu [mailto:william@bourbon.usc.edu] Sent: Monday, November 27, 2006 10:40 AM To: cs551@merlot.usc.edu Subject: Re: CS551: testcase (2)(a) I forgot one thing... After you get a file and tries to save it and noticed that you already have exactly the same file (same FileName, Nonce, and SHA1), you don't need to save another copy of the same file. (If what you have already is in the cache, you should move it to permanent space.) Therefore, in the previous case, getting the same file 3 times should only end up with one copy of the file in permanent space. -- Bill Cheng // bill.cheng@usc.edu -----Original Message----- Date: Mon, 27 Nov 2006 10:35:01 -0800 From: william@bourbon.usc.edu To: cs551@merlot.usc.edu Subject: Re: CS551: testcase (2)(a) Someone wrote: > In testcase (2)(a), we get the file blondie1.mp3 three times. > > in 3rd window, type: > (+1 points) > get 3 > "blondie1.mp3" should be created in the > current directory > > in the 4th window, type at the UNIX prompt: > "ls -l blondie1.mp3" > "openssl sha1 blondie1.mp3" > "rm blondie1.mp3" > > The node will run out of permanent space (the third time) and will not > store this file. PermSize needs to be changed? Even though the node will run out of permanent space, it should still save a copy of the file in the current working directory. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Mon Nov 27 13:39:02 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kARLd2Ab011547 for ; Mon, 27 Nov 2006 13:39:02 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kARLbFVg003692 for ; Mon, 27 Nov 2006 13:37:15 -0800 Message-Id: <200611272137.kARLbFVg003692@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: CS551: testcase (2)(a) Date: Mon, 27 Nov 2006 13:37:15 -0800 From: william@bourbon.usc.edu Someone wrote: > On the other hand, can I maintain another index structure (and a disk > image nonce_index) for nonce and do a lookup only on the nonce before > saving a file? (Nonce is guaranteed to be unique network wide for each > file successfully stored) You can certainly have additional index structures than what's required. (There is also nothing wrong with index structures that need to resolve collisions.) -- Bill Cheng // bill.cheng@usc.edu -----Original Message----- From: william@bourbon.usc.edu [mailto:william@bourbon.usc.edu] Sent: Monday, November 27, 2006 12:53 PM To: cs551@merlot.usc.edu Subject: Re: CS551: testcase (2)(a) Someone wrote: > Well, although it is a *nice to have* feature to check if we have the > exact same FileName, SHA1 and Nonce before storing a file, the only way > of doing this is to open each metadata file and compare these 3 keys > every time we are storing a file -> Since we don't have an index > structure for "Nonce", this seems very inefficient and slow. And since > the user is "asking" for the same file to be retrieved form different > locations, I don't see any problem in storing the same file 3 times as > long as there is enough space. Also, the spec does not mention how to > handle this situation. So is it OK if I store multiple copies of the > file in my implementation as long as there is enough Permanent space? I think I've mentioned somewhere that you should use either the names index structure or the sha1 index structure to do look up. So, you do not need to compare this with the metadata of every file. Let's say you use the SHA1 index, you should find a collection of files having the same SHA1 values. Then you should compare the FileName and Nonce of all these files against the one you are trying to save. It is not okay to store multiple copies of the same file (i.e., having the same FileName, Nonce, and SHA1). -- Bill Cheng // bill.cheng@usc.edu -----Original Message----- From: william@bourbon.usc.edu [mailto:william@bourbon.usc.edu] Sent: Monday, November 27, 2006 10:40 AM To: cs551@merlot.usc.edu Subject: Re: CS551: testcase (2)(a) I forgot one thing... After you get a file and tries to save it and noticed that you already have exactly the same file (same FileName, Nonce, and SHA1), you don't need to save another copy of the same file. (If what you have already is in the cache, you should move it to permanent space.) Therefore, in the previous case, getting the same file 3 times should only end up with one copy of the file in permanent space. -- Bill Cheng // bill.cheng@usc.edu -----Original Message----- Date: Mon, 27 Nov 2006 10:35:01 -0800 From: william@bourbon.usc.edu To: cs551@merlot.usc.edu Subject: Re: CS551: testcase (2)(a) Someone wrote: > In testcase (2)(a), we get the file blondie1.mp3 three times. > > in 3rd window, type: > (+1 points) > get 3 > "blondie1.mp3" should be created in the > current directory > > in the 4th window, type at the UNIX prompt: > "ls -l blondie1.mp3" > "openssl sha1 blondie1.mp3" > "rm blondie1.mp3" > > The node will run out of permanent space (the third time) and will not > store this file. PermSize needs to be changed? Even though the node will run out of permanent space, it should still save a copy of the file in the current working directory. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Mon Nov 27 12:54:55 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kARKstIt008763 for ; Mon, 27 Nov 2006 12:54:55 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kARKr8ij003041 for ; Mon, 27 Nov 2006 12:53:08 -0800 Message-Id: <200611272053.kARKr8ij003041@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: CS551: testcase (2)(a) Date: Mon, 27 Nov 2006 12:53:08 -0800 From: william@bourbon.usc.edu Someone wrote: > Well, although it is a *nice to have* feature to check if we have the > exact same FileName, SHA1 and Nonce before storing a file, the only way > of doing this is to open each metadata file and compare these 3 keys > every time we are storing a file -> Since we don't have an index > structure for "Nonce", this seems very inefficient and slow. And since > the user is "asking" for the same file to be retrieved form different > locations, I don't see any problem in storing the same file 3 times as > long as there is enough space. Also, the spec does not mention how to > handle this situation. So is it OK if I store multiple copies of the > file in my implementation as long as there is enough Permanent space? I think I've mentioned somewhere that you should use either the names index structure or the sha1 index structure to do look up. So, you do not need to compare this with the metadata of every file. Let's say you use the SHA1 index, you should find a collection of files having the same SHA1 values. Then you should compare the FileName and Nonce of all these files against the one you are trying to save. It is not okay to store multiple copies of the same file (i.e., having the same FileName, Nonce, and SHA1). -- Bill Cheng // bill.cheng@usc.edu -----Original Message----- From: william@bourbon.usc.edu [mailto:william@bourbon.usc.edu] Sent: Monday, November 27, 2006 10:40 AM To: cs551@merlot.usc.edu Subject: Re: CS551: testcase (2)(a) I forgot one thing... After you get a file and tries to save it and noticed that you already have exactly the same file (same FileName, Nonce, and SHA1), you don't need to save another copy of the same file. (If what you have already is in the cache, you should move it to permanent space.) Therefore, in the previous case, getting the same file 3 times should only end up with one copy of the file in permanent space. -- Bill Cheng // bill.cheng@usc.edu -----Original Message----- Date: Mon, 27 Nov 2006 10:35:01 -0800 From: william@bourbon.usc.edu To: cs551@merlot.usc.edu Subject: Re: CS551: testcase (2)(a) Someone wrote: > In testcase (2)(a), we get the file blondie1.mp3 three times. > > in 3rd window, type: > (+1 points) > get 3 > "blondie1.mp3" should be created in the > current directory > > in the 4th window, type at the UNIX prompt: > "ls -l blondie1.mp3" > "openssl sha1 blondie1.mp3" > "rm blondie1.mp3" > > The node will run out of permanent space (the third time) and will not > store this file. PermSize needs to be changed? Even though the node will run out of permanent space, it should still save a copy of the file in the current working directory. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Mon Nov 27 11:36:08 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kARJa87Z003801 for ; Mon, 27 Nov 2006 11:36:08 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kARJYLEP002072 for ; Mon, 27 Nov 2006 11:34:21 -0800 Message-Id: <200611271934.kARJYLEP002072@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: _ti_bind_guard () Seg. Faults Date: Mon, 27 Nov 2006 11:34:21 -0800 From: william@bourbon.usc.edu Someone wrote: > Recently I began to come across a very strange but consistent > segmentation fault: > _ti_bind_guard () from /usr/lib/libthread.so.1 > This segmentation fault occurs at the following line in my code: > if(inet_pton(AF_INET, (const char*)host_address, > &servaddr.sin_addr) <= 0) { } > I cannot pin-point my problem but have noticed that the fault > occurs when I run more than one instance of sv_node under my > account. (i.e. two beacons listening on different ports). > host_address is a char* and seems to be valid before this > function call. Have you seen this fault before and/or do you have > any suggestions on how to troubleshoot it? I would probably use inet_addr() instead of inet_pton() on Solaris (since the man pages do not say not to use inet_addr()). (I cannot believe that someone would design an API like this, having (void*) as the return argument so that a compiler cannot help to detect trivial bugs.) I don't think the problem is with this call. I think it's the usual problem with segmentation faults: http://merlot.usc.edu/cs551-f06/projects.html#segfault Unfortunately, the only way I know how to debug seg faults like this is to do the binary search mentioned in the above URL. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Mon Nov 27 10:43:13 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kARIhDIV032751 for ; Mon, 27 Nov 2006 10:43:13 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kARIfRG4001298 for ; Mon, 27 Nov 2006 10:41:27 -0800 Message-Id: <200611271841.kARIfRG4001298@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: CS551: testcase (2)(a) Date: Mon, 27 Nov 2006 10:41:27 -0800 From: william@bourbon.usc.edu Someone wrote: > In testcase (2)(a), The following search will return more than 3 > responses as we would have done three "get" commands before this search. > > (+1 points) > search filename=blondie1.mp3 > should get 3 responses, type: If you have done GET 3 times for exactly the same file (same FileName, Nonce, and SHA1), you should only have one copy of the file. I think we had a discussion long time ago regarding *storing* the file 3 times will create 3 files because each store will create a unique nonce. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Mon Nov 27 10:41:31 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kARIfVSf032614 for ; Mon, 27 Nov 2006 10:41:31 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kARIdiJF001269 for ; Mon, 27 Nov 2006 10:39:45 -0800 Message-Id: <200611271839.kARIdiJF001269@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: CS551: testcase (2)(a) Date: Mon, 27 Nov 2006 10:39:44 -0800 From: william@bourbon.usc.edu I forgot one thing... After you get a file and tries to save it and noticed that you already have exactly the same file (same FileName, Nonce, and SHA1), you don't need to save another copy of the same file. (If what you have already is in the cache, you should move it to permanent space.) Therefore, in the previous case, getting the same file 3 times should only end up with one copy of the file in permanent space. -- Bill Cheng // bill.cheng@usc.edu -----Original Message----- Date: Mon, 27 Nov 2006 10:35:01 -0800 From: william@bourbon.usc.edu To: cs551@merlot.usc.edu Subject: Re: CS551: testcase (2)(a) Someone wrote: > In testcase (2)(a), we get the file blondie1.mp3 three times. > > in 3rd window, type: > (+1 points) > get 3 > "blondie1.mp3" should be created in the > current directory > > in the 4th window, type at the UNIX prompt: > "ls -l blondie1.mp3" > "openssl sha1 blondie1.mp3" > "rm blondie1.mp3" > > The node will run out of permanent space (the third time) and will not > store this file. PermSize needs to be changed? Even though the node will run out of permanent space, it should still save a copy of the file in the current working directory. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Mon Nov 27 10:36:48 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kARIam0f032334 for ; Mon, 27 Nov 2006 10:36:48 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kARIZ1xQ001205 for ; Mon, 27 Nov 2006 10:35:01 -0800 Message-Id: <200611271835.kARIZ1xQ001205@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: CS551: testcase (2)(a) Date: Mon, 27 Nov 2006 10:35:01 -0800 From: william@bourbon.usc.edu Someone wrote: > In testcase (2)(a), we get the file blondie1.mp3 three times. > > in 3rd window, type: > (+1 points) > get 3 > "blondie1.mp3" should be created in the > current directory > > in the 4th window, type at the UNIX prompt: > "ls -l blondie1.mp3" > "openssl sha1 blondie1.mp3" > "rm blondie1.mp3" > > The node will run out of permanent space (the third time) and will not > store this file. PermSize needs to be changed? Even though the node will run out of permanent space, it should still save a copy of the file in the current working directory. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Nov 26 22:36:38 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kAR6acj2017965 for ; Sun, 26 Nov 2006 22:36:38 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kAR6YsRj026952 for ; Sun, 26 Nov 2006 22:34:54 -0800 Message-Id: <200611270634.kAR6YsRj026952@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: final project part (2) extension... In-reply-to: <200611150636.kAF6aKhM025661@bourbon.usc.edu> References: <200611150636.kAF6aKhM025661@bourbon.usc.edu> Comments: In-reply-to william@bourbon.usc.edu message dated "Tue, 14 Nov 2006 22:36:20 -0800." Date: Sun, 26 Nov 2006 22:34:54 -0800 From: william@bourbon.usc.edu Hi, For all the bugs in the grading guidelines, I'm extending the final project part (2) deadline by one more day till late night on Friday, 12/1/2006. As I've mentioned before, the university has a policy that no assignments can have a deadline during the dead time between the last week of class and the final exam. So, if there is any extended network outage during the last couple of days, I can no longer extend the deadline. So, to protect yourself against catastrophe, may be the best strategy is to pretend that the deadline is 11/30 and save the last day for fixing things to get some extra points. -- Bill Cheng // bill.cheng@usc.edu -----Original Message----- Date: Tue, 14 Nov 2006 22:36:20 -0800 From: william@bourbon.usc.edu To: cs551@merlot.usc.edu Subject: final project part (2) extension... Hi, I have announced during class today that I'm giving a 2-day extension for part (2). So, the new due time is 11:45pm on 11/30/2006. Please note that the university has a policy that no assignments can have a deadline during the dead time between the last week of class and the final exam. So, if there is any extended network outage during the last couple of days, the latest I can move the project deadlins is to late night on 12/1/2006 and no further. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Nov 26 22:31:18 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kAR6VInF017568 for ; Sun, 26 Nov 2006 22:31:18 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kAR6TXxs026866 for ; Sun, 26 Nov 2006 22:29:33 -0800 Message-Id: <200611270629.kAR6TXxs026866@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: cs551: user prompt behaviour Date: Sun, 26 Nov 2006 22:29:33 -0800 From: william@bourbon.usc.edu Someone wrote: > Just making sure again. after the user enters a search command, the > prompt will be disabled for (1.2 * msgLifetime) or Ctrl+C, whichever > happens first right? Yes. > And should the same behavior be followed for get > command as well? That would be fine. > After the get command, I'm returning the prompt back to > the user as soon as the file is received (instesd of waiting for > 1.2*msgLifetime seconds) is this OK? That is fine too since you should expect to get only one response. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Nov 26 22:28:41 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kAR6SfuB017425 for ; Sun, 26 Nov 2006 22:28:41 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kAR6QuUq026826 for ; Sun, 26 Nov 2006 22:26:56 -0800 Message-Id: <200611270626.kAR6QuUq026826@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: cs551:final2 - ini files Date: Sun, 26 Nov 2006 22:26:56 -0800 From: william@bourbon.usc.edu Someone wrote: > Could you please upload the ini files for final part 2 testing on nunki? > I'm getting the following error > > nunki.usc.edu(34): cp ~csci551b/grading/guidelines/final2/b3-n??.ini . > cp: No match. That's another bug in the grading guidelines. All these lines should be copying from your modified startup configuration files (so that the port numbers belong to you). I've updated the grading guidelines to change these lines to: cp ~/grading/guidelines/final2/??-n??.ini . -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Nov 26 14:58:19 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kAQMwJ8r021079 for ; Sun, 26 Nov 2006 14:58:19 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kAQMuZUY022965 for ; Sun, 26 Nov 2006 14:56:35 -0800 Message-Id: <200611262256.kAQMuZUY022965@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Regarding permanent space and cache space Date: Sun, 26 Nov 2006 14:56:35 -0800 From: william@bourbon.usc.edu Someone wrote: > Could you please clearify my one doubt, or correct > me if i get it right or not. > when a node initiate a store command it follow the > following steps > 1. first calculate the size of the file. > 2. if prem size is doesnt allow to accomodate the file > then discard it,(no calculation of meta data, entries > in index file and populating to the network.) > Otherwise calculate the meta dat, do entries in index > file and populate it using depending the prob. > 3. decrease the available prem size by the file size. > > > 4.on getting the store message at some, it will read > the whole file from the socket, into temp file. > 5. Calculate the received file size. > 6. check the cache size, if available move the file > to cache file, do the entries into index file. So far so good. > 7. flip the coin to check, if it could be moved to > perm space if avilable then move it to the perm space. Since this node does not initiate the STORE, it must put the file in cache space. > Question1. i am not sure at which point the recieving > node should make enteries into its index file, even > after moving to cache space or after moving to perm > space only. If it decides to keep the file in its $HomeDir/files, it must add the file to its index structures. > Question2 At which point reciving node should attempt > to populate the file to its neighbours, after moving > to cache area or after moving to perm area. It should always do it. This is probabilistic flooding. It's done independent of whether it stores the file or not. > Question3 If we get 0 after fliping the coin for cache > prob, then should be delete the file from temp folder. Yes. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sat Nov 25 23:35:40 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kAQ7ZeHh001228 for ; Sat, 25 Nov 2006 23:35:40 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kAQ7XxAV022516 for ; Sat, 25 Nov 2006 23:33:59 -0800 Message-Id: <200611260733.kAQ7XxAV022516@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: grading guideline question Date: Sat, 25 Nov 2006 23:33:59 -0800 From: william@bourbon.usc.edu Someone wrote: > In section B-1 > > store google.gif 1 category="picture gif" > ... > > store usctommy.gif 2 category="picture gif" > > ... > > search keywords=category > should get 4 responses, look for the FileID that > matches the FileID at node *00, let's call this x, > then type: > > In this case, I'm getting 5 responses. We also need to count > the google.gif that also has the category keyword. Could you > please advice? You are absolute correct. I recently move the google.gif stuff from an earlier section to this section and forgot to count it. I have updated the grading guidelines. Thanks for catching it. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sat Nov 25 22:44:03 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kAQ6i3YY030459 for ; Sat, 25 Nov 2006 22:44:03 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kAQ6gMgX021910 for ; Sat, 25 Nov 2006 22:42:22 -0800 Message-Id: <200611260642.kAQ6gMgX021910@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: cs551: openssl output Date: Sat, 25 Nov 2006 22:42:22 -0800 From: william@bourbon.usc.edu Someone wrote: > Is it ok if the following message is printed on the console every time > the node starts: > > Generating a 1024 bit RSA private key > ....++++++ > .........++++++ > writing new private key to '/private.pem' > ----- This should only happen if you don't already have the key files. If you haven't done a "-reset", these files should be there and you should not generate new ones. > or should we suppress this output with the same method used while > verifying digital signatures You don't need to suppress the output. It's perfectly okay to let the user know what the node is doing. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sat Nov 25 22:40:55 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kAQ6etLT030202 for ; Sat, 25 Nov 2006 22:40:55 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kAQ6dEAe021833 for ; Sat, 25 Nov 2006 22:39:14 -0800 Message-Id: <200611260639.kAQ6dEAe021833@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: grading guideline question Date: Sat, 25 Nov 2006 22:39:14 -0800 From: william@bourbon.usc.edu Someone wrote: > Section A-2 of the grading guideline contains the following: > > [metadata] > FileName=blondie1.mp3 > FileSize=474736 > SHA1=ffd3b197e1c0f0c27e7bdc219f553a3e6b139dfb > Nonce=(same length as SHA1) > Keywords=title heart of glass > > In this case the user entered the following command: > > store blondie1.mp3 1 title="Heart of Glass" > > Do we have to store the keywords as lower case words (the > spec does not mandate this)? This is not the case for Secion A-1. You can store it as is or turn everything to lowercase (so it's easier to do strcmp later). This is also a reminder that the bit vector is created from lowercase words. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sat Nov 25 13:04:18 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kAPL4IMi026016 for ; Sat, 25 Nov 2006 13:04:18 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kAPL2cLB017076 for ; Sat, 25 Nov 2006 13:02:38 -0800 Message-Id: <200611252102.kAPL2cLB017076@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: subdirectory Date: Sat, 25 Nov 2006 13:02:38 -0800 From: william@bourbon.usc.edu Someone wrote: > If I create subdirectories under dir **files* *to separately store > permanent files and cache files, this is ok or not? Sure! -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sat Nov 25 11:14:10 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kAPJEAmR019025 for ; Sat, 25 Nov 2006 11:14:10 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kAPJCVd3016164 for ; Sat, 25 Nov 2006 11:12:31 -0800 Message-Id: <200611251912.kAPJCVd3016164@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: cs551: cache LRU Date: Sat, 25 Nov 2006 11:12:31 -0800 From: william@bourbon.usc.edu Someone wrote: > Just to make sure: > Are you going to add anythig more to the grading guidelines? Please see my message with timestamp "Fri 15 Sep 07:36". -- Bill Cheng // bill.cheng@usc.edu ----- Original Message ----- From: william@bourbon.usc.edu Date: Saturday, November 25, 2006 10:53 am Subject: Re: cs551: cache LRU To: cs551@merlot.usc.edu > Someone wrote: > > > Is there going to be a test case that tests the LRU > > algorithm for the cache files? > > I don't remember exactly what's in the grading guidelines. > It's so long! :-) > -- > Bill Cheng // bill.cheng@usc.edu > Return-Path: william@bourbon.usc.edu Delivery-Date: Sat Nov 25 11:06:20 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kAPJ6KWd018512 for ; Sat, 25 Nov 2006 11:06:20 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kAPJ4fAK016056 for ; Sat, 25 Nov 2006 11:04:41 -0800 Message-Id: <200611251904.kAPJ4fAK016056@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: cs551: case-sensitivity Date: Sat, 25 Nov 2006 11:04:41 -0800 From: william@bourbon.usc.edu Someone wrote: > Should the delete command be case-sensitive? I mean if the user enters > "delete filename=foo sha1=34.. nonce=a90.." instead of "delete > FileName=foo SHA1=6b6c... Nonce=fe18..." Should the command be accepted? It should be fine to be case insensitive. But if you prefer to follow what in the spec exactly, that would be fine too. The TA will use what's in the grading guidelines (which is mixing upper and lower case). -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sat Nov 25 11:01:54 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kAPJ1sRU018133 for ; Sat, 25 Nov 2006 11:01:54 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kAPJ0EH9015997 for ; Sat, 25 Nov 2006 11:00:14 -0800 Message-Id: <200611251900.kAPJ0EH9015997@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: openssl Date: Sat, 25 Nov 2006 11:00:14 -0800 From: william@bourbon.usc.edu Someone wrote: > I'm using the following openssl for this project > /home/scf-22/csci551b/openssl/bin/openssl. > > Please let me know if this is correct. It is correct. This not the same as what we used for warmup #1. If you run "openssl version", you should get: OpenSSL 0.9.8a 11 Oct 2005 Please see: http://merlot.usc.edu/cs551-f06/projects/openssl.html -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sat Nov 25 10:54:56 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kAPIsub7017740 for ; Sat, 25 Nov 2006 10:54:56 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kAPIrGQL015926 for ; Sat, 25 Nov 2006 10:53:16 -0800 Message-Id: <200611251853.kAPIrGQL015926@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: cs551: cache LRU Date: Sat, 25 Nov 2006 10:53:16 -0800 From: william@bourbon.usc.edu Someone wrote: > Is there going to be a test case that tests the LRU > algorithm for the cache files? I don't remember exactly what's in the grading guidelines. It's so long! :-) -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sat Nov 25 10:50:13 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kAPIoDWI017460 for ; Sat, 25 Nov 2006 10:50:13 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kAPImYSJ015835 for ; Sat, 25 Nov 2006 10:48:34 -0800 Message-Id: <200611251848.kAPImYSJ015835@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: CS551: Status output Date: Sat, 25 Nov 2006 10:48:34 -0800 From: william@bourbon.usc.edu Someone wrote: > Am I correct that = std::endl OR "\n"? > > Googling leads me to believe so, but I want to be sure > I'm following the spec. >From wikipedia: http://en.wikipedia.org/wiki/Newline is 0x0d and is 0x0a. Furthermore, in C, '\n' is the newline character and '\r' is the carriage return character. On Solaris, is newline and is carriage return. Therefore, on nunki, is "\r\n". (I'm not too sure but I think on Windows, if you open a file in text mode for writing and you write '\n', you will get 0x0d followed by 0x0a.) -- Bill Cheng // bill.cheng@usc.edu On 11/25/06, william@bourbon.usc.edu wrote: > Someone wrote: > > > My status output has CRLF at the end of each line. This causes Vi > > editor to put a ^M character at the end. Is this OK? Do I have to > > change my output to only have LF instead of CRLF? > > The "status files" output contains file metadata and each > line in a file metadata should be terminated by . > (The fact that it looks funny in vi shouldn't be an issue.) > -- > Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sat Nov 25 00:37:34 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kAP8bYw8010612 for ; Sat, 25 Nov 2006 00:37:34 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kAP8ZuCG010767 for ; Sat, 25 Nov 2006 00:35:56 -0800 Message-Id: <200611250835.kAP8ZuCG010767@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: CS551: Status output Date: Sat, 25 Nov 2006 00:35:56 -0800 From: william@bourbon.usc.edu Someone wrote: > My status output has CRLF at the end of each line. This causes Vi > editor to put a ^M character at the end. Is this OK? Do I have to > change my output to only have LF instead of CRLF? The "status files" output contains file metadata and each line in a file metadata should be terminated by . (The fact that it looks funny in vi shouldn't be an issue.) -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sat Nov 25 00:13:49 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kAP8Dnla009102 for ; Sat, 25 Nov 2006 00:13:49 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kAP8CBX0010596 for ; Sat, 25 Nov 2006 00:12:11 -0800 Message-Id: <200611250812.kAP8CBX0010596@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: grading guideline question Date: Sat, 25 Nov 2006 00:12:11 -0800 From: william@bourbon.usc.edu Someone wrote: > I have another question regarding the guideline. > > Section A has the following: > > A) Beacon-only networks : +49 points > (Note: CacheProb is useless for beacon-only networks) > > I did not understand why CacheProb is useless for beacon-only > networks. Do we have to treat it differently for beacon-only > nodes? You don't need to do anything different; it arises naturally. The reason is that a beacon-only network is fully connected so every node is within one hop from all other nodes. (I guess it's not entirely correct to say that CacheProb is useless since it's *possible* to have a multi-hop route in a fully-connected network. The likelihood of this happening depends on implementation.) -- Bill Cheng // bill.cheng@usc.edu ----- Original Message ----- From: william@bourbon.usc.edu Date: Friday, November 24, 2006 11:13 pm Subject: Re: grading guideline question To: cs551@merlot.usc.edu > Someone wrote: > > > Section B (1) > > > > search filename=chess.jpg > > should get 5 responses, > > look for the nonce that matches the nonce at > > node *02, let's call this x, then type: > > (+1 points) > > get [x] > > > > How can we look for nonce that matches node 2's nonce? > > Actually, all the nonces are the same for this file. So, > it's wrong. It should say "FileID" and not "nonce". I've > just updated the grading guidelines. > > > My assumption is that all nodes will have nonce for the same > > file that is been flooded. Do we have to look for FileId? In > > that case how to figure that out from the status output? > > You are correct that this cannot be done by looking at the > output of "status files" commands. In this case, it's more > work. You need to do trial and error. Do a few GET and look > at the log file of node *02 and look for a line that > corresponds to a GTRS that begins with "s". > > (It's too late to change the spec now, and I won't change it > now. To be able to not do trial and error, log records for > SHRS should include FileIDs.) > > By the way, your grading guidelines is out of date! The > filename should be "earc.jpg" there. > -- > Bill Cheng // bill.cheng@usc.edu > Return-Path: william@bourbon.usc.edu Delivery-Date: Fri Nov 24 23:14:25 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kAP7EP51005384 for ; Fri, 24 Nov 2006 23:14:25 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kAP7ClWP010027 for ; Fri, 24 Nov 2006 23:12:47 -0800 Message-Id: <200611250712.kAP7ClWP010027@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: grading guideline question Date: Fri, 24 Nov 2006 23:12:47 -0800 From: william@bourbon.usc.edu Someone wrote: > Section B (1) > > search filename=chess.jpg > should get 5 responses, > look for the nonce that matches the nonce at > node *02, let's call this x, then type: > (+1 points) > get [x] > > How can we look for nonce that matches node 2's nonce? Actually, all the nonces are the same for this file. So, it's wrong. It should say "FileID" and not "nonce". I've just updated the grading guidelines. > My assumption is that all nodes will have nonce for the same > file that is been flooded. Do we have to look for FileId? In > that case how to figure that out from the status output? You are correct that this cannot be done by looking at the output of "status files" commands. In this case, it's more work. You need to do trial and error. Do a few GET and look at the log file of node *02 and look for a line that corresponds to a GTRS that begins with "s". (It's too late to change the spec now, and I won't change it now. To be able to not do trial and error, log records for SHRS should include FileIDs.) By the way, your grading guidelines is out of date! The filename should be "earc.jpg" there. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Fri Nov 24 17:59:52 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kAP1xp5k017431 for ; Fri, 24 Nov 2006 17:59:51 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kAP1wFWO006932 for ; Fri, 24 Nov 2006 17:58:15 -0800 Message-Id: <200611250158.kAP1wFWO006932@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: cs551: grading guideline question Date: Fri, 24 Nov 2006 17:58:15 -0800 From: william@bourbon.usc.edu Someone wrote: > Section 2b > --------------- > > store f1.wav 2 type="wave" actualtype="gif" > store f2.wav 2 type="wave" actualtype="gif" > store f3.wav 2 type="wave" actualtype="gif" > store f4.wav 2 type="wave" actualtype="gif" > store f5.wav 2 type="wave" actualtype="gif" > store f6.wav 2 type="wave" actualtype="gif" > store f7.wav 2 type="wave" actualtype="gif" > type "status files 1 00.out", look at "00.out", > all these files are identical, just have > different names, the metadata should look > (+1 points) > like the following: > [metadata] > FileName=f[1-7].wav > > In my case I have 7 entries for the files in the 00.out > file not FileName =f[1-7].wav. I'm assuming the grading > guideline is not looking for a single file ouput. Is this > assumption is correct? Correct. I just didn't want to write the same thing 7 times in the grading guidelines. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Fri Nov 24 17:58:34 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kAP1wY8b017415 for ; Fri, 24 Nov 2006 17:58:34 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kAP1uv87006893 for ; Fri, 24 Nov 2006 17:56:57 -0800 Message-Id: <200611250156.kAP1uv87006893@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: cs551: grading guideline question Date: Fri, 24 Nov 2006 17:56:57 -0800 From: william@bourbon.usc.edu Someone wrote: > The following text is in grading guideline section 2 > > store google.gif 1 category="picture gif" > type "status files 1 00.out", look at "00.out", > only node *00 should have this file, other nodes > should not have this file because CacheSize is 5K) > > The cache size in the ini files is 600 K for the nodes. > Is this a guideline issue? Yes. You are correct. I moved this to test r7 in the updated grading guidelines. I've also added a file called "earc.jpg" which is smaller. Thanks for catching it! -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Fri Nov 24 17:23:10 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kAP1NAgD015054 for ; Fri, 24 Nov 2006 17:23:10 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kAP1LXKS006449 for ; Fri, 24 Nov 2006 17:21:33 -0800 Message-Id: <200611250121.kAP1LXKS006449@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: cs551: get msg Date: Fri, 24 Nov 2006 17:21:33 -0800 From: william@bourbon.usc.edu Someone wrote: > Just to confirm: A node which responds to a GTRQ need not flood the GTRQ > any further right? Well, may be for the sake of anonymity, it should continue to flood. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Fri Nov 24 00:43:41 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kAO8hfVs015984 for ; Fri, 24 Nov 2006 00:43:41 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kAO8g75N030211 for ; Fri, 24 Nov 2006 00:42:07 -0800 Message-Id: <200611240842.kAO8g75N030211@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: cs551: Testing problem Date: Fri, 24 Nov 2006 00:42:07 -0800 From: william@bourbon.usc.edu Hi, I have fixed the test cases. I've changed the b4 test cases to have CachSize=600 and PermSize=600 to accommodate the large filesize of blondie1.mp3. I've also changed the grading guidelines so that for all the other test cases, "blondie1.mp3" is replaced by "chess.jpg". So, quite a few things have changed. You may have to remove your ~/tmp/final2 directory and rerun ~csci551b/bin/setupf2. Sorry about the inconvenience. -- Bill Cheng // bill.cheng@usc.edu -----Original Message----- Date: Thu, 23 Nov 2006 22:27:38 -0800 From: william@bourbon.usc.edu To: cs551@merlot.usc.edu Subject: Re: cs551: Testing problem Someone wrote: > The test file blondie1.mp3 stats are as follows > > FileName=blondie1.mp3 > FileSize=474736 > > > But in all the test cases, the Perm Size is only 10 or 25. So if I try > to store this file I get the error: > > Error: Not enough Permanent memory to store file > > Please let me know if i am doing anything wrong or the test cases > needs to be fixed? The test cases need to be fixed! Thanks for catching this. I'll fix it tomorrow. Most likely, I'll use a smaller file. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Thu Nov 23 23:50:01 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kAO7o1JV012501 for ; Thu, 23 Nov 2006 23:50:01 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kAO7mRtH029620 for ; Thu, 23 Nov 2006 23:48:27 -0800 Message-Id: <200611240748.kAO7mRtH029620@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Grading guideline question Date: Thu, 23 Nov 2006 23:48:27 -0800 From: william@bourbon.usc.edu Someone wrote: > Command "ls ~csci551b/grading/guidelines/final2/b3/n??.ini" > returns no files. Could you please copy (or correct the > gradelines) the files? Oops! These are bugs in the grading guidelines. I've just updated the grading guidelins (have not fixed the problem with blondie1.mp3 being too big yet). Thanks for catching it! -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Thu Nov 23 23:12:48 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kAO7Cmbb010071 for ; Thu, 23 Nov 2006 23:12:48 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kAO7BE3Q029093 for ; Thu, 23 Nov 2006 23:11:14 -0800 Message-Id: <200611240711.kAO7BE3Q029093@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: cs551 setup home directories Date: Thu, 23 Nov 2006 23:11:14 -0800 From: william@bourbon.usc.edu Someone wrote: > The script for generating the test data ~csci551b/bin/setupf2 $HOME > only created ~/tmp/final2 > it did not create the sub-directories ~/tmp/final2/n?? > > Is that normal ? Yes. The grading guidelines has the following command: ~csci551b/bin/resetf2 This will create the ~/tmp/final2/n?? files. > can i assume that the home directory from the INI > file shall exist ? Yes. But you need to create subdirectories programmatically. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Thu Nov 23 22:30:12 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kAO6UCoQ007427 for ; Thu, 23 Nov 2006 22:30:12 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kAO6SdwK028775 for ; Thu, 23 Nov 2006 22:28:39 -0800 Message-Id: <200611240628.kAO6SdwK028775@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: status files command Date: Thu, 23 Nov 2006 22:28:39 -0800 From: william@bourbon.usc.edu Someone wrote: > When a user issues a status files command, do we have to get the > status of the current node as well ? Yes. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Thu Nov 23 22:29:12 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kAO6TC6r007290 for ; Thu, 23 Nov 2006 22:29:12 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kAO6RcEk028746 for ; Thu, 23 Nov 2006 22:27:38 -0800 Message-Id: <200611240627.kAO6RcEk028746@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: cs551: Testing problem Date: Thu, 23 Nov 2006 22:27:38 -0800 From: william@bourbon.usc.edu Someone wrote: > The test file blondie1.mp3 stats are as follows > > FileName=blondie1.mp3 > FileSize=474736 > > > But in all the test cases, the Perm Size is only 10 or 25. So if I try > to store this file I get the error: > > Error: Not enough Permanent memory to store file > > Please let me know if i am doing anything wrong or the test cases > needs to be fixed? The test cases need to be fixed! Thanks for catching this. I'll fix it tomorrow. Most likely, I'll use a smaller file. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Thu Nov 23 22:24:50 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kAO6OoXC007028 for ; Thu, 23 Nov 2006 22:24:50 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kAO6NGbQ028651 for ; Thu, 23 Nov 2006 22:23:16 -0800 Message-Id: <200611240623.kAO6NGbQ028651@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: cs551: search Date: Thu, 23 Nov 2006 22:23:16 -0800 From: william@bourbon.usc.edu Someone wrote: > So, the result of a search command will include the node's own files > that match the search criteria as well as the neighbors' search > responses right? Yes. > If yes, and the user wishes to "get" a file which > happens to be a node's local file, are we done processing the get > command? Yes. And if the file was in the cache, it needs to be moved to the permanent space. -- Bill Cheng // bill.cheng@usc.edu -----Original Message----- From: william@bourbon.usc.edu [mailto:william@bourbon.usc.edu] Sent: Thursday, November 23, 2006 1:28 PM To: cs551@merlot.usc.edu Subject: Re: cs551: search Someone wrote: > If node A has file X and the user searches for file X on node A, should > we send out a search message to other nodes as well? For our assignment, if TTL is not 0, then you must flood search request messages. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Thu Nov 23 13:29:15 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kANLTFrG005615 for ; Thu, 23 Nov 2006 13:29:15 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kANLRgHO024760 for ; Thu, 23 Nov 2006 13:27:42 -0800 Message-Id: <200611232127.kANLRgHO024760@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: cs551: search Date: Thu, 23 Nov 2006 13:27:42 -0800 From: william@bourbon.usc.edu Someone wrote: > If node A has file X and the user searches for file X on node A, should > we send out a search message to other nodes as well? For our assignment, if TTL is not 0, then you must flood search request messages. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Thu Nov 23 10:30:52 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kANIUqGX026760 for ; Thu, 23 Nov 2006 10:30:52 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kANITKU3023247 for ; Thu, 23 Nov 2006 10:29:20 -0800 Message-Id: <200611231829.kANITKU3023247@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: cs551: Status question Date: Thu, 23 Nov 2006 10:29:20 -0800 From: william@bourbon.usc.edu Someone wrote: > I have some more questions regarding status message. > > 1. The originator of the status request message must store the > request type along with the request id for later comparison (when > it receives a status response message). > > 2. When the node receives the status response message, it will > compare the request id with the UOID field (bits 27-46) and if it > matches, it'll check the request type that is saved in step 1. > > 3. Based on the request type, it'll interpret the data part of > the status response message. You need to keep state information for your node so you know whether to forward a response message, drop it, or keep it. In this state information, you can keep anything you want. So, the above should work. > Is this assumption is correct? Or, is it possible to add a > status type field to the status response message? You must not change the spec! -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Thu Nov 23 10:27:29 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kANIRSNg026494 for ; Thu, 23 Nov 2006 10:27:28 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kANIPuIe023194 for ; Thu, 23 Nov 2006 10:25:56 -0800 Message-Id: <200611231825.kANIPuIe023194@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Status question Date: Thu, 23 Nov 2006 10:25:56 -0800 From: william@bourbon.usc.edu Someone wrote: > How can we figure out the type of the status response from the > message itself? There is no status type field in the response > request. Could you please advice? The response UOID (bytes 27-46) should match the UOID of the request. Another way is that your node should keep track of what command it is working on. If the user has typed a , then you should know that your node is not currently working on any command. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Thu Nov 23 10:15:39 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kANIFdvn025633 for ; Thu, 23 Nov 2006 10:15:39 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kANIE7xo022958 for ; Thu, 23 Nov 2006 10:14:07 -0800 Message-Id: <200611231814.kANIE7xo022958@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: cs551: search response Date: Thu, 23 Nov 2006 10:14:07 -0800 From: william@bourbon.usc.edu Someone wrote: > Do we need to send the bit-vector field of metadata in the search > response? If yes, isn't it an overhead? Yes and yes! But I think it makes grading a little easier. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Thu Nov 23 10:12:18 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kANICI0Z025481 for ; Thu, 23 Nov 2006 10:12:18 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kANIAk10022900 for ; Thu, 23 Nov 2006 10:10:46 -0800 Message-Id: <200611231810.kANIAk10022900@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Question on tmp directory Date: Thu, 23 Nov 2006 10:10:46 -0800 From: william@bourbon.usc.edu Someone wrote: > I wonder if tmp directory on UNIX have some kind of mechanism to > clear the file if files stored exceed some quota. If you exceed disk quota, the usual behavior is to disallow a new file to be created. It will not delete random file in /tmp or attemp to do LRU in /tmp. > The reason of this is > because I wonder if it necessary for me to delete file I wrote to the > tmp file (I know it is the best to clean it up, just wondering). You should always do it in your code and delete the file as soon as you know that you will not need it any more! It's a good coding habbit. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Wed Nov 22 23:05:42 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kAN75goI015014 for ; Wed, 22 Nov 2006 23:05:42 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kAN74Cxs017157 for ; Wed, 22 Nov 2006 23:04:12 -0800 Message-Id: <200611230704.kAN74Cxs017157@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Receive junk after node terminated Date: Wed, 22 Nov 2006 23:04:12 -0800 From: william@bourbon.usc.edu Someone wrote: > When a node terminated abnormally, the connecting node will receive > a junk of data. Now we handle it by getting all data and see if the > message make sense. I wonder if there is some specific way to figure > out if the connecting node has been failed. I think some researchers are looking into something similar in the context of security... How do you know if a node has been taken over by malicious code? I don't know of any easy answer. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Wed Nov 22 18:10:47 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kAN2Alkg028146 for ; Wed, 22 Nov 2006 18:10:47 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kAN29IB2014525 for ; Wed, 22 Nov 2006 18:09:18 -0800 Message-Id: <200611230209.kAN29IB2014525@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: cs551: searching using index structures Date: Wed, 22 Nov 2006 18:09:18 -0800 From: william@bourbon.usc.edu Someone wrote: > When more than one "stored" files have the same name, keywords and > sha1hash, we can either create a conflict resolution list OR have > multiple index nodes in our list pointing to different file numbers > right? Can we use this method always? As long as you can resolve the conflicts, there is no requirement how you do it. What you should never do is to always search the complete list; then you don't have an "index structure". So, if it's a simple list, you can keep it sorted and once you get a collision, you keep going until you see a different value and stop. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Wed Nov 22 16:18:17 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kAN0IH0u020891 for ; Wed, 22 Nov 2006 16:18:17 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kAN0GmIo013415 for ; Wed, 22 Nov 2006 16:16:48 -0800 Message-Id: <200611230016.kAN0GmIo013415@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: regrading SHA1 value. Date: Wed, 22 Nov 2006 16:16:48 -0800 From: william@bourbon.usc.edu Someone wrote: > i am also having the same value but on the link > http://merlot.usc.edu/cs551-f06/projects/final.html#metadata > i.e. at the sample meta data file value is different. > know i also noticed that file size is also not > correct. > > Thanks once again for clearifing my doubt. The above link is just an example to illustrate the format and does not have the correct value (you can call anything "blondie1.mp3"). Sorry that this was misleading. The grading guidelines use the correct values. -- Bill Cheng // bill.cheng@usc.edu --- william@bourbon.usc.edu wrote: > Someone wrote: > > > i am trying to calculate the SHA1 value of > file > > blondie1.mp3, and getting some result. But it is > not > > same as the sample metadata file. > > Should it be same or it could be > different. > > You should get the same value as running openssl > from the > commandline: > > openssl sha1 blondie1.mp3 > > The value is > ffd3b197e1c0f0c27e7bdc219f553a3e6b139dfb. If > you are not getting the same value, then you are > doing > something wrote when you compute SHA1 hash or when > you read > the file. It's always a good idea to keep track of > exactly > how many bytes you are reading for a file. After > you have > received a file, you should check if that's exactly > the size > that you were expecting. > -- > Bill Cheng // bill.cheng@usc.edu > Return-Path: william@bourbon.usc.edu Delivery-Date: Wed Nov 22 15:45:15 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kAMNjF0B018579 for ; Wed, 22 Nov 2006 15:45:15 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kAMNhkMS013000 for ; Wed, 22 Nov 2006 15:43:46 -0800 Message-Id: <200611222343.kAMNhkMS013000@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: regrading SHA1 value. Date: Wed, 22 Nov 2006 15:43:46 -0800 From: william@bourbon.usc.edu Someone wrote: > i am trying to calculate the SHA1 value of file > blondie1.mp3, and getting some result. But it is not > same as the sample metadata file. > Should it be same or it could be different. You should get the same value as running openssl from the commandline: openssl sha1 blondie1.mp3 The value is ffd3b197e1c0f0c27e7bdc219f553a3e6b139dfb. If you are not getting the same value, then you are doing something wrote when you compute SHA1 hash or when you read the file. It's always a good idea to keep track of exactly how many bytes you are reading for a file. After you have received a file, you should check if that's exactly the size that you were expecting. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Wed Nov 22 15:23:37 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kAMNNbHO017167 for ; Wed, 22 Nov 2006 15:23:37 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kAMNM8is012784 for ; Wed, 22 Nov 2006 15:22:08 -0800 Message-Id: <200611222322.kAMNM8is012784@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: memcmp of sha Date: Wed, 22 Nov 2006 15:22:08 -0800 From: william@bourbon.usc.edu Someone wrote: > Sry.. that was a typo i was doin memcmp > > now in the debugger.. when i am tryin to print one of the sha char let > say in sha1[0] it says the following > cannot perform pointer math on incomplete types, try casting to a know > type, or *void You can do the following in gdb: print ((char*)sha1)[0] print ((char*)sha2)[0] > but whereas i dot the same on the other .. it is able to print fine and > the out is like > $1 = -103 '\231' > > wut am i doin worng? I don't know what value do you expect. The above says that the value is \231 in octal, which is 10 011 001 in binary, or 0x99 in hex (which is -103 in decimal for a signed char). If you want to print hex in gdb, you can do: printf "%02x\n",((char*)sha1)[0] printf "%02x\n",((char*)sha2)[0] -- Bill Cheng // bill.cheng@usc.edu william@bourbon.usc.edu wrote: > Someone wrote: > > > I am having issues with doin memcmp of sha. > > I have done it on the Bit vec and it works fine > > for some reason if i am tryin to compare two sha's > > which are of type char [20] > > and i do memcpy(sha1,sha2,20) == 0 > > it is unable to match the sha's even though they are the same > > I hope the above is a typo. You are doing: > > if (memcmp(sha1,sha2,20) == 0) > > and not memcpy(), right? You should go into the debugger and > do: > > print sha1[0] > print sha2[0] > > print sha1[1] > print sha2[1] > > ... > > and see if they are actually different. > -- > Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Wed Nov 22 14:51:13 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kAMMpDrX015050 for ; Wed, 22 Nov 2006 14:51:13 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kAMMkM0H012406 for ; Wed, 22 Nov 2006 14:46:22 -0800 Message-Id: <200611222246.kAMMkM0H012406@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: memcmp of sha Date: Wed, 22 Nov 2006 14:46:22 -0800 From: william@bourbon.usc.edu Someone wrote: > I am having issues with doin memcmp of sha. > I have done it on the Bit vec and it works fine > for some reason if i am tryin to compare two sha's > which are of type char [20] > and i do memcpy(sha1,sha2,20) == 0 > it is unable to match the sha's even though they are the same I hope the above is a typo. You are doing: if (memcmp(sha1,sha2,20) == 0) and not memcpy(), right? You should go into the debugger and do: print sha1[0] print sha2[0] print sha1[1] print sha2[1] ... and see if they are actually different. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Wed Nov 22 07:06:20 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kAMF6Kqa017536 for ; Wed, 22 Nov 2006 07:06:20 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kAMF1TRo006720 for ; Wed, 22 Nov 2006 07:01:29 -0800 Message-Id: <200611221501.kAMF1TRo006720@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: cs551: Store/Delete behavior Date: Wed, 22 Nov 2006 07:01:29 -0800 From: william@bourbon.usc.edu Someone wrote: > When we do a store/delete, the current node stores/deletes the > file from it local "mini" filesystem and floods the message. In > this case we'll return the prompt to the user immediately, > correct? Yes, since we are not waiting for responses. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Tue Nov 21 23:23:54 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kAM7NsrA019976 for ; Tue, 21 Nov 2006 23:23:54 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kAM7J5QM002588 for ; Tue, 21 Nov 2006 23:19:05 -0800 Message-Id: <200611220719.kAM7J5QM002588@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: delete Date: Tue, 21 Nov 2006 23:19:05 -0800 From: william@bourbon.usc.edu Someone wrote: > When I sign using wrong certificate and try to verify, I got the > foloowing output > > Verification failure > 29610:error:2107C080:PKCS7 routines:PKCS7_get0_signers:signer > certificate not found:pk7_smime.c:356: > > *Verification failure* is ok but is the rest default behaviour OR > there is something wrong with my code. There is nothing wrong. When it does not verify, the way openssl does it seems to produce an unpredictable output (at least it seems unpredictable to me). -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Tue Nov 21 23:05:23 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kAM75NoA018818 for ; Tue, 21 Nov 2006 23:05:23 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kAM70YoX002411 for ; Tue, 21 Nov 2006 23:00:34 -0800 Message-Id: <200611220700.kAM70YoX002411@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: cs551: ttl for search, get and delete Date: Tue, 21 Nov 2006 23:00:34 -0800 From: william@bourbon.usc.edu Someone wrote: > For search, get and delete commands, the spec says that they must be > flooded upto a "specified" TTL, although, there is no provision to > specify the ttl at the prompt for these messages. Should we just use the > node's default TTL for these messages? Yes. (What was meant in the spec was about the TTL in the message header and not the commandline interface.) -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Tue Nov 21 21:43:33 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kAM5hXPt013288 for ; Tue, 21 Nov 2006 21:43:33 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kAM5ciK2001421 for ; Tue, 21 Nov 2006 21:38:44 -0800 Message-Id: <200611220538.kAM5ciK2001421@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: cs551 file size Date: Tue, 21 Nov 2006 21:38:44 -0800 From: william@bourbon.usc.edu Someone wrote: > can we assume that any one point of time, the file wont be so big that > the system will run out of heap space while storing one instance of > the file? No. You must check the return code of fwrite() and write() to make sure that there is room in the filesystem. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Tue Nov 21 20:07:49 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kAM47neC007228 for ; Tue, 21 Nov 2006 20:07:49 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kAM430d9000479 for ; Tue, 21 Nov 2006 20:03:00 -0800 Message-Id: <200611220403.kAM430d9000479@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: CS 551 Final Project Part (1) grade... Date: Tue, 21 Nov 2006 20:03:00 -0800 From: william@bourbon.usc.edu Someonew rote: > I wanted to double check with you which parts of part 1, that > we lost points for, would cause us to lose points for part 2 > if they were to remain unfixed. > > 1. Wrong network is formed in parts (B) and (C). For part (2), we will be supplying init_neighbor_list files. You should form the right network given these files. We will not ask you to handle JOIN and CHECK. So, if you can form the network, chances are it will be correct. > 2. Sometimes there are seg faults while starting the network. Segmentation faults are very bad! You should submit something that does not have seg faults. Lots of seg faults also makes grading nearly impossible. I'm not sure how you can demonstrate that your implementation is correct if you code seg faults a lot. > 3. Nodes failed to re-JOIN the network after sending check > requests and timed out. For part (2), you need to handle NoCheck=1 in all the startup configuration files properly and not do any checks and your nodes should never attempt to rejoin the network. > 4. Nodes should quit when # of JNRP received < InitNeighbors. For part (2), since NoCheck=1 and we will always start the network properly, you should never need to join. > 5. Your program should not quit when Ctrl-C is pressed. You should fix this since there will be plenty of Ctrl+C to interrupt searches and gets. > 6. Status output not in current directory. You should fix this or you stand to lose points again. This should be an easy fix. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Tue Nov 21 19:57:09 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kAM3v830006565 for ; Tue, 21 Nov 2006 19:57:08 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kAM3qKWJ000381 for ; Tue, 21 Nov 2006 19:52:20 -0800 Message-Id: <200611220352.kAM3qKWJ000381@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: cert.pem files Date: Tue, 21 Nov 2006 19:52:20 -0800 From: william@bourbon.usc.edu Someone wrote: > The command to verify a signed file named bar is: > > openssl smime -verify -noverify -in bar \ > -out /dev/null -signer cert.pem \ > -certfile cert.pem > > So for part-2 deletion, > For bar, we give digitally signed file spec. Correct. > For 2 fields of cert.pem, which files should we input? "cert.pem" is the public key certificate (which you've included in a STORE message). You may have stored this file as "#.cert" for data file "#.data" inside $HomeDir/files. You need to mention the same certificate file twice in this command. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Mon Nov 20 22:26:04 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kAL6Q4Jo020707 for ; Mon, 20 Nov 2006 22:26:04 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kAL6LIiN018827 for ; Mon, 20 Nov 2006 22:21:18 -0800 Message-Id: <200611210621.kAL6LIiN018827@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: CS551: Delete question Date: Mon, 20 Nov 2006 22:21:18 -0800 From: william@bourbon.usc.edu Someone wrote: > Following is what I understood about the delete message: > > 1. When user enters a delete command,(with filename, sha1 nonce), > node creates a temporary file with the filespec information and > signs it using node's private key. > 2. Node then checks to see if it has any files in its "mini file > system" that maches this filespec. It deletes all files that > matched. > 3. Node also floods the delete message upto specified TTL. > 4. Receiving nodes will check the delete message and verifies the > signature to make sure that the request is valid. Correct. > Questions > -------------- > 1. Do we also delete the cached files that mach the filespec? Yes. > 2. When the receiving node gets the delete filespec, how it will > read the content of the filespec? Since we are restricted to the format generated by OpenSSL and we are only allowed to sign a 3-line text file, you can figure this out by looking at a sample signed File Spec. For example, if my FileSpec is (I've shifted every line by 4 space characters to the right for readability): FileName=blondie1.mp3 SHA1=ffd3b197e1c0f0c27e7bdc219f553a3e6b139dfb Nonce=5c1c9ee90eec9b4e6692f1e2b4029db511207054 After I run the "openssl smime -sign" command, I get a file that contains the following lines (also shifted 4 spaces to the right for readability): MIME-Version: 1.0 Content-Type: multipart/signed; protocol="..."; micalg=sha1; boundary="..." This is an S/MIME signed message ------B75FE71683D9EF3CB78C2149F21FFC10 FileName=blondie1.mp3 SHA1=ffd3b197e1c0f0c27e7bdc219f553a3e6b139dfb Nonce=5c1c9ee90eec9b4e6692f1e2b4029db511207054 ------B75FE71683D9EF3CB78C2149F21FFC10 Content-Type: application/x-pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" MIICLQYJKoZIhvcNAQcCoIICHjCCAhoCAQExCzAJBgUrDgMCGgUAMAsGCSqGSIb3 ... This file contains only ASCII characters and you can read it line by line. It is divided into 3 sections and the sections dividers are lines that starts with "--". The only none-blank lines in the middle section should be the file spec. So, you can look for this section and extract FileName, SHA1, and Nonce and use them to look for files that match these values exactly. I will add the above information to the "Certificates" section of the spec soon. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Mon Nov 20 10:38:42 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kAKIcgB5007334 for ; Mon, 20 Nov 2006 10:38:42 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kAKIXuJV011005 for ; Mon, 20 Nov 2006 10:33:56 -0800 Message-Id: <200611201833.kAKIXuJV011005@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: caching get request Date: Mon, 20 Nov 2006 10:33:56 -0800 From: william@bourbon.usc.edu Someone wrote: > Just want to clarify that a file already exists iff the node has a file > which is identical in name, sha1hash and Nonce. > FileId doesn't come into picture here. Am I right? Exactly! -- Bill Cheng // bill.cheng@usc.edu ----- Original Message ----- From: To: Sent: Monday, November 20, 2006 6:59 AM Subject: Re: caching get request > Someone wrote: > > > If an intermediate node receives a get request, do the node need > > to see if the particular file (for a given sha1 value) exists in > > the permanent of cache area? If the file exist, then do we cache > > again? > > If the file exists, you do not need to cache. The main purpose > for caching is so that as a file gets more popular, it becomes > more available in the network. > -- > Bill Cheng // bill.cheng@usc.edu > > > ----- Original Message ----- > From: william@bourbon.usc.edu > Date: Sunday, November 19, 2006 9:43 pm > Subject: Re: caching get request > To: cs551@merlot.usc.edu > > > Someone wrote: > > > > > When a node recieves a get response and if it is the node that > > > originated the get request, do we still have to cache the file > > > (if the cache probability is positive)? Or only the intermediate > > > nodes required to cache? > > > > If it is the node that originated the get request, this node > > must store the file in its permanent space. If there is no > > permanent space left, it should discard the file. > > > > An intermediate node needs to decide if it needs to cache > > the file. > > -- > > Bill Cheng // bill.cheng@usc.edu > > Return-Path: william@bourbon.usc.edu Delivery-Date: Mon Nov 20 07:04:26 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kAKF4QGl026207 for ; Mon, 20 Nov 2006 07:04:26 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kAKExhTl008255 for ; Mon, 20 Nov 2006 06:59:43 -0800 Message-Id: <200611201459.kAKExhTl008255@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: caching get request Date: Mon, 20 Nov 2006 06:59:43 -0800 From: william@bourbon.usc.edu Someone wrote: > If an intermediate node receives a get request, do the node need > to see if the particular file (for a given sha1 value) exists in > the permanent of cache area? If the file exist, then do we cache > again? If the file exists, you do not need to cache. The main purpose for caching is so that as a file gets more popular, it becomes more available in the network. -- Bill Cheng // bill.cheng@usc.edu ----- Original Message ----- From: william@bourbon.usc.edu Date: Sunday, November 19, 2006 9:43 pm Subject: Re: caching get request To: cs551@merlot.usc.edu > Someone wrote: > > > When a node recieves a get response and if it is the node that > > originated the get request, do we still have to cache the file > > (if the cache probability is positive)? Or only the intermediate > > nodes required to cache? > > If it is the node that originated the get request, this node > must store the file in its permanent space. If there is no > permanent space left, it should discard the file. > > An intermediate node needs to decide if it needs to cache > the file. > -- > Bill Cheng // bill.cheng@usc.edu > Return-Path: william@bourbon.usc.edu Delivery-Date: Mon Nov 20 07:02:33 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kAKF2XmX026070 for ; Mon, 20 Nov 2006 07:02:33 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kAKEvoT7008223 for ; Mon, 20 Nov 2006 06:57:50 -0800 Message-Id: <200611201457.kAKEvoT7008223@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: search query Date: Mon, 20 Nov 2006 06:57:50 -0800 From: william@bourbon.usc.edu Someone wrote: > If search query is of type 2, we have to input 40 characters of > hex encoded hash value. > But what we have to send in search msg, 20 byte binary hash value > (derived from above hex string) OR 40 byte above string. 20 bytes. > And what should we log in field in this case? Please log the whole thing (in hexstring representation). -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Mon Nov 20 06:59:39 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kAKExdUo025801 for ; Mon, 20 Nov 2006 06:59:39 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kAKEstMA008180 for ; Mon, 20 Nov 2006 06:54:55 -0800 Message-Id: <200611201454.kAKEstMA008180@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: caching get request Date: Mon, 20 Nov 2006 06:54:55 -0800 From: william@bourbon.usc.edu Someone wrote: > Just to clarify; If a node originated a get request it > should store in the permanent space as well as the file where > user asked it to store also? Exactly! The copy in the permanent space (under $HomeDir/files and named as *.data) is for future sharing in the network. The copy in the current working directory (if the GET command specifies the current working directory) is for user consumption. -- Bill Cheng // bill.cheng@usc.edu ----- Original Message ----- From: william@bourbon.usc.edu Date: Sunday, November 19, 2006 9:43 pm Subject: Re: caching get request To: cs551@merlot.usc.edu > Someone wrote: > > > When a node recieves a get response and if it is the node that > > originated the get request, do we still have to cache the file > > (if the cache probability is positive)? Or only the intermediate > > nodes required to cache? > > If it is the node that originated the get request, this node > must store the file in its permanent space. If there is no > permanent space left, it should discard the file. > > An intermediate node needs to decide if it needs to cache > the file. > -- > Bill Cheng // bill.cheng@usc.edu > Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Nov 19 21:44:42 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kAK5igJ0022337 for ; Sun, 19 Nov 2006 21:44:42 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kAK5e0cp002858 for ; Sun, 19 Nov 2006 21:40:00 -0800 Message-Id: <200611200540.kAK5e0cp002858@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: caching get request Date: Sun, 19 Nov 2006 21:40:00 -0800 From: william@bourbon.usc.edu Someone wrote: > When a node recieves a get response and if it is the node that > originated the get request, do we still have to cache the file > (if the cache probability is positive)? Or only the intermediate > nodes required to cache? If it is the node that originated the get request, this node must store the file in its permanent space. If there is no permanent space left, it should discard the file. An intermediate node needs to decide if it needs to cache the file. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Nov 19 19:39:00 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kAK3d0wg014359 for ; Sun, 19 Nov 2006 19:39:00 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kAK3YJuf001353 for ; Sun, 19 Nov 2006 19:34:19 -0800 Message-Id: <200611200334.kAK3YJuf001353@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: typo in grading guideline Date: Sun, 19 Nov 2006 19:34:19 -0800 From: william@bourbon.usc.edu Someone wrote: > I think your grading guideline about file name "blondie1.mp3" may be > wrong because the other related information probably comes from file > "yahoo.gif" (e.g. file size, SHA1 hash, etc.). You are correct! Thanks for catching this. It has been fixed. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sat Nov 18 18:27:07 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kAJ2R73W014103 for ; Sat, 18 Nov 2006 18:27:07 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kAJ2MToK013607 for ; Sat, 18 Nov 2006 18:22:29 -0800 Message-Id: <200611190222.kAJ2MToK013607@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: wait time Date: Sat, 18 Nov 2006 18:22:29 -0800 From: william@bourbon.usc.edu Someone wrote: > How much time do we wait for search response. > 1.2*Msglifetime as before OR untill Control-C is hit. Whichever that comes first sounds reasonable. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sat Nov 18 18:22:48 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kAJ2MmSN013842 for ; Sat, 18 Nov 2006 18:22:48 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kAJ2IAEt013497 for ; Sat, 18 Nov 2006 18:18:10 -0800 Message-Id: <200611190218.kAJ2IAEt013497@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: [CS 551] Date: Sat, 18 Nov 2006 18:18:10 -0800 From: william@bourbon.usc.edu Someone wrote: > A quick question about keywords. Though it is clear that the bitmaps > must be generated using all lower-cased hash inputs, I don't believe > it is clearly stated as to whether the character comparison of > keywords is case sensitive. > > Should I lowercase the keywords when comparing them, upon matching of > all bits within a hash bitmap? Yes, you must! Otherwise, bitvectors give incorrect information! -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sat Nov 18 18:19:38 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kAJ2Jck2013580 for ; Sat, 18 Nov 2006 18:19:38 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kAJ2F02E013457 for ; Sat, 18 Nov 2006 18:15:00 -0800 Message-Id: <200611190215.kAJ2F02E013457@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: file deleted Date: Sat, 18 Nov 2006 18:15:00 -0800 From: william@bourbon.usc.edu Someone wrote: > If in the interval between a search response and a get request, > the file got deleted, what should go in get response? It would be the same as if the node that has the corresponding file ID got shutdown. This is the nature of p2p systems when one node cannot control what's going on in another node. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sat Nov 18 18:16:21 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kAJ2GLWu013433 for ; Sat, 18 Nov 2006 18:16:21 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kAJ2Bh3g013363 for ; Sat, 18 Nov 2006 18:11:43 -0800 Message-Id: <200611190211.kAJ2Bh3g013363@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Search and Get Date: Sat, 18 Nov 2006 18:11:43 -0800 From: william@bourbon.usc.edu Someone wrote: > 1. When user enters a search command, do we search in the current > node's files directory also? Yes. If TTL is 0, you only search in the current node. > 2. Do we have to treat .cache and .data file differently in > response to a search request? You mean permanent vs. cache? They should be treated exactly the same. There is very little difference between permanent and cached files . > 3. What is the TTL for get request message? Please use what's in the startup configuration file. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sat Nov 18 08:49:18 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kAIGnI33006691 for ; Sat, 18 Nov 2006 08:49:18 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kAIGigJ4006745 for ; Sat, 18 Nov 2006 08:44:42 -0800 Message-Id: <200611181644.kAIGigJ4006745@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: cs551: malloc problems Date: Sat, 18 Nov 2006 08:44:42 -0800 From: william@bourbon.usc.edu Someone wrote: > I'm creating temporary files for meta, cert and data when a node recvs a > store message using tmpfile. > When I call tmpfile() the third time, for the data file, it crashes > inside malloc (inside tmpfile) > Malloc fails inside tempfile() ! I got the following stack trace from > gdb. > Its not just tmpfile(), but any function which allocates memory crashes > after this point in code... > I replaced the third call to tmpfile() with "free(malloc(100));" and it > crashed inside this malloc ! > > Any idea as to why this is happening? Am I using too much memory on > nunki? > > Program received signal SIGSEGV, Segmentation fault. > [Switching to LWP 5] > 0xff146d14 in _malloc_unlocked () from /usr/lib/libc.so.1 > (gdb) bt > #0 0xff146d14 in _malloc_unlocked () from /usr/lib/libc.so.1 > #1 0xff146b7c in malloc () from /usr/lib/libc.so.1 > #2 0xff191864 in _findiop () from /usr/lib/libc.so.1 > #3 0xff1911cc in fdopen () from /usr/lib/libc.so.1 > #4 0xff194fbc in _common () from /usr/lib/libc.so.1<============= this > is where tmpfile() is called > #5 0x0002097c in SV_recv_stor (sfd=11, pstHdr=0x42ad0, from_nid=0x41b90 > "nunki.usc.edu_13228") at sv_pkt.c:2378 > #6 0x0001a484 in SV_recv_packet (sfd=11, from_nid=0x41b90 > "nunki.usc.edu_13228") at sv_pkt.c:323 > #7 0x000160c8 in SV_Listen2Nbr (pData=0x41b88) at sv_node.c:1583 > #8 0xff0e57bc in _lwp_start () from /usr/lib/libthread.so.1 > #9 0xff0e57bc in _lwp_start () from /usr/lib/libthread.so.1 > Previous frame identical to this frame (corrupt stack?) > (gdb) quit This is very *typical* of a bug which has corrupted the memory allocation chain some time in the past (and could be *way* in the past). Please see: http://merlot.usc.edu/cs551-f06/projects.html#segfault These bugs can be very difficult to pinpoint. I would suggest, as I have in the above URL, to find a version of your code that does not have this bug, and do binary search by adding/deleting half the code at a time until you find the bug. Sorry there is no better way, unless you can find one of those memory debugger suggested above than can help you. If you are not familiar memory allocation chains (which you should probably have learned in an undergraduate data structure class but have forgotten about it), you can look it up in pretty much any data strucutres textbook. Then you should be able to see why this type of bug is hard to detect and why you are getting a segmentation fault because you have corrupted the memory allocation chain (i.e., messed up one or more of the pointers in the memory allocation chain). -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sat Nov 18 00:01:29 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kAI81TpK004499 for ; Sat, 18 Nov 2006 00:01:29 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kAI7usTU001684 for ; Fri, 17 Nov 2006 23:56:54 -0800 Message-Id: <200611180756.kAI7usTU001684@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: CS551: probability question Date: Fri, 17 Nov 2006 23:56:54 -0800 From: william@bourbon.usc.edu Someone wrote: > Consider the following example: > > The probability in the ini file is 1. > Node receives a store message and it flips a coin and got 0.4. > Do we need to cache this file? If the probability is 1, then it should always cache the file. > I'm trying to figure out the probability calculation. If the > probability we got is less than what we have in the ini file, > then do we perform caching or not? If the probability of an event occurring is 0.3, then 3 out of 10 tries should have the event occurring. You should assume that drand48() gives you values that are uniformly distributed between 0 and 1. Therefore, if drand48() <= 0.3, you should force the event to occur. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Fri Nov 17 21:22:37 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kAI5MbPD024492 for ; Fri, 17 Nov 2006 21:22:37 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kAI5I3vH032424 for ; Fri, 17 Nov 2006 21:18:03 -0800 Message-Id: <200611180518.kAI5I3vH032424@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: cs551 sha1_ctx error Date: Fri, 17 Nov 2006 21:18:03 -0800 From: william@bourbon.usc.edu Someone wrote: > I am getting > > `SHA1_CTX' undeclared (first use this function) > > when i try to compile my program using C++ > > I have included and am also linking correctly (as > before). I was not able to find any possible reasons for this. Could > you have any ideas ? It should be SHA_CTX and not SHA1_CTX. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Fri Nov 17 07:13:46 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kAHFDkkx001236 for ; Fri, 17 Nov 2006 07:13:46 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kAHF9Dad019983 for ; Fri, 17 Nov 2006 07:09:13 -0800 Message-Id: <200611171509.kAHF9Dad019983@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: cs551 sha1 of file Date: Fri, 17 Nov 2006 07:09:13 -0800 From: william@bourbon.usc.edu Someone wrote: > which way of calculating the SHA1 of a file would you think is more > advisable (given that the file may be huge, in MBs) > > 1) reading the file byte-by-byte and updating the SHA1 > > 2) using popen and finding SHA1 by openssl > > I want to know which is a better way, since the 1st method may be > really slow in case of a huge file, and the 2nd method is also slow > since popen invokes a fork. You should use (1) but you can read 8192 bytes at a time. Doing (2) is basically the same as doing (1) with a large buffer. Also, you should try not to fork if there is an easy way around it. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Thu Nov 16 10:19:06 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kAGIJ6M0015517 for ; Thu, 16 Nov 2006 10:19:06 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kAGIEame017742 for ; Thu, 16 Nov 2006 10:14:36 -0800 Message-Id: <200611161814.kAGIEame017742@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: temp file location Date: Thu, 16 Nov 2006 10:14:36 -0800 From: william@bourbon.usc.edu Someone wrote: > When we receive a file data over the socket, we need to store it > in a temporary file so that we won't use up the memory. Where do > we need to store this file? /tmp is fine? or we need to store in > current user's home dir? Either in /tmp or in your node's HomeDir. Please do *not* put it in the user'd home directory, i.e., the $HOME environment variable. You can also have it setup in your Makefile. For example, you can add the following commandline option to gcc/g++: -D_TMP=\"/tmp\" Then in your program, you can just access _TMP to figure out where your temporary directory should be. (Usually, no one should need to change this from /tmp to something else.) -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Wed Nov 15 15:40:21 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kAFNeLx4009039 for ; Wed, 15 Nov 2006 15:40:21 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kAFNZsOl007894 for ; Wed, 15 Nov 2006 15:35:55 -0800 Message-Id: <200611152335.kAFNZsOl007894@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: perm and cache space Date: Wed, 15 Nov 2006 15:35:54 -0800 From: william@bourbon.usc.edu Someone wrote: > I have a question on the permspace value. > is this a cumulative of #.data, #.cert, #.meta? You only have to count *.data. But if you want to count other files, that's fine too. > is it the same for cache space? Yes. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Wed Nov 15 14:01:02 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kAFM12hG002599 for ; Wed, 15 Nov 2006 14:01:02 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kAFLuZAU006277 for ; Wed, 15 Nov 2006 13:56:35 -0800 Message-Id: <200611152156.kAFLuZAU006277@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: HomeDir clarification Date: Wed, 15 Nov 2006 13:56:35 -0800 From: william@bourbon.usc.edu Someone wrote: > Is the Homedir in the sepc always corresponds to the "node's" > home dir or the user's home dir? The node's home directory. Every node should have a separate HomeDir. > If it is node's home dir (got > from the ini file), then do we need to generate certificate for > every node that starts? Yes. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Wed Nov 15 13:59:53 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kAFLxrUR002451 for ; Wed, 15 Nov 2006 13:59:53 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kAFLtQNj006245 for ; Wed, 15 Nov 2006 13:55:26 -0800 Message-Id: <200611152155.kAFLtQNj006245@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: kwrd_index file Date: Wed, 15 Nov 2006 13:55:26 -0800 From: william@bourbon.usc.edu Someone wrote: > Consider the following example: > > 1. User enters the command store x.txt 1 categories="txt" > 2. User enters the same command again > > a) We'll have 2 data files in the "permanent" file area; 1.data > and 2.data and their contents are exactly the same. Correct. > b) We'll have same bit vector for both files (since the keywords > are same). So, if I'm using a hash table for storing the > keywords, I can use one entry in the kwrd_index file to represent > = 1,2. That would be fine. It's also fine to have separate but identical bit vectors since it's just a list. (Unlike name_index and sha1_index which traditionally have a conflict resolution list.) > c) Now if a search comes for the keyword that matches this bit > vector, do we return both files 1 and 2? Yes. If (2) at the top really bothers you, you can see if you have an identical file stored in your system and ask the user if he/she really want another copy stored. This interaction is not required. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Tue Nov 14 23:51:13 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kAF7pDKl006134 for ; Tue, 14 Nov 2006 23:51:13 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kAF7knaw026617 for ; Tue, 14 Nov 2006 23:46:49 -0800 Message-Id: <200611150746.kAF7knaw026617@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: cs551 openssl Date: Tue, 14 Nov 2006 23:46:49 -0800 From: william@bourbon.usc.edu Someone wrote: > The sample code that has been given in the spec for popen() has the > following openssl path > char sz_opensslpath[]="/usr/lsd/openssl/0.9.7g/bin/openssl"; > > However, in the spec under the OpenSSL topic, it is mentioned that we > are not supposed to use the /usr/lsd/openssl/0.9.7g/bin/openssl > library for the final project. Instead we are supposed to use > /home/scf-22/csci551b/openssl > > Should we make the corresponding change in popen() sample code? Yes. (The sample code just shows an example.) -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Tue Nov 14 22:40:45 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kAF6ejoI001523 for ; Tue, 14 Nov 2006 22:40:45 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kAF6aKkV025662 for ; Tue, 14 Nov 2006 22:36:20 -0800 Received: (from william@localhost) by bourbon.usc.edu (8.13.5/8.13.5/Submit) id kAF6aKhM025661 for cs551@merlot; Tue, 14 Nov 2006 22:36:20 -0800 Date: Tue, 14 Nov 2006 22:36:20 -0800 From: william@bourbon.usc.edu Message-Id: <200611150636.kAF6aKhM025661@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: final project part (2) extension... Hi, I have announced during class today that I'm giving a 2-day extension for part (2). So, the new due time is 11:45pm on 11/30/2006. Please note that the university has a policy that no assignments can have a deadline during the dead time between the last week of class and the final exam. So, if there is any extended network outage during the last couple of days, the latest I can move the project deadlins is to late night on 12/1/2006 and no further. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Tue Nov 14 22:36:47 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kAF6alsm001254 for ; Tue, 14 Nov 2006 22:36:47 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kAF6WNI1025618 for ; Tue, 14 Nov 2006 22:32:23 -0800 Message-Id: <200611150632.kAF6WNI1025618@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: cs551: store message Date: Tue, 14 Nov 2006 22:32:23 -0800 From: william@bourbon.usc.edu Someone wrote: > In the spec it says that the store msg wud be sending the meta file, > certificate and the file itslef > > does that mean the receiving neighbor wud have to also store the > certificate,regardless of it being cache or perm? if yes then where wud > it save in in files folder? I have been suggesting that if the data file is "1.data", the certificate can be stored as "1.cert". All files (.data, .meta, .cert, etc.) should be stored in $HomeDir/files. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Tue Nov 14 22:34:21 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kAF6YLHd001115 for ; Tue, 14 Nov 2006 22:34:21 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kAF6Tv6S025554 for ; Tue, 14 Nov 2006 22:29:57 -0800 Received: (from william@localhost) by bourbon.usc.edu (8.13.5/8.13.5/Submit) id kAF6Tv6I025553 for cs551@merlot; Tue, 14 Nov 2006 22:29:57 -0800 Date: Tue, 14 Nov 2006 22:29:57 -0800 From: william@bourbon.usc.edu Message-Id: <200611150629.kAF6Tv6I025553@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: clarification on "permanent" space... Hi, A couple of students asked me about "permanent space" today. I just added a few clarifications to the spec: 1) In the "Peer-to-Peer" section: [BC: Added 11/14/2006] Part of a node's filesystem area is designated as *permanent* storage space. Unlike the cache space, the *permanent* space is *not* subject to any replacement policy. If a file is to be stored in the permanent space of a node and there is not enough permanent space there, the file must be rejected. 2) In the "Summary of Basic Message Types" section: [BC: Added 11/14/2006] A node that initiated a store for file F must store file F in the permanent area and *not* in its cache. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Tue Nov 14 22:17:43 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kAF6Hhcx032358 for ; Tue, 14 Nov 2006 22:17:43 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kAF6DJ5V025354 for ; Tue, 14 Nov 2006 22:13:19 -0800 Message-Id: <200611150613.kAF6DJ5V025354@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Intermediate (temp) files Date: Tue, 14 Nov 2006 22:13:19 -0800 From: william@bourbon.usc.edu Someone wrote: > When an intermediate node gets store request, it can store the > content of the file in a temp file before caching of forwarding. > Do we have to use the function such as FILE * tmpfile (void) to > store the content of the files (as in store and get request) so > that this file will be deleted when we close the file pointer? Yes. That would be fine. There are other alternatives to tmpfile(), but you will have to call unlink() to delete them after you are done. Please do not use mktemp() and use the mkstemp() variant of it. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Tue Nov 14 22:15:04 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kAF6F4lN032213 for ; Tue, 14 Nov 2006 22:15:04 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kAF6AdFk025264 for ; Tue, 14 Nov 2006 22:10:39 -0800 Message-Id: <200611150610.kAF6AdFk025264@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: cs551: bitvector Date: Tue, 14 Nov 2006 22:10:39 -0800 From: william@bourbon.usc.edu Someone wrote: > I have question in the setting of bits in th bit vector. > we are stating that each of the 256 asci char is goin to rep 4 bits > in the example we have the sha1 for categories as 757 > which means the 1st bit of 350th asci char shud be set on. (due to the > fact that rite most bit is 0 ) I'm not sure how you get 350. This is illustrated on slide 10 of lecture 21. If each ASCII character represents 4 bits (known as a "nibble"), then turning bit n on means the following. The number of the "0" ASCII characters to the right of this nibble is (int)(n/4). To determine which bit is on in this nibble, you should calculate "n mode 4". If: n mod 4 == 0, ASCII nibble value is "1" n mod 4 == 1, ASCII nibble value is "2" n mod 4 == 2, ASCII nibble value is "4" n mod 4 == 3, ASCII nibble value is "8" 757/4 = 189 and 757 mod 4 = 1. Therefore, there are 189 ASCII "0" to the right of this nibble and the nibble value is "2". This should check out with slide 10 of lecture 21 (each full line has 48 ASCII characters). But I wouldn't really do the above! I would not do calculation in "nibbles". I would use an array of 128 bytes as the bit vector and set bits in the 128-byte bit vector. When I need to output it in ASCII, I'll call a function to do it. > doesnt that mean the binary rep at that time wud be 0001 which is hex > 0x1 and decimal 1 rather than 2 > similarly > if the 2nd bit is to be set then binary rep at that time wud be 0010 > which is hex 0x2 and decimal 2 > and > if the 3rd bit is to be set then binary rep at that time wud be 0100 > which is hex 0x4 and decimal 4 > and > if the 4th bit is to be set then binary rep at that time wud be 1000 > which is hex 0x8 and decimal 8 This part is correct (which is what I meant by "n mod 4" above). -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Tue Nov 14 19:43:59 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kAF3hwMR022458 for ; Tue, 14 Nov 2006 19:43:58 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kAF3dZwQ022832 for ; Tue, 14 Nov 2006 19:39:35 -0800 Message-Id: <200611150339.kAF3dZwQ022832@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: CS551 significance of quotes Date: Tue, 14 Nov 2006 19:39:35 -0800 From: william@bourbon.usc.edu Someone wrote: > in the response below said that the case 2 is missing a = sign, > but it does have the = sign, but it doesn't have quotes. You can say that also. But it can also be the case that in addition to missing quotes, it's missing an equal sign. > if the key,value pair dont have quotes is that still legal input? The way the spec is written, the quotes are required. This makes it much easier for you to parse the input. You can just scan for '='. If '=' is not followed by a double-quote, you can just print an error. If it is, you just look for the next double-quote and you don't have to look at space characters. Once you get the value, you can start looking for space characters in it (may be using strtok()). -- Bill Cheng // bill.cheng@usc.edu william@bourbon.usc.edu wrote: > Someone wrote: > > > In the store command you can enter keywords enclosed in > > double quotes. Do we have to treat the keywords that is > > enclosed in a double quote differently than the keywords that > > is not enclosed in double quotes? > > No. They should be treated the same way. But the basic syntax > is tag=value(s) and the equal sign is mandatory. > > > For example, if we have a command > > > > store blondie.mp3 30 categories="audio mp3" > > > > and another command > > > > store blondie.mp3 30 categories=audio mp3 > > > > I the second case we can store both audio and mp3 as separate > > searchable keywords. > > > > Could you please explain? > > In the 2nd case, you should print that there is a syntax error > in the command since there is a missing equal sign. > > In the 1st case, as I have mentioned in class, there are 3 > keywords and they are: > > categories > audio > mp3 > -- > Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Tue Nov 14 18:51:44 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kAF2pigR019152 for ; Tue, 14 Nov 2006 18:51:44 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kAF2lKd1022165 for ; Tue, 14 Nov 2006 18:47:20 -0800 Message-Id: <200611150247.kAF2lKd1022165@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: nonce Date: Tue, 14 Nov 2006 18:47:20 -0800 From: william@bourbon.usc.edu Someone wrote: > The nonce in the spec, which is genrated at every store command. > can we just use the GetUOID func to get this nonce? Yes. You can use GetUOID() for anything that needs a unique identifier. Every time you call it, there is a very very good chance that what it generates is network-wide unique. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Tue Nov 14 16:19:18 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kAF0JIlS009436 for ; Tue, 14 Nov 2006 16:19:18 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kAF0EtRQ020907 for ; Tue, 14 Nov 2006 16:14:55 -0800 Message-Id: <200611150014.kAF0EtRQ020907@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: [cs551] bitvector Date: Tue, 14 Nov 2006 16:14:55 -0800 From: william@bourbon.usc.edu Someone wrote: > i had question in the bitvector sha1 and md5 results. > wud there be a chance that indexs of two words may be the same? Sure! For our MD5, there are many many words and there are only 512 buckets, of course some of them will hash to the same value. Same for SHA1. This is why when there is a match, you must go through all the keywords and do strcmp() to make sure that the actual keywords do match. > or if there is a chance that the index is such that they modify > bits which are close to each other, thus changing the hex value > of that slot? They can also have bits that are close to each other. I'm not sure what you are asking here. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Mon Nov 13 22:36:28 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kAE6aSHA006263; Mon, 13 Nov 2006 22:36:28 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kAE6W7Ws009537; Mon, 13 Nov 2006 22:32:07 -0800 Message-Id: <200611140632.kAE6W7Ws009537@bourbon.usc.edu> To: csac@merlot.usc.edu To: cs551@merlot.usc.edu Subject: FWD: FOX Interactive Media at USC 11/15/06 Date: Mon, 13 Nov 2006 22:32:07 -0800 From: william@bourbon.usc.edu Dear Students, I'm forwarding an announcement from a perspective employer. I've put a copy of their flyer/handout at: http://merlot.usc.edu/csac-f06/fox.pdf http://merlot.usc.edu/cs551-f06/fox.pdf -- Bill Cheng // bill.cheng@usc.edu -----Original Message----- Date: Mon, 13 Nov 2006 15:41:19 -0800 From: Daria Hall To: undisclosed-recipients: Subject: FOX Interactive Media at USC 11/15/06 Hello Faculty, You and your Students are invited, Please send an email blast to your students and tell all of the students in your classes. Fox Interactive Media will be at USC on Wednesday. Are you on myspace.com? Do you know the other FOX Interactive Media groups? Looking for an exciting place to work? A division of News Corp., Fox Interactive Media (FIM) is an integrated network of sites offering socially rich media experiences centered on entertainment, news, information and self-expression. The company's network includes Internet assets from News Corp., including the highly trafficked Foxsports.com ( http://www.foxsports.com ), Americanidol.com ( http://www.americanidol.com ) and Fox.com ( http://www.fox.com ). FIM also owns and operates such category leaders as MySpace.com ( http://www.myspace.com ), the number one social networking site on the Web; Scout.com ( http://www.scout.com ), a dynamic collegiate and pro sports network; and IGN Entertainment ( http://www.ign.com ), a network of leading gaming and entertainment sites including men's lifestyle site AskMen ( http://www.askmen.com ) and premier destination for movie-goers Rotten Tomatoes ( http://www.rottentomatoes.com ) among others. Fox Interactive Media (FIM) Talent Acquisition and College Relations, will host an Information session, meet and greet on Wednesday, November 15, 2006 at USC. Please come meet and speak with hiring managers and recruiters from FIM. FIM's Information Session at USC Date: Wednesday, November 15, 2006 Time: 6:30 pm - 8:30 pm Place: USC University Club (Next door to the Marshall School of Business) Dress: Business Casual/Casual Purpose: Provide USC students with an opportunity to learn more about FIM in an informal networking fashion. Bring your resumes... Daria R. Hall College Relations and Talent Acquisition Fox Interactive Media (FIM) 407 North Maple Drive Beverly Hills, CA 90210 (310) 969-7880 daria.hall@fox.com www.foxcareers.com Return-Path: william@bourbon.usc.edu Delivery-Date: Mon Nov 13 14:31:46 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kADMVkfD007565 for ; Mon, 13 Nov 2006 14:31:46 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kADMRRVK004243 for ; Mon, 13 Nov 2006 14:27:27 -0800 Message-Id: <200611132227.kADMRRVK004243@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: CS551: certificates Date: Mon, 13 Nov 2006 14:27:27 -0800 From: william@bourbon.usc.edu Someone wrote: > in the spec it says under the certificate section: > : Setup the directories and create a private key file > in the cmd line below this, there is no mention as to where the > private.pem and cert.pem are created > > how do we make the cmd such a way that the keys are stored in home dir > specified in the ini file. I don't remember exactly where the files will be created. But you should try it and if they are not in the right place, you can copy it programmatically and delete the old copy using unlink(). -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Mon Nov 13 14:27:06 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kADMR60V007278 for ; Mon, 13 Nov 2006 14:27:06 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kADMMkgY004145 for ; Mon, 13 Nov 2006 14:22:46 -0800 Message-Id: <200611132222.kADMMkgY004145@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: LRU Date: Mon, 13 Nov 2006 14:22:46 -0800 From: william@bourbon.usc.edu Someone wrote: > What does *used* mean in our context? Seems all anybody can do is > store or delete (unless search qualifies as a use). > > If a get passes through the node, does that qualify as a "use"? > > Could you clarify? I think the idea behind LRU is that if something is likely to be accessed in the future, you should keep it. So, if there is a search that matched a file, you should probably "touch" it as if it were updated. If you "touch" a file when a search matched, then you don't need to do anything when you get an actual "get" since it has very recently been "touched". -- Bill Cheng // bill.cheng@usc.edu On 11/13/06, william@bourbon.usc.edu wrote: > Someone wrote: > > >When we are out of allocated disk space (from the ini file), do > >we look at the file timestamp to decide which one to delete? > > LRU means "least recently *used*". So, you should not look at > the time a file was created. If you want to look at the time > a file was last accessed, you need to "touch" the file if it > was "used". > -- > Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Mon Nov 13 12:50:18 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kADKoIdr000846 for ; Mon, 13 Nov 2006 12:50:18 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kADKjx32002835 for ; Mon, 13 Nov 2006 12:45:59 -0800 Message-Id: <200611132045.kADKjx32002835@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: cs551: store cmd Date: Mon, 13 Nov 2006 12:45:59 -0800 From: william@bourbon.usc.edu Someone wrote: > On what bases do we generate this nonce? > coz the SHA1 in meta is based on the data of the file. A nonce doesn't need to be based on anything. You can simply call GetUOID() with obj_type being "file" or something. -- Bill Cheng // bill.cheng@usc.edu william@bourbon.usc.edu wrote: > Someone wrote: > > > When the user enters the store command, we need to copy the > > content of the file to the /files directory (as x.data, where x > > is the latest number), right? What happens when the user enters > > the store command multiple times with the same file name? Do we > > create a new .data file (and other files) for every store > > command? > > Yes. Every file will have a difference nonce in the metadata. > -- > Bill Cheng // bill.cheng@usc.edu > > > > ----- Original Message ----- > From: william@bourbon.usc.edu > Date: Monday, November 6, 2006 9:58 am > Subject: Re: cs551: store cmd > To: cs551@merlot.usc.edu > > > Someone wrote: > > > > > Just confirming... when the user enters "store foo > > [tag1="value1" > tag2="value2" ...]", the file "foo" already > > exists in the current > > > working directory (or the path if it begins with /), > > > > Correct. If you have not changed your working directory > > programatically, you just do something like open("foo") > > and it should work. > > > > > we just need to > > > create the metadata file and store it in the /files directory > > and flood > > > the store msg right? > > > > Yes. Please remember to name your files "1.data", "2.data", etc. > > > > > And to calculate the SHA1 for the file should we > > > use the file contents or just an arbitrary string with a different > > > sequence number (as given in the spec in getUOID function) > > > > The SHA1 value in the metadata must be the SHA1 hash of the file. > > When another node downloads a file, it should calculate the SHA1 > > value. If it does not match what's in the metadata, it should > > treat the data as corrupted and discard the file. > > -- > > Bill Cheng // bill.cheng@usc.edu > > Return-Path: william@bourbon.usc.edu Delivery-Date: Mon Nov 13 12:34:43 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kADKYhZZ032240 for ; Mon, 13 Nov 2006 12:34:43 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kADKUOad002629 for ; Mon, 13 Nov 2006 12:30:24 -0800 Message-Id: <200611132030.kADKUOad002629@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: LRU Date: Mon, 13 Nov 2006 12:30:24 -0800 From: william@bourbon.usc.edu Someone wrote: >When we are out of allocated disk space (from the ini file), do >we look at the file timestamp to decide which one to delete? LRU means "least recently *used*". So, you should not look at the time a file was created. If you want to look at the time a file was last accessed, you need to "touch" the file if it was "used". -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Mon Nov 13 12:32:00 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kADKW0Jr031979 for ; Mon, 13 Nov 2006 12:32:00 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kADKRf7j002565 for ; Mon, 13 Nov 2006 12:27:41 -0800 Message-Id: <200611132027.kADKRf7j002565@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: CS551 significance of quotes Date: Mon, 13 Nov 2006 12:27:41 -0800 From: william@bourbon.usc.edu Someone wrote: > So, we need to strip off the quotes before computing the > sha1 and md5, right? Is this true for search also? Yes. -- Bill Cheng // bill.cheng@usc.edu ----- Original Message ----- From: william@bourbon.usc.edu Date: Sunday, November 12, 2006 11:41 pm Subject: Re: CS551 significance of quotes To: cs551@merlot.usc.edu > Someone wrote: > > > In the store command you can enter keywords enclosed in > > double quotes. Do we have to treat the keywords that is > > enclosed in a double quote differently than the keywords that > > is not enclosed in double quotes? > > No. They should be treated the same way. But the basic syntax > is tag=value(s) and the equal sign is mandatory. > > > For example, if we have a command > > > > store blondie.mp3 30 categories="audio mp3" > > > > and another command > > > > store blondie.mp3 30 categories=audio mp3 > > > > I the second case we can store both audio and mp3 as separate > > searchable keywords. > > > > Could you please explain? > > In the 2nd case, you should print that there is a syntax error > in the command since there is a missing equal sign. > > In the 1st case, as I have mentioned in class, there are 3 > keywords and they are: > > categories > audio > mp3 > -- > Bill Cheng // bill.cheng@usc.edu > Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Nov 12 23:56:02 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kAD7u29e015908 for ; Sun, 12 Nov 2006 23:56:02 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kAD7pj4D024102 for ; Sun, 12 Nov 2006 23:51:45 -0800 Message-Id: <200611130751.kAD7pj4D024102@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: cs551: store req Date: Sun, 12 Nov 2006 23:51:45 -0800 From: william@bourbon.usc.edu Someone wrote: > Just wondering if the node "originating" the store request flood the > message to "all" its neighbors or flip a coin to decide whom to send it > to? For each of its neighbor link, it should flip a coin and decides based on NeighborStoreProb. The spec is not very clear about this. I've just modify NeighborStoreProb to say: [BC: Updated 11/12/2006] When a node *originates or receives* a store request, it asks its neighbors to cache a copy of the file. This is different from StoreProb. Let's say that A is connected to B. When A originates a store request message, A will flip a coin and decides if the store request message will be sent to B based on NeighborStoreProb. If B receives a store request message from A, B will use StoreProb to decides if it wants to cache a copy. B will then use NeighborStoreProb to decide if it will forward a copy of the store request message to each of its neighbors. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Nov 12 23:43:14 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kAD7hDb6014912 for ; Sun, 12 Nov 2006 23:43:14 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kAD7cuHw023868 for ; Sun, 12 Nov 2006 23:38:56 -0800 Message-Id: <200611130738.kAD7cuHw023868@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: CS551 significance of quotes Date: Sun, 12 Nov 2006 23:38:56 -0800 From: william@bourbon.usc.edu Someone wrote: > In the store command you can enter keywords enclosed in > double quotes. Do we have to treat the keywords that is > enclosed in a double quote differently than the keywords that > is not enclosed in double quotes? No. They should be treated the same way. But the basic syntax is tag=value(s) and the equal sign is mandatory. > For example, if we have a command > > store blondie.mp3 30 categories="audio mp3" > > and another command > > store blondie.mp3 30 categories=audio mp3 > > I the second case we can store both audio and mp3 as separate > searchable keywords. > > Could you please explain? In the 2nd case, you should print that there is a syntax error in the command since there is a missing equal sign. In the 1st case, as I have mentioned in class, there are 3 keywords and they are: categories audio mp3 -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Nov 12 16:50:08 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kAD0o88W021105 for ; Sun, 12 Nov 2006 16:50:08 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kAD0jq34019797 for ; Sun, 12 Nov 2006 16:45:52 -0800 Message-Id: <200611130045.kAD0jq34019797@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: [CS 551] Date: Sun, 12 Nov 2006 16:45:52 -0800 From: william@bourbon.usc.edu Someone wrote: > The fileID field is unique per node storing a specified file. I do > not see this value being stored in meta-data. Is it acceptable that > this value be different every time the sv_node restarts? Yes. > It seems that > the purpose of the fileID is simply to be able to specify which copy > of a file to get. If this is the only purpose, then it seems I don't > need to store it and retrieve it when sv_node shuts down or starts up. > Is this correct? Exactly! In class, I mentioned that you can every generate fileID after you get a hit in a search request and keep in memory forever, until the node shutsdown or restart. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Nov 12 16:40:06 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kAD0e69u020462 for ; Sun, 12 Nov 2006 16:40:06 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kAD0Zo9u019626 for ; Sun, 12 Nov 2006 16:35:50 -0800 Message-Id: <200611130035.kAD0Zo9u019626@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: FW: cs551: bit-vector Date: Sun, 12 Nov 2006 16:35:50 -0800 From: william@bourbon.usc.edu Someone wrote: > Well, after debugging for a long time, turns out that the bit-vector in > the spec (and slide 3 of lecture 21) does not correspond to the set of > keywords given. The SHA1 digest of "Blondie" is: > echo -n "Blondie" | openssl sha1 > 1ecc943bbd77d8b5e328c6d842a7e4cdb86f8a00 > Least significant 9 bits are 0 which means that 0th bit of the left-bit > vector has to be set, which is not the case. Square braces below > indicate the bit in error. > > Bit-vector from the spec: > 11 00 00 10 00 00 00 04 20 02 00 00 00 00 00 00 00 00 00 00 > 00 00 00 00 10 00 00 00 00 00 00 00 00 20 00 00 00 00 00 00 > 00 00 01 00 00 01 00 04 00 00 00 00 00 04 80 00 00 00 08 00 > 00 00 00 [00] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 > 00 10 00 08 80 00 00 00 00 00 00 00 40 04 84 00 00 00 02 10 > 00 00 00 00 00 00 08 10 00 00 00 00 00 00 20 00 02 00 02 00 > 00 00 00 00 00 00 00 00 > > Bit-vector produced by my sv_node: > 11 00 00 10 00 00 00 04 00 02 00 00 00 10 00 00 00 00 00 00 > 00 00 00 00 10 00 00 00 00 00 00 00 00 20 00 00 00 00 00 00 > 00 00 01 00 00 01 00 00 00 00 04 00 00 04 00 00 00 00 08 00 > 00 00 00 [01] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 > 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 > 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 > 00 00 00 00 00 00 00 00 > > Can I proceed with the rest of the project or am I missing something? :) The spec says the following in the Bit-vector paragraph: ... you must convert all uppercase letters in keywords to lowercase letters before you computer a bit-vector. You want the query word "blondie" to match "blondie", "Blondie", "BLONDIE", etc. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Nov 12 15:46:17 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kACNkHTx017072 for ; Sun, 12 Nov 2006 15:46:17 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kACNg1tU018953 for ; Sun, 12 Nov 2006 15:42:01 -0800 Message-Id: <200611122342.kACNg1tU018953@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: cs551: bit-vector Date: Sun, 12 Nov 2006 15:42:01 -0800 From: william@bourbon.usc.edu Someone wrote: > Does the bit-vector (from the slides): > Bit-vector= \ > 110000100000000420020000000000000000000000000000 \ > 100000000000000000200000000000000000010000010004 \ > 000000000004800000000800000000000000000000000000 \ > 000000000000000000100008800000000000000040048400 \ > 000002100000000000000810000000000000200002000200 \ > 0000000000000000 > > correspond to these keywords: > Keywords=categories audio mp3 artist Blondie \ > title Heart of Glass \ > url http://www.blondie.net/ \ > additional_keywords debra harry Yes. > I wanted to test if my output is right, can I compare it with this? Sure! > Some of the bits are jumbled in my output compared to the above. Here's > what I'm getting for the same set of keywords: > Bit-vector= > 110000100000000400020000001000000000000000000000100000000000000000200000 > 000000000000010000010000000004000004000000000800000000010200000000000000 > 000000000000004000000008800000000000010040040400000002100000000000000810 > 0000000000000000020002000000000000000000 I've just added a page at: http://merlot.usc.edu/cs551-f06/projects/bitvec/ for bit-vectors for individual words. Please compare the bit-vector for each word and see where the discrepancies are. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Nov 12 14:18:01 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kACMI1PZ011288 for ; Sun, 12 Nov 2006 14:18:01 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kACMDjVs017446 for ; Sun, 12 Nov 2006 14:13:45 -0800 Message-Id: <200611122213.kACMDjVs017446@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: content of kwrd file Date: Sun, 12 Nov 2006 14:13:45 -0800 From: william@bourbon.usc.edu Someone wrote: > Just want to go over this again for clarification: > > 1. The kwrd_index maps a bitvector to a file number > bitvector 1 -> file 1 > bitvector 2 -> file 2 > ... > > When a keyword query comes we need to construct the bitvector for > the query and AND with the bitvectors in kwrd_index one by one. > If we get a match (AND returns non-zero) we'll read the .meta > file and make sure that atleast one keyword exist in the meta > file. If yes, then we return this item. In the "Commandline Interface" section of the project spec, it says: To search for a file with keywords key1, key2, *and* key3, the user should enter: search keywords="key1 key2 key3" So, I think the correct algorithm to achieve this is to form the query bit-vector, AND it with the file bit-vector, if the result is identical to the query bit-vector, then you have to look at the metadata file and do string compares to make sure that all search keywords are file keywords. If one search keyword is not a file keyword, there is no hit. > 2. File name_index maps file name to file number > filename1 -> file 1 > ... > > 3. File sha1_index maps sha1 of file to file number > file_sha1 -> file 1 > ... > > These data structures are used for efficient search, right? Correct. Ideally, these 2 data structure should be binary search trees, so the search time is log(n) where n is the number of items in the data structure. But you can use a simple list, although it's not as efficient as a BST. > Is it possible for the filenames or sha1 to repeat since we can > store the same file multiple times? In that case we may not be > able to use the Hash data structure, right? Could you please > clarify? You can store items with identical keys in such a data structure. This is very common with data structures like this. You need to handle these collisions (or conflicts). In a typical data structures textbook, this would be called a "conflict resolution list" or something like that. Basically, instead of points to an file number, you point to either a file number or a list of file numbers. -- Bill Cheng // bill.cheng@usc.edu ----- Original Message ----- From: william@bourbon.usc.edu Date: Saturday, November 11, 2006 3:38 pm Subject: Re: content of kwrd file To: cs551@merlot.usc.edu > Someone wrote: > > > What should be the contents of the kwrd_index, name_index and > > sha1_index data structures? What do they point to? For example, > > keyword index points to the files that have that particular > > keyword? > > The kwrd_index is basically bit_vector map to file_number. > The name_index is file_name map to file_number. The > sha1_index is file_sha1 map to file_number. The "file_number" > can be an integer since you can easily constrcut the actual > file name or metadata file name in $HomeDir/files by doing an > sprintf(). > > For kwrd_index, you need a bit_vector for every file. So, > the basic data structure is: > > BitVector file_bit_vector; > int file_number; > > If you need more fields in it, that's perfectly fine. So, > the kwrd_index can be just a list of the data structure. > When you get a query, you create a "query bit_vector". Then > you simply go down the kwrd_index and visit every object in > the list and AND the query bit_vector with the file bit_vector. > If the result is a zero bit vector, you go to the next item > on the list. > -- > Bill Cheng // bill.cheng@usc.edu > > > > ----- Original Message ----- > From: william@bourbon.usc.edu > Date: Thursday, November 9, 2006 10:17 am > Subject: Re: content of kwrd file > To: cs551@merlot.usc.edu > > > Someone wrote: > > > > > What would be the content inside the kwrd file? Is it > mapping of > > > a specific keyword to number of files? > > > > You mean the kwrd_index file? Then the answer is yes. But > > it doesn't have to be exactly that since you have the freedom > > to do what you want here. This should also be what you would > > have in your kwrd index data structure in memory. > > -- > > Bill Cheng // bill.cheng@usc.edu > > Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Nov 12 10:33:54 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kACIXr2d029420 for ; Sun, 12 Nov 2006 10:33:53 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kACITcge015599 for ; Sun, 12 Nov 2006 10:29:38 -0800 Message-Id: <200611121829.kACITcge015599@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: [CS 551] Date: Sun, 12 Nov 2006 10:29:38 -0800 From: william@bourbon.usc.edu Someone wrote: > For the index files written to the home directory, can we update these > only when shutting down? That is, if a file is added during program > operation, do you or the TA expect the modifications in real-time to > these index files? Seems if their purpose is only for rapid > re-loading of the tree structures, they can be written at shutdown > only with no impact. If your program never crashes out of the blue, then it's probably fine. There is no requirement regarding when you must do this. I think it's benificial to write as soon as you insert or delete an item in the related in-memory data structure. It's not too efficient, but adding or delete files from your mini-filesystem shouldn't happen too often, relative to networking fucntionalities. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Nov 12 10:30:15 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kACIUF85029276 for ; Sun, 12 Nov 2006 10:30:15 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kACIQ0Kk015557 for ; Sun, 12 Nov 2006 10:26:00 -0800 Message-Id: <200611121826.kACIQ0Kk015557@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: [CS 551] Date: Sun, 12 Nov 2006 10:26:00 -0800 From: william@bourbon.usc.edu Someone wrote: > I have a question about the file buffer sizes allowed. > > In my imelementation of part 1, I assumed that every message received > could be stored fully within memory before I dealt with it. For part > 2, are we to restrict our data buffer size (hence forcing many partial > packet reads and processing sessions when dealing with get and > store?). The spec doesn't clarify, though you made such a restriction > is previous projects. Yes you should for part (2). When you read the common header and see that the data portion is large, you should not read in the whole data part in one shot. This is even true with warmup #1. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Nov 12 10:25:24 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kACIPOYS028894 for ; Sun, 12 Nov 2006 10:25:24 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kACIL9PT015507 for ; Sun, 12 Nov 2006 10:21:09 -0800 Message-Id: <200611121821.kACIL9PT015507@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: cs551: sha1 of files Date: Sun, 12 Nov 2006 10:21:09 -0800 From: william@bourbon.usc.edu Someone wrote: > From the project spec, I was under the impression that binary files > would not be used: > > "Also, the sample code above for signing only works if foo is a text > file. (Although it is not needed for this project, please note that > for a binary file, you must convert the file into ASCII using openssl > enc -base64 and later use openssl enc -d -base64 to convert it back > into binary form.)" The files that you store and get can be binary files, so you should always treat them as binary files. When you delete, the 3 lines of File Spec that you sign is an ASCII file. The only thing you will have to *sign* is this ASCII file. -- Bill Cheng // bill.cheng@usc.edu On 11/11/06, william@bourbon.usc.edu wrote: > Someone wrote: > > > For computing the SHA1 of large binary files, can we read from the file > > one byte at a time (using fread()) in conjunction with the "init update > > final" mechanism to generate the SHA1 hash of the file? > > Correct. But you can read 4096 bytes at a time and send 4096 > bytes to one of these SHA1 functions at a time. > > > Also, should we > > use stat() or fstat() to get the filesize or just compute it on the fly > > during sha1 calculation assuming that we will have read permissions for > > the file anyway? > > You can simply add up what's returned by fread() and not use > stat()/fstat(). If you don't have read permissions, you will > get an error when you open the file. > -- > Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Nov 12 00:30:44 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kAC8UiqQ030070 for ; Sun, 12 Nov 2006 00:30:44 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kAC8QUR4017240 for ; Sun, 12 Nov 2006 00:26:30 -0800 Message-Id: <200611120826.kAC8QUR4017240@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: bit vector output Date: Sun, 12 Nov 2006 00:26:30 -0800 From: william@bourbon.usc.edu Someone wrote: > I'm using openssl BIGNUM structure to implement the bit vector. > It has methods that'll produce a hex string output. It also has > amethod that'll create a BIGNUM structure from a hex string. But, > it only outputs only the leading number of bits as output (for > example if all values in the bit vector is 0, the hexstring only > produces 0 - not 128 0's). Is this OK? Or do we need to output > 128 characters all the time? You must output 128 characters all the time since this is a bit vector and not a number. If you are using BIGNUM, it's very easy to always output 128 characters. Just call one of those functions to conver BIGNUM to hexstring, then do a strlen(), and you can determine how many leading zeroes to print. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sat Nov 11 15:47:24 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kABNlN1V026395 for ; Sat, 11 Nov 2006 15:47:24 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kABNhBpP009375 for ; Sat, 11 Nov 2006 15:43:11 -0800 Message-Id: <200611112343.kABNhBpP009375@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: sha1 / Md5 question Date: Sat, 11 Nov 2006 15:43:11 -0800 From: william@bourbon.usc.edu Someone wrote: > When I call SHA1 method it returns a uchar array. For example, > the SHA1 for categories is > 50b9e78177f37e3c747f67abcc8af36a44f218f5. > > But, the value of > array[0] is 0x50 > array[1] is 0xb9 > > and so on. > > Now if you want to convert this to hex string you need to treat > array[0] as MSB. In some other case (such as bloom filter case), > we need to treat array[0] as LSB. Is this behavior is expected? For SHA1 value, array[0] is always the MSB. Could you let me known when should we treat array[0] as LSB? -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sat Nov 11 15:44:48 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kABNimR2026256 for ; Sat, 11 Nov 2006 15:44:48 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kABNeZ5R009325 for ; Sat, 11 Nov 2006 15:40:35 -0800 Message-Id: <200611112340.kABNeZ5R009325@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: cs551: sha1 of files Date: Sat, 11 Nov 2006 15:40:35 -0800 From: william@bourbon.usc.edu Someone wrote: > For computing the SHA1 of large binary files, can we read from the file > one byte at a time (using fread()) in conjunction with the "init update > final" mechanism to generate the SHA1 hash of the file? Correct. But you can read 4096 bytes at a time and send 4096 bytes to one of these SHA1 functions at a time. > Also, should we > use stat() or fstat() to get the filesize or just compute it on the fly > during sha1 calculation assuming that we will have read permissions for > the file anyway? You can simply add up what's returned by fread() and not use stat()/fstat(). If you don't have read permissions, you will get an error when you open the file. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sat Nov 11 15:42:05 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kABNg55c026116 for ; Sat, 11 Nov 2006 15:42:05 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kABNbqgO009276 for ; Sat, 11 Nov 2006 15:37:52 -0800 Message-Id: <200611112337.kABNbqgO009276@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: cs551: assumptions Date: Sat, 11 Nov 2006 15:37:52 -0800 From: william@bourbon.usc.edu Someone wrote: > Just wanted to confirm if I can make the following assumptions: > 1. /files directory in the home directory exists always No. But you can simply call mkdir() when you node starts. > 2. There is no white space around the equal sign in the store > command. (The spec mentions this only for the search and delete > commands) Yes. If you print an error message if the store command does not follow the format. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sat Nov 11 15:39:46 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kABNdk2O025859 for ; Sat, 11 Nov 2006 15:39:46 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kABNZYDv009229 for ; Sat, 11 Nov 2006 15:35:34 -0800 Message-Id: <200611112335.kABNZYDv009229@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: content of kwrd file Date: Sat, 11 Nov 2006 15:35:34 -0800 From: william@bourbon.usc.edu Someone wrote: > What should be the contents of the kwrd_index, name_index and > sha1_index data structures? What do they point to? For example, > keyword index points to the files that have that particular > keyword? The kwrd_index is basically bit_vector map to file_number. The name_index is file_name map to file_number. The sha1_index is file_sha1 map to file_number. The "file_number" can be an integer since you can easily constrcut the actual file name or metadata file name in $HomeDir/files by doing an sprintf(). For kwrd_index, you need a bit_vector for every file. So, the basic data structure is: BitVector file_bit_vector; int file_number; If you need more fields in it, that's perfectly fine. So, the kwrd_index can be just a list of the data structure. When you get a query, you create a "query bit_vector". Then you simply go down the kwrd_index and visit every object in the list and AND the query bit_vector with the file bit_vector. If the result is a zero bit vector, you go to the next item on the list. -- Bill Cheng // bill.cheng@usc.edu ----- Original Message ----- From: william@bourbon.usc.edu Date: Thursday, November 9, 2006 10:17 am Subject: Re: content of kwrd file To: cs551@merlot.usc.edu > Someone wrote: > > > What would be the content inside the kwrd file? Is it mapping of > > a specific keyword to number of files? > > You mean the kwrd_index file? Then the answer is yes. But > it doesn't have to be exactly that since you have the freedom > to do what you want here. This should also be what you would > have in your kwrd index data structure in memory. > -- > Bill Cheng // bill.cheng@usc.edu > Return-Path: william@bourbon.usc.edu Delivery-Date: Fri Nov 10 16:25:22 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kAB0PMfd001078 for ; Fri, 10 Nov 2006 16:25:22 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kAB0LDIE025436 for ; Fri, 10 Nov 2006 16:21:13 -0800 Message-Id: <200611110021.kAB0LDIE025436@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: [CS 551] Date: Fri, 10 Nov 2006 16:21:13 -0800 From: william@bourbon.usc.edu Someone wrote: > A question about the get command... > > It is said that when you GET a file, a permanent copy is stored (not > cache-only), but the node then serves the file. Where are permanent > files stored within the directory structure? The permanent files and the cache files should be stored in the same place, i.e., $HomeDir/files/*.data. > If the file isn't stored > in the directory with the cached files, how are we to track > where all the files are located which are being served? Sounds messy! > Meta data is stored with the permanent file, correct? You can have another index structure that keeps track of whether a file is cached or permanent. You can add a bit to one of the existing index structures (SHA1, filename, or bit-vector). Or you can have addition files in the $HmoeDir/files directory. For example, create an empty file 1.perm if the 1.data is permanent; otherwise, 1.data is cached. You can also keep track of the total file size for cached and perm in a .ini file in $HomeDir since you already have the code to parse a .ini file. Since this is not part of the networking protocol, you can do it any way you want; whatever you think is most convenient. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Thu Nov 9 23:05:43 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kAA75h2h032377 for ; Thu, 9 Nov 2006 23:05:43 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kAA71b40015233 for ; Thu, 9 Nov 2006 23:01:37 -0800 Message-Id: <200611100701.kAA71b40015233@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: [CS551] Proj - Certificates usage Date: Thu, 09 Nov 2006 23:01:37 -0800 From: william@bourbon.usc.edu Someone wrote: > I'd misunderstood it as being done at the sending side. I guess things > are clear now. Just to make sure again, please let me know if my > understanding below is correct: > > 1. Each node creates a public key (cert.pem) and a private key > (private.pem) when it starts up > 2. When node A wants to store a file, it sends its cert.pem in the store > message (and the file itself) > 3. The node which receives this message stores this certificate as > 1.cert and the file as 1.data > 4. When node A wants to delete this file, it creates a temporary 3-line > FileSpec, signs it using its public and private keys and sends this > delete message. > 5. The receiver of this delete message verifies the signature of > FileSpec using 1.cert and if successful deletes the file Precisely! -- Bill Cheng // bill.cheng@usc.edu -----Original Message----- From: william@bourbon.usc.edu [mailto:william@bourbon.usc.edu] Sent: Thursday, November 09, 2006 9:46 PM To: cs551@merlot.usc.edu Subject: Re: [CS551] Proj - Certificates usage Someone wrote: > In point (2) in the below mail, > Why would we create copies of the "public key certificate" for each > store message? Because you need the public key certificate to verify digital signatures. If the certificate is not stored with the files, when a delete message come, where are you going to get the certificate to verify the digital signature? > Or did it mean for "delete message" store the signature > of the "FileSpec" as 1.cert No. In a delete message, the File Spec (which specify which file is to be deleted) is digital signed by the node requesting the deletion of the corresponding file. -- Bill Cheng // bill.cheng@usc.edu -----Original Message----- From: william@bourbon.usc.edu [mailto:william@bourbon.usc.edu] Sent: Tuesday, November 07, 2006 9:27 AM To: cs551@merlot.usc.edu Subject: Re: [CS551] Proj - Certificates usage Someone wrote: > I've questions on certificates usage in proj part 2: > > (1) public and private certificates are created once upon > application start and stored as a temp files in $HOME directory. > Is that correct ? Yes. > (2) When public certificate is sent to another node in Store > message, how is it stored ? > Can it be 1.pem (or index.pem per file) in $HOME/files directory > ? Yes. The lecture slides suggested to use 1.cert, but 1.pem is just as good. > (3) If the node that originated a file is reset, and its > certificate is deleted, there is no way to delete that file > stored in other nodes (because Delete message must contain the > certificate). Is that correct ? Correct, except if we run with -reset on the node that stores a copy of the file. What we do during grading is to run with -reset on all nodes at about the same time. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Thu Nov 9 21:50:16 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kAA5oGN6027381 for ; Thu, 9 Nov 2006 21:50:16 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kAA5kAUj014294 for ; Thu, 9 Nov 2006 21:46:10 -0800 Message-Id: <200611100546.kAA5kAUj014294@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: [CS551] Proj - Certificates usage Date: Thu, 09 Nov 2006 21:46:10 -0800 From: william@bourbon.usc.edu Someone wrote: > In point (2) in the below mail, > Why would we create copies of the "public key certificate" for each > store message? Because you need the public key certificate to verify digital signatures. If the certificate is not stored with the files, when a delete message come, where are you going to get the certificate to verify the digital signature? > Or did it mean for "delete message" store the signature > of the "FileSpec" as 1.cert No. In a delete message, the File Spec (which specify which file is to be deleted) is digital signed by the node requesting the deletion of the corresponding file. -- Bill Cheng // bill.cheng@usc.edu -----Original Message----- From: william@bourbon.usc.edu [mailto:william@bourbon.usc.edu] Sent: Tuesday, November 07, 2006 9:27 AM To: cs551@merlot.usc.edu Subject: Re: [CS551] Proj - Certificates usage Someone wrote: > I've questions on certificates usage in proj part 2: > > (1) public and private certificates are created once upon > application start and stored as a temp files in $HOME directory. > Is that correct ? Yes. > (2) When public certificate is sent to another node in Store > message, how is it stored ? > Can it be 1.pem (or index.pem per file) in $HOME/files directory > ? Yes. The lecture slides suggested to use 1.cert, but 1.pem is just as good. > (3) If the node that originated a file is reset, and its > certificate is deleted, there is no way to delete that file > stored in other nodes (because Delete message must contain the > certificate). Is that correct ? Correct, except if we run with -reset on the node that stores a copy of the file. What we do during grading is to run with -reset on all nodes at about the same time. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Thu Nov 9 10:27:17 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kA9IRHur016269 for ; Thu, 9 Nov 2006 10:27:17 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kA9INDie006451 for ; Thu, 9 Nov 2006 10:23:13 -0800 Message-Id: <200611091823.kA9INDie006451@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: cs551: certificates Date: Thu, 09 Nov 2006 10:23:13 -0800 From: william@bourbon.usc.edu Someone wrote: > "Also, the sample code above for signing only works if foo is a text > file. (Although it is not needed for this project, please note that for > a binary file, you must convert the file into ASCII using openssl enc > -base64 and later use openssl enc -d -base64 to convert it back into > binary form.)" > Does this mean we only support text files in this project? Yes. The *only* thing you will need to sign for this project is "File Spec" which is 3 lines of ASCII text. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Thu Nov 9 10:19:07 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kA9IJ7HL015753 for ; Thu, 9 Nov 2006 10:19:07 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kA9IF3FF006193 for ; Thu, 9 Nov 2006 10:15:03 -0800 Message-Id: <200611091815.kA9IF3FF006193@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: content of kwrd file Date: Thu, 09 Nov 2006 10:15:03 -0800 From: william@bourbon.usc.edu Someone wrote: > What would be the content inside the kwrd file? Is it mapping of > a specific keyword to number of files? You mean the kwrd_index file? Then the answer is yes. But it doesn't have to be exactly that since you have the freedom to do what you want here. This should also be what you would have in your kwrd index data structure in memory. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Wed Nov 8 10:01:36 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kA8I1aGd020204; Wed, 8 Nov 2006 10:01:36 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kA8HvZNe017605; Wed, 8 Nov 2006 09:57:35 -0800 Received: (from william@localhost) by bourbon.usc.edu (8.13.5/8.13.5/Submit) id kA8HvZhA017604; Wed, 8 Nov 2006 09:57:35 -0800 Date: Wed, 8 Nov 2006 09:57:35 -0800 From: william@bourbon.usc.edu Message-Id: <200611081757.kA8HvZhA017604@bourbon.usc.edu> To: cs551@merlot.usc.edu, csac@merlot.usc.edu Subject: if you would like to discuss your midterm exam today... Hi, I'm in my office (SAL 228) most of the day today between 10am and 4pm (I'll be out to lunch probably between noone and 12:30pm). If you would like to discuss your midterm, you are welcome to come by. If you would like to make sure that I'm in the office, please send me an e-mail to let me know when you plan to come by. Thanks! -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Tue Nov 7 19:47:37 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kA83lbIj030416 for ; Tue, 7 Nov 2006 19:47:37 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kA83hcH1009217 for ; Tue, 7 Nov 2006 19:43:38 -0800 Message-Id: <200611080343.kA83hcH1009217@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: cs551 size Date: Tue, 07 Nov 2006 19:43:38 -0800 From: william@bourbon.usc.edu Someone wrote: > Just want to clarify that: > > Only if a node receives store request from a neighbor and if > Storeprob results in positive, > this will result in increase in the *CacheSize* by the actual > data file size. Correct. > *PermSize* is is incremented by the actual data file size, if and > only if a node originates a store request. Or a GET. If a node *originates* a STORE or *originates* a GET, then it should put the file in the "permanent space". -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Tue Nov 7 09:30:34 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kA7HUYV4023240 for ; Tue, 7 Nov 2006 09:30:34 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kA7HQb1C002346 for ; Tue, 7 Nov 2006 09:26:37 -0800 Message-Id: <200611071726.kA7HQb1C002346@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: [CS551] Proj - Certificates usage Date: Tue, 07 Nov 2006 09:26:37 -0800 From: william@bourbon.usc.edu Someone wrote: > I've questions on certificates usage in proj part 2: > > (1) public and private certificates are created once upon > application start and stored as a temp files in $HOME directory. > Is that correct ? Yes. > (2) When public certificate is sent to another node in Store > message, how is it stored ? > Can it be 1.pem (or index.pem per file) in $HOME/files directory > ? Yes. The lecture slides suggested to use 1.cert, but 1.pem is just as good. > (3) If the node that originated a file is reset, and its > certificate is deleted, there is no way to delete that file > stored in other nodes (because Delete message must contain the > certificate). Is that correct ? Correct, except if we run with -reset on the node that stores a copy of the file. What we do during grading is to run with -reset on all nodes at about the same time. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Tue Nov 7 09:20:59 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kA7HKxbv022575 for ; Tue, 7 Nov 2006 09:20:59 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kA7HH2Vi002209 for ; Tue, 7 Nov 2006 09:17:02 -0800 Message-Id: <200611071717.kA7HH2Vi002209@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Probability question Date: Tue, 07 Nov 2006 09:17:02 -0800 From: william@bourbon.usc.edu Someone wrote: > Could you please explain what positive probability is and how to > calculate it (can we use rand() function)? The spec didn't use the term "positivie probability". Let's say you have a probability p=0.2 and you want to flip coins with this probability. What would you do? If drand48() returns a real value between 0 and 1 with a uniform distribution, then you can do: if (drand48() < 0.2) { return "positive"; } else { return "negative"; } Then 20% of the time, this will return "positive" and 80% of the time, this will return "negative", which is what you want. By the way, do you use rand(). Use srand48() and drand48() or lrand48() instead. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Tue Nov 7 09:16:34 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kA7HGY4b022298 for ; Tue, 7 Nov 2006 09:16:34 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kA7HCboB002155 for ; Tue, 7 Nov 2006 09:12:37 -0800 Message-Id: <200611071712.kA7HCboB002155@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: cs551: store cmd Date: Tue, 07 Nov 2006 09:12:37 -0800 From: william@bourbon.usc.edu Someone wrote: > When the user enters the store command, we need to copy the > content of the file to the /files directory (as x.data, where x > is the latest number), right? What happens when the user enters > the store command multiple times with the same file name? Do we > create a new .data file (and other files) for every store > command? Yes. Every file will have a difference nonce in the metadata. -- Bill Cheng // bill.cheng@usc.edu ----- Original Message ----- From: william@bourbon.usc.edu Date: Monday, November 6, 2006 9:58 am Subject: Re: cs551: store cmd To: cs551@merlot.usc.edu > Someone wrote: > > > Just confirming... when the user enters "store foo > [tag1="value1" > tag2="value2" ...]", the file "foo" already > exists in the current > > working directory (or the path if it begins with /), > > Correct. If you have not changed your working directory > programatically, you just do something like open("foo") > and it should work. > > > we just need to > > create the metadata file and store it in the /files directory > and flood > > the store msg right? > > Yes. Please remember to name your files "1.data", "2.data", etc. > > > And to calculate the SHA1 for the file should we > > use the file contents or just an arbitrary string with a different > > sequence number (as given in the spec in getUOID function) > > The SHA1 value in the metadata must be the SHA1 hash of the file. > When another node downloads a file, it should calculate the SHA1 > value. If it does not match what's in the metadata, it should > treat the data as corrupted and discard the file. > -- > Bill Cheng // bill.cheng@usc.edu > Return-Path: william@bourbon.usc.edu Delivery-Date: Mon Nov 6 09:59:54 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kA6Hxs9k028756 for ; Mon, 6 Nov 2006 09:59:54 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kA6Hu1av020639 for ; Mon, 6 Nov 2006 09:56:01 -0800 Message-Id: <200611061756.kA6Hu1av020639@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: cs551: store cmd Date: Mon, 06 Nov 2006 09:56:01 -0800 From: william@bourbon.usc.edu Someone wrote: > Just confirming... when the user enters "store foo [tag1="value1" > tag2="value2" ...]", the file "foo" already exists in the current > working directory (or the path if it begins with /), Correct. If you have not changed your working directory programatically, you just do something like open("foo") and it should work. > we just need to > create the metadata file and store it in the /files directory and flood > the store msg right? Yes. Please remember to name your files "1.data", "2.data", etc. > And to calculate the SHA1 for the file should we > use the file contents or just an arbitrary string with a different > sequence number (as given in the spec in getUOID function) The SHA1 value in the metadata must be the SHA1 hash of the file. When another node downloads a file, it should calculate the SHA1 value. If it does not match what's in the metadata, it should treat the data as corrupted and discard the file. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sat Nov 4 13:15:04 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kA4LF4KP018207 for ; Sat, 4 Nov 2006 13:15:04 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kA4LBHbr000337 for ; Sat, 4 Nov 2006 13:11:17 -0800 Message-Id: <200611042111.kA4LBHbr000337@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Final project part2 Date: Sat, 04 Nov 2006 13:11:17 -0800 From: william@bourbon.usc.edu Someone wrote: > As my final project part1 hasn't been complete, could I just make it up > to support the final project part2? I mean it is unnecessary to meet all > requirements in grading guideline part 1, but the part 2 we need. Exactly! For example, for part (2), you don't need join since you can just put init_neighbor_list in a node's HomeDir. Also, you don't need check because *all* startup configuration file will have NoCheck=1. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Fri Nov 3 14:26:52 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kA3MQprP022811 for ; Fri, 3 Nov 2006 14:26:51 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kA3MN8V7011853 for ; Fri, 3 Nov 2006 14:23:08 -0800 Received: (from william@localhost) by bourbon.usc.edu (8.13.5/8.13.5/Submit) id kA3MN8OT011852 for cs551@merlot; Fri, 3 Nov 2006 14:23:08 -0800 Date: Fri, 3 Nov 2006 14:23:08 -0800 From: william@bourbon.usc.edu Message-Id: <200611032223.kA3MN8OT011852@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: grading guidelines for final project part (2) is available Hi, I've just made the grading guidelines for final project part (2) available on the web. Please see near the bottom of the project spec page. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Fri Nov 3 07:14:35 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kA3FEZol027711 for ; Fri, 3 Nov 2006 07:14:35 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kA3FArP9006850 for ; Fri, 3 Nov 2006 07:10:53 -0800 Message-Id: <200611031510.kA3FArP9006850@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: min nieghbour Date: Fri, 03 Nov 2006 07:10:53 -0800 From: william@bourbon.usc.edu Someone wrote: > I wanted to clarify something.. > the Min neighbor number is basically the number of servers that the node > needs to be connected too. Only when the node starts. > so during a node participating, if one of its neighbor disconnects, then > do we have to check as to how many r we connected to? No. > and if it falls below the min n, we wud have to restart the node refresh. No. > does this behavior also seen by a beacon? No. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Thu Nov 2 20:44:59 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kA34ixAs015458 for ; Thu, 2 Nov 2006 20:44:59 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kA34fIh6029811 for ; Thu, 2 Nov 2006 20:41:18 -0800 Message-Id: <200611030441.kA34fIh6029811@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Slides Date: Thu, 02 Nov 2006 20:41:18 -0800 From: william@bourbon.usc.edu Someone wrote: > Could you please upload today's slides on to the website? Done. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Thu Nov 2 20:39:52 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kA34dqDu015003 for ; Thu, 2 Nov 2006 20:39:52 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kA34aBAl029744 for ; Thu, 2 Nov 2006 20:36:11 -0800 Message-Id: <200611030436.kA34aBAl029744@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: testing cases: grading guidelines Date: Thu, 02 Nov 2006 20:36:11 -0800 From: william@bourbon.usc.edu Someone wrote: > I am bit confused on the commands that we have to run to get the grade > guidelines up and running. > > why are we doing > ~csci551b/bin/resetf1 > /bin/rm n??.ini ??.out > > for every step, b4 running the node with a particular ini file? > > shudn't we just be able to run the the ini file as is, that is after we > have done the setup? If you have done the setup (using ~csci551b/bin/setupf1), you should have all the .ini files in your ~/grading/guidelines/final1. Then you should replace: "cp ~csci551b/public/final1" with "cp ~/grading/guidelines/final1" -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Thu Nov 2 13:47:02 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kA2Ll2SB021324 for ; Thu, 2 Nov 2006 13:47:02 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kA2LhMtq025453 for ; Thu, 2 Nov 2006 13:43:22 -0800 Message-Id: <200611022143.kA2LhMtq025453@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: cs551 init_neighbor_list Date: Thu, 02 Nov 2006 13:43:22 -0800 From: william@bourbon.usc.edu Someone wrote: > Is there a specific format to be followed for the init_neighbor_list file ? Yes! > I am currently using the format "Hostname Port Distance\n". Is that fine? No. In the first few paragraphs in: http://merlot.usc.edu/cs551-f06/projects/final.html#testing it says: An init_neighbor_list file must conform to the format specified here. It must be an ASCII text file where each line in it has the form hostname:port. You don't need to store Distance. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Thu Nov 2 13:35:43 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kA2LZhxG020416 for ; Thu, 2 Nov 2006 13:35:43 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kA2LW3pU025333 for ; Thu, 2 Nov 2006 13:32:03 -0800 Message-Id: <200611022132.kA2LW3pU025333@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Response TTL Date: Thu, 02 Nov 2006 13:32:03 -0800 From: william@bourbon.usc.edu Someone wrote: > Is the TTL in a response message decremented by each forwarding node? Yes. > I ask because if the TTL of the responding node is not large enough, then > the message will not make it back to the initiator. Correct. And that's okay. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Thu Nov 2 09:12:29 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kA2HCTv6003333 for ; Thu, 2 Nov 2006 09:12:29 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kA2H8oFl021718 for ; Thu, 2 Nov 2006 09:08:50 -0800 Message-Id: <200611021708.kA2H8oFl021718@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: [CS 551] Date: Thu, 02 Nov 2006 09:08:50 -0800 From: william@bourbon.usc.edu Someone wrote: > I want to verify that what I'm observing is correct behavior. > > When a node has a pre-existing init_neighbor_list, but one of the > neighbors is now down... My node comes up and detects the neighbor is > down, then immediately sends out a check message. You should not do it. You should only flood check messages if a neighbor disconnects on an operational connection. > I hadn't expected > this behavior, but I am now thinking it makes sense. If the > init-neighbor list is not fully active, might we now be partitioned? I think given our protocol, the network can not be partitioned (except for transients). > It makes some testing more challenging though (because there are > checks flying around when you lose one neighbor and bright up your > node). I think it's better not to do it. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Thu Nov 2 09:06:24 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kA2H6OLI002735 for ; Thu, 2 Nov 2006 09:06:24 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kA2H2jqv021381 for ; Thu, 2 Nov 2006 09:02:45 -0800 Message-Id: <200611021702.kA2H2jqv021381@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: cs551 uoid Date: Thu, 02 Nov 2006 09:02:45 -0800 From: william@bourbon.usc.edu Someone wrote: > Just to make sure that i understand that correctly. > we have to have unique uoid' when we flood the msg? Sure! Otherwise, message routing when a node tries to respond to something can break. -- Bill Cheng // bill.cheng@usc.edu william@bourbon.usc.edu wrote: > Someone wrote: > > > I am sending one keepailve msg to all my neighbors. > > So UOID is same for all neighbors. > > Is that acceptable? > > It's not right, but there is no harm if TTL is 1. > (This reminds me of AS_PATH Inflation.) > -- > Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Wed Nov 1 14:22:28 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kA1MMSfp026502 for ; Wed, 1 Nov 2006 14:22:28 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kA1MIpKV006799 for ; Wed, 1 Nov 2006 14:18:52 -0800 Received: (from william@localhost) by bourbon.usc.edu (8.13.5/8.13.5/Submit) id kA1MIpP6006798 for cs551@merlot; Wed, 1 Nov 2006 14:18:51 -0800 Date: Wed, 1 Nov 2006 14:18:51 -0800 From: william@bourbon.usc.edu Message-Id: <200611012218.kA1MIpP6006798@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: team commitment form for final project (1)... Hi, If you are doing a group project and have not sent me the signed team commitment forms, please do so ASAP. If you cannot get the signed form to me before the project due time, I need an e-mail commitment from both team members. Once I collect your final project and submit it through MOSS, then it's all too late! If you are doing a group project, I must have commitment from you by the time I submit your submission to MOSS to check for plagiarism. Please understand that I cannot change this rule. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Wed Nov 1 11:42:29 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kA1JgT3c016280 for ; Wed, 1 Nov 2006 11:42:29 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kA1JcrB3004760 for ; Wed, 1 Nov 2006 11:38:53 -0800 Message-Id: <200611011938.kA1JcrB3004760@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: cs551 joining Date: Wed, 01 Nov 2006 11:38:53 -0800 From: william@bourbon.usc.edu Someone wrote: > when a servant node is "joining" the network, after it has got all its > join replies and is shutting down, should it send a Notify over the > connection? It does not. > Or is Notify only for those connections which have > exchanged Hello messages? Exactly! -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Wed Nov 1 10:28:39 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kA1ISd93011615 for ; Wed, 1 Nov 2006 10:28:39 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kA1IP442003604 for ; Wed, 1 Nov 2006 10:25:04 -0800 Message-Id: <200611011825.kA1IP442003604@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Test case - question Date: Wed, 01 Nov 2006 10:25:04 -0800 From: william@bourbon.usc.edu Someone wrote: > The last test case has the following: > > type "shutdown" in the 3rd window (killing node *04) > (nodes *03 and *02 should do CHECKs, they should timeout > and restart with their init_neighbor_list deleted) > (depending on who restarts first, you would get a slightly > different network; if node *03 restarts first, > node *03 should have nodes *01 and *08 as its > init-neighbors and node *02 should have nodes *03 and > *08 as its init-neighbors; if node *02 restarts first, > node *02 should have nodes *01 and *08 as its > init-neighbors and node *03 should have nodes *01 and > *02 as its init-neighbors) > *wait* for all nodes to autoshutdown > > In my case both nodes 3 and 2 does Check simulateneously. So, > when one node performs join, other node also performs join. > In that case both node will make 1 and 8 as neighbors. > Could you please clarify? You are correct that they can restart at the same time. I'm adding the following to the above long sentense: (depending ... ... ; if nodes *02 and *03 restarts approximately at the same time, both will have nodes *01 and *08 as their init-neighbors) Thanks for catching it! -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Wed Nov 1 09:53:04 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kA1Hr4Zi009278 for ; Wed, 1 Nov 2006 09:53:04 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kA1HnTGq003184 for ; Wed, 1 Nov 2006 09:49:29 -0800 Message-Id: <200611011749.kA1HnTGq003184@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: cs551 using test files Date: Wed, 01 Nov 2006 09:49:29 -0800 From: william@bourbon.usc.edu Someone wrote: > I am following the steps given in grading guidelines as follows > ~csci551b/bin/resetf1 > This created /tmp/final1/n?? directories in /myusername/ > > Note, I am executing the files from /myusername/final/ which is the > directory where I have all my project files. > > Next I did > cp ~csci551b/public/final1/b1-n00.ini . > cp ~csci551b/public/final1/b2-n00.ini . > cp ~csci551b/public/final1/b2-n01.ini . > > which copied the files to my project directory > > However, when I do sv_node b2-n00.ini and sv_node b2-n01.ini, I get a > segmentation fault at fprintf (gdb didnt give me any file or line > number, just an address), which I believe is due to file permissions > that I am unable to write file. I am giving the write path as > "HomeDirectory"+"/"+"IniFilename" > > When I was executing the files where my homedirectory was pwd, I was > sucessfully getting the log files and never got any errors. > > Could you please explain how exactly am I to use the test files. > Do I need to modify my HomeDirectory in the test files to my local > directories ? Please see: http://merlot.usc.edu/cs551-f06/projects/testcases/p1.html#setupf1 It first says: "... please do not use these startup configuration files directly" Please follow the instructions there. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Tue Oct 31 22:43:06 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id kA16h6oA030781 for ; Tue, 31 Oct 2006 22:43:06 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id kA16dWdf028927 for ; Tue, 31 Oct 2006 22:39:32 -0800 Message-Id: <200611010639.kA16dWdf028927@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Grading guideline question Date: Tue, 31 Oct 2006 22:39:32 -0800 From: william@bourbon.usc.edu Someone wrote: > I have a question regarding the last test case. It says > "more ~/tmp/final1/n08/servant.log (there should be no JNRQ or > JNRS)" > > I'm getting JNRQ and JNRS from nodes 2 and 3 because the join > request is flooded. Could you please clarify? You are correct! I have change the following line: (there should be no JNRQ or JNRS) to: (one JNRQ should have port="18002" and hostname="nunki.usc.edu" and a corresponding JNRS having distance="38024" from the *n08 non-beacon node) (another JNRQ should have port="18003" and hostname="nunki.usc.edu" and a corresponding JNRS having distance="48055" from the *n08 non-beacon node) Thanks for catching the bug. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Tue Oct 31 12:30:32 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9VKUWFV023893 for ; Tue, 31 Oct 2006 12:30:32 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9VKR09p021585 for ; Tue, 31 Oct 2006 12:27:00 -0800 Message-Id: <200610312027.k9VKR09p021585@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: node location Date: Tue, 31 Oct 2006 12:27:00 -0800 From: william@bourbon.usc.edu Someone wrote: > I just want to make sure I've made the correct assumption. The > spec doesn't really mention how to come up with the location so I > assume it's some "random" number given by the user when creating > the .ini file. Is this the correct assumption? Correct. > If so, what > should be the behavior if 2 nodes have the same location? It > would seem to me that it would return a join response with a > distance of zero. Please advise. Correct. Does this cause a problem? -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Tue Oct 31 10:31:19 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9VIVJv5016115 for ; Tue, 31 Oct 2006 10:31:19 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9VIRlRY020415 for ; Tue, 31 Oct 2006 10:27:47 -0800 Message-Id: <200610311827.k9VIRlRY020415@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: logging: size Date: Tue, 31 Oct 2006 10:27:47 -0800 From: william@bourbon.usc.edu Someone wrote: > if the size in the log is the sixe for the header of the message. > isnt it goin to be the same for all messages, since all the headers are > the same. "The field should account for the message header" in the spec meant that the minimum size should be the size of the header. So, basically it's just: common_header_length + data_length_in_header -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Tue Oct 31 10:18:53 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9VIIr7N015354 for ; Tue, 31 Oct 2006 10:18:53 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9VIFLGQ020177 for ; Tue, 31 Oct 2006 10:15:21 -0800 Message-Id: <200610311815.k9VIFLGQ020177@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: [CS 551] Date: Tue, 31 Oct 2006 10:15:21 -0800 From: william@bourbon.usc.edu Someone wrote: > I have the following problem: if I use gethostent() to retreive the > local hostname I receive "localhost", not nunki.usc.edu. > > Therefore, none of my sv_nodes think they are beacons. I've been > doing all prior testing on my macbook using localhost: beacon > indicators, so this never came up. > > How do we retreive a hostname of nunki.usc.edu? I think you should be able to use gethostname(). -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Mon Oct 30 22:57:34 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9V6vYVb023919 for ; Mon, 30 Oct 2006 22:57:34 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9V6s4l6004090 for ; Mon, 30 Oct 2006 22:54:04 -0800 Message-Id: <200610310654.k9V6s4l6004090@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: status network map Date: Mon, 30 Oct 2006 22:54:04 -0800 From: william@bourbon.usc.edu Someone wrote: > I had a concern regarding this e-mail. Wouldn't simply using the > port number of a node as its NAM node id yield the possibility of > identical NAM node ids since we could have nodes on different > hosts? Yes. But for the sake of grading, this would suffice since we will not create a network that does not allow us to grade. -- Bill Cheng // bill.cheng@usc.edu ----- Original Message ----- From: william@bourbon.usc.edu Date: Sunday, October 29, 2006 11:21 am Subject: Re: status network map To: cs551@merlot.usc.edu > Someone wrote: > > > I'm using the port number as the node id (apparently NAM > > don't like strings). Is that OK? It'll allow us to see the > > network clearly. > > It's definitely fine. > -- > Bill Cheng // bill.cheng@usc.edu > Return-Path: william@bourbon.usc.edu Delivery-Date: Mon Oct 30 22:16:18 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9V6GIF2021301 for ; Mon, 30 Oct 2006 22:16:18 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9V6CmFW003558 for ; Mon, 30 Oct 2006 22:12:48 -0800 Message-Id: <200610310612.k9V6CmFW003558@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: cs551 notify error code Date: Mon, 30 Oct 2006 22:12:48 -0800 From: william@bourbon.usc.edu Someone wrote: > What should be the Error code of the notify message when autoshutting > down? Should it be same as user shutdown? It should probably be 0. There is no strict interpretation here. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Mon Oct 30 13:54:29 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9ULsThJ021742 for ; Mon, 30 Oct 2006 13:54:29 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9ULp0DV030071 for ; Mon, 30 Oct 2006 13:51:00 -0800 Message-Id: <200610302151.k9ULp0DV030071@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Sigmask Date: Mon, 30 Oct 2006 13:51:00 -0800 From: william@bourbon.usc.edu Someone wrote: > I used the example to check how the operation of sigmask worked. > when i used the way the sigwait was used .. i got an compilation > error that sigwait was getting too many arguments > so i change sigwait func call from: > int sigwait(const sigset_t *set, int *sig); > to > int sigwait(sigset_t *sigset); According to "man sigwait", if you want the 2-argument version, you need to compile with -D_POSIX_PTHREAD_SEMANTICS. > now i have inited the set by calling > sigemptyset( *sigset); > and then > sigfillset(*sigset); > > and i block the signals in main call the thread > in the thread i have a infinite while loop which breaks on errors > and on SIGINT. > when i run the code.. my sigwait always returns -1. i have cross > checked the retunrn with every possible error return, but it is > always -1. > > can you help with this issue According to "man sigwait", you need to check errno ans see if it's EFAULT, EINTR, or EINVAL. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Mon Oct 30 11:25:29 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9UJPTDt012057 for ; Mon, 30 Oct 2006 11:25:29 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9UJM1Tu028396 for ; Mon, 30 Oct 2006 11:22:01 -0800 Message-Id: <200610301922.k9UJM1Tu028396@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Sigmask Date: Mon, 30 Oct 2006 11:22:01 -0800 From: william@bourbon.usc.edu Someone wrote: > I know you have talked about sigmask in class and also in a few emails. > I just wanted to know that is u create a thread after u have done a > sigmask before it, it will not handle those errors. > but wut if u want one of those threads to handle a particular signal? > how would you go about doin that You unblock a specific signal. pthread_sigmask()'s first argument is either SIG_BLOCK or SIG_UNBLOCK, so you can control it. Please see the example when you do "man pthread_sigmask". -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Mon Oct 30 09:54:11 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9UHsBUU006260 for ; Mon, 30 Oct 2006 09:54:11 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9UHohFW027128 for ; Mon, 30 Oct 2006 09:50:43 -0800 Message-Id: <200610301750.k9UHohFW027128@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: cs551: nam assumption Date: Mon, 30 Oct 2006 09:50:43 -0800 From: william@bourbon.usc.edu Someone wrote: > I meant, to map a node to a number (for nam), I'm using the formula > "well_known_port MODULO 100" and assuming it will be different for any > two given nodes. Is this OK to do? That would be fine. -- Bill Cheng // bill.cheng@usc.edu -----Original Message----- From: william@bourbon.usc.edu [mailto:william@bourbon.usc.edu] Sent: Monday, October 30, 2006 9:18 AM To: cs551@merlot.usc.edu Subject: Re: cs551: nam assumption Someone wrote: > For the sake of simplicity in generating nam file, can we assume that > "port%100" will not collide for any two given nodes? The filename is supplied by the user, you must use what the user gave you. Also, the spec says that you should write the file into the *current working directory* if it does not begin with '/'. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Mon Oct 30 09:44:37 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9UHib1M005586 for ; Mon, 30 Oct 2006 09:44:37 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9UHf9Lr026854 for ; Mon, 30 Oct 2006 09:41:09 -0800 Message-Id: <200610301741.k9UHf9Lr026854@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: [CS-551] Reference implementation of sv_node Date: Mon, 30 Oct 2006 09:41:09 -0800 From: william@bourbon.usc.edu Someone wrote: > Is it possible to get reference implementation of sv_node > application, like we did in Warmup1. > It'd be useful to test against it that messages are formatted > correctly, and all the routing algorithms are implemented > according to the spec. I'm sorry but a reference implementation does not exist. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Mon Oct 30 09:21:55 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9UHLtS1003975 for ; Mon, 30 Oct 2006 09:21:55 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9UHIR7K026445 for ; Mon, 30 Oct 2006 09:18:27 -0800 Message-Id: <200610301718.k9UHIR7K026445@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: cs551: nam assumption Date: Mon, 30 Oct 2006 09:18:27 -0800 From: william@bourbon.usc.edu Someone wrote: > For the sake of simplicity in generating nam file, can we assume that > "port%100" will not collide for any two given nodes? The filename is supplied by the user, you must use what the user gave you. Also, the spec says that you should write the file into the *current working directory* if it does not begin with '/'. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Oct 29 22:46:34 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9U6kXgj024127 for ; Sun, 29 Oct 2006 22:46:33 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9U6h7eU016024 for ; Sun, 29 Oct 2006 22:43:07 -0800 Message-Id: <200610300643.k9U6h7eU016024@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: cs551: Error in trace file Date: Sun, 29 Oct 2006 22:43:07 -0800 From: william@bourbon.usc.edu Someone wrote: > I get this error when I try to run my trace file on NAM. > > Cannot connect to existing nam instance. Starting a new one... > Error in parsing tracefile line: > -t * -s 13149 -d 13148 -c blue > > Can you please help me with this. I tried the example file also given > in the project page. That one runs but doesnt show any trace. Again, I'm not familiar with the nam format. The sample "status.out" has no lines that starts with "-t". -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Oct 29 21:59:40 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9U5xevP020966 for ; Sun, 29 Oct 2006 21:59:40 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9U5uDUI015387 for ; Sun, 29 Oct 2006 21:56:13 -0800 Message-Id: <200610300556.k9U5uDUI015387@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: cs551: status response loops in special scenario ? Date: Sun, 29 Oct 2006 21:56:13 -0800 From: william@bourbon.usc.edu Someone wrote: > A originated the STRQ, so it does not cache it (should it be cached?), > so it does not know it's duplicate. If A caches its own message, then > there'll be other problems (only in my design?) The first sentence in the Routing section of the spec says: On messages that require flooding, you must make sure that a message is not sent over the same link more than once. I would have A cache its own message. -- Bill Cheng // bill.cheng@usc.edu -----Original Message----- From: william@bourbon.usc.edu [mailto:william@bourbon.usc.edu] Sent: Sunday, October 29, 2006 9:40 PM To: cs551@merlot.usc.edu Subject: Re: cs551: status response loops in special scenario ? Someone wrote: > Consider 3 nodes A, B and C. Fully connected (triangle topology). Say, > node A sends a STRQ to B and C. in the normal case, the following > happens: > 1. B receives STRQ from A, sends STRS to A, forwards STRQ to C > 2. C receives STRQ from A, sends STRS to A, forwards STRQ to B > 3. B drops forwarded STRQ from C, C drops forwarded STRQ from B > 4. All is fine ! > But, suppose B receives the forwarded STRQ from C before it receives the > original STRQ from A, then it will be forwarded to A and... won't there > be a loop of STRS from A->B->C->A->B->C->A->..... until ttl expires? > > I have the logs of this happening in my implementation! Why doesn't A drop the duplicate STRQ message from B? -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Oct 29 21:43:35 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9U5hZHx019898 for ; Sun, 29 Oct 2006 21:43:35 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9U5e9nd015119 for ; Sun, 29 Oct 2006 21:40:09 -0800 Message-Id: <200610300540.k9U5e9nd015119@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: cs551: status response loops in special scenario ? Date: Sun, 29 Oct 2006 21:40:09 -0800 From: william@bourbon.usc.edu Someone wrote: > Consider 3 nodes A, B and C. Fully connected (triangle topology). Say, > node A sends a STRQ to B and C. in the normal case, the following > happens: > 1. B receives STRQ from A, sends STRS to A, forwards STRQ to C > 2. C receives STRQ from A, sends STRS to A, forwards STRQ to B > 3. B drops forwarded STRQ from C, C drops forwarded STRQ from B > 4. All is fine ! > But, suppose B receives the forwarded STRQ from C before it receives the > original STRQ from A, then it will be forwarded to A and... won't there > be a loop of STRS from A->B->C->A->B->C->A->..... until ttl expires? > > I have the logs of this happening in my implementation! Why doesn't A drop the duplicate STRQ message from B? -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Oct 29 21:40:42 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9U5efAD019757 for ; Sun, 29 Oct 2006 21:40:41 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9U5bFor015068 for ; Sun, 29 Oct 2006 21:37:15 -0800 Message-Id: <200610300537.k9U5bFor015068@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: duplicate links Date: Sun, 29 Oct 2006 21:37:15 -0800 From: william@bourbon.usc.edu Someone wrote: > Are duplicate links allowed in nam exitfile? We are only using the nam file to view *topology*. Looks like duplicate links do not bother nam so they are allowed. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Oct 29 18:57:53 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9U2vrCg009292 for ; Sun, 29 Oct 2006 18:57:53 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9U2sRLZ013437 for ; Sun, 29 Oct 2006 18:54:27 -0800 Message-Id: <200610300254.k9U2sRLZ013437@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: ttl zero Date: Sun, 29 Oct 2006 18:54:27 -0800 From: william@bourbon.usc.edu Someone wrote: > Do we have to consider this case (it is not in the grading > guidelines). I'm relying on the other nodes to respond to the > status request. If it is required, then I can implement it. It's not in the grading guidelines, so we won't test it. Should you implement it? My answer has to be "yes". -- Bill Cheng // bill.cheng@usc.edu ----- Original Message ----- From: william@bourbon.usc.edu Date: Sunday, October 29, 2006 11:20 am Subject: Re: ttl zero To: cs551@merlot.usc.edu > Someone wrote: > > > If TTL from status cmd line is 0, > > Should we put anything in exitfile? > > I think we should put our neighbors' information in file. > > Correct! > -- > Bill Cheng // bill.cheng@usc.edu > Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Oct 29 18:53:33 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9U2rXNK009027 for ; Sun, 29 Oct 2006 18:53:33 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9U2o77k013384 for ; Sun, 29 Oct 2006 18:50:07 -0800 Message-Id: <200610300250.k9U2o77k013384@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Status message Date: Sun, 29 Oct 2006 18:50:07 -0800 From: william@bourbon.usc.edu Someone wrote: > i mean what is goin in the data field for a status request for 0x01. > do we have to just send a list servers associated with active > connections for a node that is responding to the request? Yes. You need to report who your neighbors are. If you have more than 1 neighbor, you should respond in the multiple-record format as shown in the spec. -- Bill Cheng // bill.cheng@usc.edu william@bourbon.usc.edu wrote: > Someone wrote: > > > What exactly is status message sending back to the node that requested it? > > I'm not sure what you are asking... You are suppose to > respond with a "status response message (messagetype=0xab)". > -- > Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Oct 29 18:46:28 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9U2kRZY008614 for ; Sun, 29 Oct 2006 18:46:27 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9U2h10Q013258 for ; Sun, 29 Oct 2006 18:43:01 -0800 Message-Id: <200610300243.k9U2h10Q013258@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: msglifetime Date: Sun, 29 Oct 2006 18:43:01 -0800 From: william@bourbon.usc.edu Someone wrote: > Lets say if the msglife time is 30 secs. The first time we would > check if messages are expired is after 30 seconds from the > initial startup. Then do we check the expiration every timer tick > (say 1 second)? Here's what I would do. The message cache is a data structure that remembers past messages. Each data item has a field call expiration. When you insert an item into this data structure, expiration is set to 30. Every time the 1 section timer expires, it will walk through the message cache and decrememt the expiration field of each item by 1. If it becomes 0, it is removed from the message cache. (I would use a similar mechanism to timeout keepalives and anything that can be timedout in a similar fashion.) You don't *have to* do what I described above. It's just what I would do to make things easier to handle. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Oct 29 18:40:36 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9U2eaS7008226 for ; Sun, 29 Oct 2006 18:40:36 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9U2bAIq013153 for ; Sun, 29 Oct 2006 18:37:10 -0800 Message-Id: <200610300237.k9U2bAIq013153@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Status message Date: Sun, 29 Oct 2006 18:37:10 -0800 From: william@bourbon.usc.edu Someone wrote: > What exactly is status message sending back to the node that requested it? I'm not sure what you are asking... You are suppose to respond with a "status response message (messagetype=0xab)". -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Oct 29 18:29:19 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9U2TJc6007410 for ; Sun, 29 Oct 2006 18:29:19 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9U2Pr4S012983 for ; Sun, 29 Oct 2006 18:25:53 -0800 Message-Id: <200610300225.k9U2Pr4S012983@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Issues linking files Date: Sun, 29 Oct 2006 18:25:53 -0800 From: william@bourbon.usc.edu Someone wrote: > I am having some linking issues with my compilation > i have a file which have the threads that listen and send stuff into and > from the sockets. > i have another file which is creating the threads based on these functions. > > now when i have the function in the same file that i am creating them, > then i works fine. > but when i want to split them up then it cannot generate the threads. > > lets say my function file is func.c which have the socket functions > and my main file which creates the threads are main.c > do i do the following > gcc -c func.c > gcc main.c func.o -lnsl -lsocket > > it compiles on both occasions, but when i run them the threads are not > being created I think you need "-lpthread" when you create the final executable. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Oct 29 18:27:05 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9U2R5b4007272 for ; Sun, 29 Oct 2006 18:27:05 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9U2NdV1012934 for ; Sun, 29 Oct 2006 18:23:39 -0800 Message-Id: <200610300223.k9U2NdV1012934@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: servant log, and exec file Date: Sun, 29 Oct 2006 18:23:39 -0800 From: william@bourbon.usc.edu Someone wrote: > where are the exec file and logging files being stored?are they all in > the Home dir? I don't know what you meant by "exec file". The log file's location is either in the home directory or a specific location if LogFilename starts with a '/'. > if so, if there are multiple ppl starting their projects, > wudn't these files be overwritten? If you leave out LogFilename in all .ini files, then they will all use "servant.log" in the HomeDir and they will all collide. So, you should not do that. If you look at the test data files, all LogFilename has a full path specified. Also, if two files have identical LogFilename, they also have identical port numbers. So, you cannot have two nodes running with the same logfile. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Oct 29 18:14:53 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9U2ErDt006504 for ; Sun, 29 Oct 2006 18:14:53 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9U2BRV7012779 for ; Sun, 29 Oct 2006 18:11:27 -0800 Message-Id: <200610300211.k9U2BRV7012779@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: cs551 logging Date: Sun, 29 Oct 2006 18:11:27 -0800 From: william@bourbon.usc.edu Someone wrote: > "Although a message ID is 20 bytes long, you only need to log the last > 4 bytes in hex string format in the field." > > Does this mean last 4 bytes in the actual UOID i.e. 8 ASCII bytes, > or the last 4 bytes after converting to ASCII i.e. only last 2 bytes > of actual UOID ?? 4 bytes of data (8 ASCII characters). -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Oct 29 11:24:07 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9TJO7kj013008 for ; Sun, 29 Oct 2006 11:24:07 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9TJKgDB009660 for ; Sun, 29 Oct 2006 11:20:42 -0800 Message-Id: <200610291920.k9TJKgDB009660@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: setup error Date: Sun, 29 Oct 2006 11:20:42 -0800 From: william@bourbon.usc.edu Someone wrote: > I'm getting the following error when I run ~csci551b/bin/setupf1 $HOME. > > tar: /home/scf-22/csci551b/public/final1.tar: Permission denied Sorry! It was protect. Please try again. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Oct 29 11:22:23 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9TJMNun012867 for ; Sun, 29 Oct 2006 11:22:23 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9TJIww4009629 for ; Sun, 29 Oct 2006 11:18:58 -0800 Message-Id: <200610291918.k9TJIww4009629@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: status network map Date: Sun, 29 Oct 2006 11:18:58 -0800 From: william@bourbon.usc.edu Someone wrote: > I'm using the port number as the node id (apparently NAM > don't like strings). Is that OK? It'll allow us to see the > network clearly. It's definitely fine. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Oct 29 11:21:25 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9TJLOIS012734 for ; Sun, 29 Oct 2006 11:21:24 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9TJI0kR009604 for ; Sun, 29 Oct 2006 11:18:00 -0800 Message-Id: <200610291918.k9TJI0kR009604@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: ttl zero Date: Sun, 29 Oct 2006 11:18:00 -0800 From: william@bourbon.usc.edu Someone wrote: > If TTL from status cmd line is 0, > Should we put anything in exitfile? > I think we should put our neighbors' information in file. Correct! -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Oct 29 10:55:40 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9TIteH6011043 for ; Sun, 29 Oct 2006 10:55:40 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9TIqFmL009335 for ; Sun, 29 Oct 2006 10:52:15 -0800 Message-Id: <200610291852.k9TIqFmL009335@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: status network map Date: Sun, 29 Oct 2006 10:52:15 -0800 From: william@bourbon.usc.edu Someone wrote: > > The status neighbors requires the last two digits of the well known > > port number to be used as the node ID for the network map. > > I did not find any information related to above in specs. > Can u please give me some more information in constructing network map. I didn't write that! I was just quoting what a student sent. I don't know why he/she said "requires". -- Bill Cheng // bill.cheng@usc.edu ----- Original Message ----- From: To: Sent: Saturday, October 28, 2006 2:10 PM Subject: Re: status network map > Someone wrote: > > > As far as the beacon network is concerned, the beacon networks haven't > > exchanged Hello messages between themselves. Hence, a beacon node may > > not know the "well known" port numbers of all other beacon nodes its > > connected to. > > It is *required* to exchange HELLO message. Otherwise, you > should not consider the connection to be up. > > > The status neighbors requires the last two digits of the well known > > port number to be used as the node ID for the network map (well known > > port number only and not the port number which it does connect from, > > since that would create multiple IDs for the same node ) . (Is there > > an alternative ??). > > > > In such a situation, how does a beacon node respond to Status Request, > > since it does not know the well known port numbers of whom it is > > connected to. > > If it doesn't know who it is connecting to, it's not a valid > connection. It does not need to report on connections like > this. > -- > Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Oct 29 10:53:30 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9TIrUmh010904 for ; Sun, 29 Oct 2006 10:53:30 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9TIo5EY009292 for ; Sun, 29 Oct 2006 10:50:05 -0800 Message-Id: <200610291850.k9TIo5EY009292@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: cs551 logging Date: Sun, 29 Oct 2006 10:50:05 -0800 From: william@bourbon.usc.edu Someone wrote: > If a message is being forwarded, will it be shown in the log as > received and sent also , because forwarding entails receiving and > sending the message as well ? Or do received and sent messages mean > only terminal ended and terminal originated messages ? "Sent" means a message originated from this node. "Received" means all types of reception. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Oct 29 10:38:56 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9TIcu5I009906 for ; Sun, 29 Oct 2006 10:38:56 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9TIZVfZ009079 for ; Sun, 29 Oct 2006 10:35:31 -0800 Message-Id: <200610291835.k9TIZVfZ009079@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: cs551: Test cases Date: Sun, 29 Oct 2006 10:35:31 -0800 From: william@bourbon.usc.edu Someone wrote: > I pasted this step from the testcases after creating all the directories > > cd ~/grading/guidelines > ~csci551b/bin/setupf1 $HOME > > I get an error that no such file or directory exists as soon as I > enter my port number. > What am I missing in here. Looks like the file ~csci551b/public/final1.tar was missing. I have recreated it. Please try again. > Also I am unable to infer the content of the status file > > V -t * -v 1.0a5 > n -t * -s 3 -c red -i black > n -t * -s 4 -c red -i black > l -t * -s 3 -d 4 -c blue > > Could you please throw some light on how to interpret this data. Please see my messages with timestamps "Fri 27 Oct 07:16" and "Mon 16 Oct 10:14". -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Oct 29 10:18:26 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9TIIQU3008636 for ; Sun, 29 Oct 2006 10:18:26 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9TIF1gH008752 for ; Sun, 29 Oct 2006 10:15:01 -0800 Message-Id: <200610291815.k9TIF1gH008752@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: cs551: flooding status req Date: Sun, 29 Oct 2006 10:15:01 -0800 From: william@bourbon.usc.edu Someone wrote: > Should the originator of status request send (STRQ) it to any one > neighbor or all neighbors? It should *flood* (which means to all neighbors). -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Oct 29 10:09:33 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9TI9X3j008000 for ; Sun, 29 Oct 2006 10:09:33 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9TI68Ra008559 for ; Sun, 29 Oct 2006 10:06:08 -0800 Message-Id: <200610291806.k9TI68Ra008559@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: cs551 - Error in NAM Date: Sun, 29 Oct 2006 10:06:08 -0800 From: william@bourbon.usc.edu Someone wrote: > I am getting this error in NAM > > nam: no display name and no $DISPLAY environment variable > Segmentation fault > > I have simply copied the binary in a directory. How do I set this > DISPLAY variable? If you connect to nunki via ssh, it will be set automatically. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sat Oct 28 22:54:34 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9T5sYeD032096 for ; Sat, 28 Oct 2006 22:54:34 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9T5pB4P008562 for ; Sat, 28 Oct 2006 22:51:11 -0700 Message-Id: <200610290551.k9T5pB4P008562@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: cs551 - duplicate message Date: Sat, 28 Oct 2006 22:51:11 -0700 From: william@bourbon.usc.edu Someone wrote: > do duplicate messages need to be logged? Yes. If you have received a message, you should log it. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sat Oct 28 22:52:47 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9T5qlRC031960 for ; Sat, 28 Oct 2006 22:52:47 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9T5nOhx008506 for ; Sat, 28 Oct 2006 22:49:24 -0700 Message-Id: <200610290549.k9T5nOhx008506@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: file missing Date: Sat, 28 Oct 2006 22:49:24 -0700 From: william@bourbon.usc.edu Someone wrote: > I can't find the file r7-n03.ini at csci551b/public/final1/. > Could you please copy the file there? Sorry about the mistake! r7-n02.ini was also missing. I've just added those two files. I also noticed that r7 in the testcases web page is not the same as r7 in the grading guidelines. I've updated the testcases web page. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sat Oct 28 22:39:15 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9T5dFGD030972 for ; Sat, 28 Oct 2006 22:39:15 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9T5Zq51008277 for ; Sat, 28 Oct 2006 22:35:52 -0700 Message-Id: <200610290535.k9T5Zq51008277@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Grading guideline clarification Date: Sat, 28 Oct 2006 22:35:52 -0700 From: william@bourbon.usc.edu Someone wrote: > Section B 2 a > > (wait 10 seconds, at the commandline prompt, type > "status neighbors 1 04.out", look at "04.out"; > this file should have 2 nodes and they are > connected > > The TTL here is 5 and it returned entire toploogy. > > n07<--n04<--n09<--n06 > > Now we have 4 nodes instead of 2. > > Is this the expected behavior? The TTL was 1 in the "status neighbors 1 04.out" command. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sat Oct 28 22:36:47 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9T5alMd030828 for ; Sat, 28 Oct 2006 22:36:47 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9T5XPLg008232 for ; Sat, 28 Oct 2006 22:33:25 -0700 Message-Id: <200610290533.k9T5XPLg008232@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: c8-n06.ini Date: Sat, 28 Oct 2006 22:33:25 -0700 From: william@bourbon.usc.edu Someone wrote: > I can't copy c8-n06.ini file using the command > cp ~csci551b/public/final1/c8-n??.ini . > > Could you please confirm if this file is there in the drive? Ooops! It was missing. I just copied it. I've also updated all the *-n08.ini files. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sat Oct 28 21:47:50 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9T4loim027581 for ; Sat, 28 Oct 2006 21:47:50 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9T4iS2Q007807 for ; Sat, 28 Oct 2006 21:44:28 -0700 Message-Id: <200610290444.k9T4iS2Q007807@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: [CS551] Grading guideline clarification Date: Sat, 28 Oct 2006 21:44:28 -0700 From: william@bourbon.usc.edu Someone wrote: > In secion (B) (c). > > "the JNRS should have distances "24889" and "4775" from nodes *00 and *04)" > "more ~/tmp/final1/n09/init_neighbor_list > (this should contain something like "nunki.usc.edu:18000" and > "nunki.usc.edu:18004") > > Won't this list be reversed as we sorting based on the distance. > > this should contain something like "nunki.usc.edu:18004" and > "nunki.usc.edu:18000") > > Could you please clarfity. The "and" did not imply any order. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sat Oct 28 16:20:12 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9SNKC1J007060 for ; Sat, 28 Oct 2006 16:20:12 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9SNGoCP005254 for ; Sat, 28 Oct 2006 16:16:50 -0700 Message-Id: <200610282316.k9SNGoCP005254@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: KeepAlive Date: Sat, 28 Oct 2006 16:16:50 -0700 From: william@bourbon.usc.edu Someone wrote: > At what interval we should send the keep alive messages? > Is this time should be less than the keepalivetimeout value? For sure! I would use something like 1/2 or 1/3 of the timeout. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sat Oct 28 15:13:49 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9SMDn6L002732 for ; Sat, 28 Oct 2006 15:13:49 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9SMARso004663 for ; Sat, 28 Oct 2006 15:10:27 -0700 Message-Id: <200610282210.k9SMARso004663@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: status network map Date: Sat, 28 Oct 2006 15:10:27 -0700 From: william@bourbon.usc.edu Someone wrote: > As far as the beacon network is concerned, the beacon networks haven't > exchanged Hello messages between themselves. Hence, a beacon node may > not know the "well known" port numbers of all other beacon nodes its > connected to. It is *required* to exchange HELLO message. Otherwise, you should not consider the connection to be up. > The status neighbors requires the last two digits of the well known > port number to be used as the node ID for the network map (well known > port number only and not the port number which it does connect from, > since that would create multiple IDs for the same node ) . (Is there > an alternative ??). > > In such a situation, how does a beacon node respond to Status Request, > since it does not know the well known port numbers of whom it is > connected to. If it doesn't know who it is connecting to, it's not a valid connection. It does not need to report on connections like this. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sat Oct 28 15:11:45 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9SMBi7E002589 for ; Sat, 28 Oct 2006 15:11:45 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9SM8N9m004612 for ; Sat, 28 Oct 2006 15:08:23 -0700 Message-Id: <200610282208.k9SM8N9m004612@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: prompt on commands Date: Sat, 28 Oct 2006 15:08:23 -0700 From: william@bourbon.usc.edu Someone wrote: > When user enters the command status neighbors , do we > start the process of flooding the message and return the prompt > to user? If not, then we tell the user that command is processed > and if the user want to abort press Ctrl+C? In the second case, > the prompt will not be returned to the user until the status > timeout occurs (1.2 * msglifetime) or user presses Ctrl+C. I think it's best to change the prompt to something like: processing statue neighbors command, press Ctrl+C to interrupt> Since it's not in the spec, you should do what seems reasonable to you. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sat Oct 28 14:05:37 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9SL5a4L030827 for ; Sat, 28 Oct 2006 14:05:36 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9SL2Fbb003977 for ; Sat, 28 Oct 2006 14:02:15 -0700 Message-Id: <200610282102.k9SL2Fbb003977@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: BEACON RESTART Date: Sat, 28 Oct 2006 14:02:15 -0700 From: william@bourbon.usc.edu Someone wrote: > A beacon node will never RESTART. > Am i right? I cannot think of an occasion where a beacon node will self-restart. But you should not write too much special code for a beacon node. Operationally, a beacon node is very much like a regular node. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sat Oct 28 14:02:39 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9SL2dT6030681 for ; Sat, 28 Oct 2006 14:02:39 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9SKxIX6003923 for ; Sat, 28 Oct 2006 13:59:18 -0700 Message-Id: <200610282059.k9SKxIX6003923@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Log question Date: Sat, 28 Oct 2006 13:59:18 -0700 From: william@bourbon.usc.edu Someone wrote: > If we have a topology like the following: > > 1 --> 2 --> 3 --> 4 > > If 1 is joining the network (2 is beacon), then what will be > the from log entry when 4 receives a message from 3 (the same > join request from 1) > > Is it going to be nunki.usc.edu_1 or nunki.usc.edu_3? Assuming that 1, 2, 3, and 4 are port numbers, should be nunki.usc.edu_3 and should be "1 nunki.usc.edu". -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sat Oct 28 07:58:53 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9SEwrnf007680 for ; Sat, 28 Oct 2006 07:58:53 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9SEtW5t025369 for ; Sat, 28 Oct 2006 07:55:32 -0700 Message-Id: <200610281455.k9SEtW5t025369@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: [CS-551] Proj1 questions on Check completion Date: Sat, 28 Oct 2006 07:55:32 -0700 From: william@bourbon.usc.edu Someone wrote: > What is the significance of "1.2" in 1.2*MsgLifeTime? Please see my message with timestamp "Mon 16 Oct 09:47". -- Bill Cheng // bill.cheng@usc.edu ----- Original Message ----- From: To: Sent: Thursday, October 26, 2006 12:47 PM Subject: Re: [CS-551] Proj1 questions on Check completion > Someone wrote: > > > When Check message is flooded, what's the timeout on its > > completion (at least one Check Response is received) ? > > Can I use 1.2*MsgLifeTime timeout, similar to the "status neighbors" ? > > Yes. > -- > Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sat Oct 28 00:06:49 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9S76nR6009880 for ; Sat, 28 Oct 2006 00:06:49 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9S73UEA020867 for ; Sat, 28 Oct 2006 00:03:30 -0700 Message-Id: <200610280703.k9S73UEA020867@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: check timeout Date: Sat, 28 Oct 2006 00:03:30 -0700 From: william@bourbon.usc.edu Someone wrote: > I apologize if this has already been answrered! > For how much time a node shd keep waiting for check response and status = > response? Please see my message with timestamp "Thu 26 Oct 12:47". -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Fri Oct 27 23:55:49 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9S6tngu009109 for ; Fri, 27 Oct 2006 23:55:49 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9S6qTwo020637 for ; Fri, 27 Oct 2006 23:52:29 -0700 Message-Id: <200610280652.k9S6qTwo020637@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: mutex question Date: Fri, 27 Oct 2006 23:52:29 -0700 From: william@bourbon.usc.edu Someone wrote: > Do we need to protect shared variables of integer type (such as > int , bool, short etc), using Mutex? Is there assignment is > atomic? If you have 2 threads accessing the same variable and may cause a conflict, then you need a mutex. Whether assignment is atomic or not is not the issue. The only exception I can think of is the case where a boolean variable make a one-way transition (and can never flip back), then you don't need a mutex. For example, if you have a global variable called Shutdown which is initially FALSE and once it's TRUE, it will stay TRUE. Then you don't need a mutex. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Fri Oct 27 22:32:08 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9S5W8ju003974 for ; Fri, 27 Oct 2006 22:32:08 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9S5SmC7019451 for ; Fri, 27 Oct 2006 22:28:48 -0700 Message-Id: <200610280528.k9S5SmC7019451@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: notify ttl Date: Fri, 27 Oct 2006 22:28:48 -0700 From: william@bourbon.usc.edu Someone wrote: > what should be ttl of notify-> 1 or default. One. I've updated the spec to say this. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Fri Oct 27 16:20:33 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9RNKXWB012584 for ; Fri, 27 Oct 2006 16:20:33 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9RNHFqp016323 for ; Fri, 27 Oct 2006 16:17:15 -0700 Message-Id: <200610272317.k9RNHFqp016323@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: cs551: grading guidelines Date: Fri, 27 Oct 2006 16:17:15 -0700 From: william@bourbon.usc.edu Oops! One correction: n08 = 12348 -- Bill Cheng // bill.cheng@usc.edu -----Original Message----- Date: Fri, 27 Oct 2006 15:55:25 -0700 From: william@bourbon.usc.edu To: cs551@merlot.usc.edu Subject: Re: cs551: grading guidelines Hi, I've changed all the Location field of all the startup configuration files so that if I start the nodes in the order mentioned in the grading guidelines, I can get the matching topology. Below are the new locations. n00 = 20130 n01 = 10051 n02 = 50372 n03 = 60403 n04 = 40244 n05 = 80635 n06 = 94106 n07 = 30687 n08 = 50328 n09 = 45019 I've updated the grading guidelines so that the distances match these new locations. If your code is working correctly, there is *no need* to change *anything* in your startup files. But if you really want to make sure that what you are getting matches what's in the grading guidelines, you can change a few files just to make sure. -- Bill Cheng // bill.cheng@usc.edu -----Original Message----- Date: Fri, 27 Oct 2006 14:44:50 -0700 From: william@bourbon.usc.edu To: cs551@merlot.usc.edu Subject: Re: cs551: grading guidelines Hi, As it turned out, STRQ and STRS are "status request" and "status response" message, so they are fine for part (1) of the project. I'm working on updating the grading guideline to have the correct distances. This may change *all* the Location field of all the startup configuration files. But the ones you have are certainly usable. -- Bill Cheng // bill.cheng@usc.edu -----Original Message----- Date: Thu, 26 Oct 2006 23:36:43 -0700 From: william@bourbon.usc.edu To: cs551@merlot.usc.edu Subject: Re: cs551: grading guidelines Someone wrote: > Two quick questions on grading guidelines: > > (for n09, the log file should have things like JNRQ, JNRS , > HLLO, KPAV, NTFY, STRQ, and STRS; there should be > 1 JNRQ and 2 JNRS; there should be 4 HLLOs; the JNRS > should have distances "ebfb342a" and "4aeaeea3" from > nodes *00 and *04) > > 1. For part1, how will the log file have STRQ and STRS or is it ju st > an example? Hmm... These are typos. I will remove them. > 2. Should distance be logged in HEX format? I'm logging it in deci ma l > format to avoid confusion with UOID while reading the log file. Since the spec did not say that they should be in hexstring format, they should be in decimal format. Sorry about the bug in the grading guidelines. I will need to fix them. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Fri Oct 27 15:58:43 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9RMwhk1011087 for ; Fri, 27 Oct 2006 15:58:43 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9RMtPt6015882 for ; Fri, 27 Oct 2006 15:55:25 -0700 Message-Id: <200610272255.k9RMtPt6015882@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: cs551: grading guidelines Date: Fri, 27 Oct 2006 15:55:25 -0700 From: william@bourbon.usc.edu Hi, I've changed all the Location field of all the startup configuration files so that if I start the nodes in the order mentioned in the grading guidelines, I can get the matching topology. Below are the new locations. n00 = 20130 n01 = 10051 n02 = 50372 n03 = 60403 n04 = 40244 n05 = 80635 n06 = 94106 n07 = 30687 n08 = 50328 n09 = 45019 I've updated the grading guidelines so that the distances match these new locations. If your code is working correctly, there is *no need* to change *anything* in your startup files. But if you really want to make sure that what you are getting matches what's in the grading guidelines, you can change a few files just to make sure. -- Bill Cheng // bill.cheng@usc.edu -----Original Message----- Date: Fri, 27 Oct 2006 14:44:50 -0700 From: william@bourbon.usc.edu To: cs551@merlot.usc.edu Subject: Re: cs551: grading guidelines Hi, As it turned out, STRQ and STRS are "status request" and "status response" message, so they are fine for part (1) of the project. I'm working on updating the grading guideline to have the correct distances. This may change *all* the Location field of all the startup configuration files. But the ones you have are certainly usable. -- Bill Cheng // bill.cheng@usc.edu -----Original Message----- Date: Thu, 26 Oct 2006 23:36:43 -0700 From: william@bourbon.usc.edu To: cs551@merlot.usc.edu Subject: Re: cs551: grading guidelines Someone wrote: > Two quick questions on grading guidelines: > > (for n09, the log file should have things like JNRQ, JNRS, > HLLO, KPAV, NTFY, STRQ, and STRS; there should be > 1 JNRQ and 2 JNRS; there should be 4 HLLOs; the JNRS > should have distances "ebfb342a" and "4aeaeea3" from > nodes *00 and *04) > > 1. For part1, how will the log file have STRQ and STRS or is it just > an example? Hmm... These are typos. I will remove them. > 2. Should distance be logged in HEX format? I'm logging it in decima l > format to avoid confusion with UOID while reading the log file. Since the spec did not say that they should be in hexstring format, they should be in decimal format. Sorry about the bug in the grading guidelines. I will need to fix them. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Fri Oct 27 15:27:58 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9RMRwSR008962 for ; Fri, 27 Oct 2006 15:27:58 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9RMOepX015471 for ; Fri, 27 Oct 2006 15:24:40 -0700 Message-Id: <200610272224.k9RMOepX015471@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Node Instance ID Date: Fri, 27 Oct 2006 15:24:40 -0700 From: william@bourbon.usc.edu Someone wrote: > for node inst id u said > " Every time a node is restarted, it is associated with a /node instance > ID/, which is simply the concatenation of its node ID and the time the > node got started (with an underscore character inserted between them)" > > now wut is this 'restarted' time? is this time the node itself got > restarted? Yes. Just call time() when a node starts. It doesn't matter if this is a "soft restart" or a "hard restart". > is then yes, > will this node_inst_id be used by other nodes? let say node A and B. > they both start at some time. does A care about the node_inst _id of B's > and the other way around? In the spec, the only place the node instance ID is used is in GetUOID(). So, another node will not know the start time of this node. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Fri Oct 27 14:48:08 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9RLm8TL006317 for ; Fri, 27 Oct 2006 14:48:08 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9RLio6t014683 for ; Fri, 27 Oct 2006 14:44:50 -0700 Message-Id: <200610272144.k9RLio6t014683@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: cs551: grading guidelines Date: Fri, 27 Oct 2006 14:44:50 -0700 From: william@bourbon.usc.edu Hi, As it turned out, STRQ and STRS are "status request" and "status response" message, so they are fine for part (1) of the project. I'm working on updating the grading guideline to have the correct distances. This may change *all* the Location field of all the startup configuration files. But the ones you have are certainly usable. -- Bill Cheng // bill.cheng@usc.edu -----Original Message----- Date: Thu, 26 Oct 2006 23:36:43 -0700 From: william@bourbon.usc.edu To: cs551@merlot.usc.edu Subject: Re: cs551: grading guidelines Someone wrote: > Two quick questions on grading guidelines: > > (for n09, the log file should have things like JNRQ, JNRS, > HLLO, KPAV, NTFY, STRQ, and STRS; there should be > 1 JNRQ and 2 JNRS; there should be 4 HLLOs; the JNRS > should have distances "ebfb342a" and "4aeaeea3" from > nodes *00 and *04) > > 1. For part1, how will the log file have STRQ and STRS or is it just > an example? Hmm... These are typos. I will remove them. > 2. Should distance be logged in HEX format? I'm logging it in decimal > format to avoid confusion with UOID while reading the log file. Since the spec did not say that they should be in hexstring format, they should be in decimal format. Sorry about the bug in the grading guidelines. I will need to fix them. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Fri Oct 27 13:54:04 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9RKs4bR002735 for ; Fri, 27 Oct 2006 13:54:04 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9RKokR8014155 for ; Fri, 27 Oct 2006 13:50:46 -0700 Message-Id: <200610272050.k9RKokR8014155@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: cs551 uoid Date: Fri, 27 Oct 2006 13:50:46 -0700 From: william@bourbon.usc.edu Someone wrote: > I am sending one keepailve msg to all my neighbors. > So UOID is same for all neighbors. > Is that acceptable? It's not right, but there is no harm if TTL is 1. (This reminds me of AS_PATH Inflation.) -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Fri Oct 27 07:19:42 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9REJgQE010135 for ; Fri, 27 Oct 2006 07:19:42 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9REGPU5009304 for ; Fri, 27 Oct 2006 07:16:25 -0700 Message-Id: <200610271416.k9REGPU5009304@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: cs551: status response Date: Fri, 27 Oct 2006 07:16:25 -0700 From: william@bourbon.usc.edu Someone wrote: > I'm a little confused about how to generate the nam readable file after > getting status responses. Constructing the network topology from a set > of status response messages is as good as running a link-state routing > protocol. But I guess we just need to write it to a file so that nam > will construct the topology for us right? But how do we decide what to > put in this file? If you look at the sample, it's basically just nodes and edges. I'm not sure if node names must be numbers, but let's assume they must be numbers (you should check to make sure). All you have to do is to create a mapping from node ID to numbers. You can keep a sorted list of this mapping. When you get a status response, you go through each item in the message and look at the node IDs and see if you've assigned an ID to it. If you haven't, allocate a new number and add an entry to your list and print out a line that corresponds to a node. Then print out a line that corresponds to a link. All you need is to keep a list of the mapping and you can print out the necessary lines on the fly. You don't have to wait until you get all the status responses to create a map of the network. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Thu Oct 26 23:42:50 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9R6gorP013093 for ; Thu, 26 Oct 2006 23:42:50 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9R6dYYh005089 for ; Thu, 26 Oct 2006 23:39:34 -0700 Message-Id: <200610270639.k9R6dYYh005089@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: cs551: guidelines Date: Thu, 26 Oct 2006 23:39:34 -0700 From: william@bourbon.usc.edu Someone wrote: > What does this guideline mean: > > Failing multithreading : -30 points > Code inspection -- > look for pthread_create() calls > look for accept() calls and see if it does a fork() or > somehow get to a pthread_create() It means that if you don't use pthreads and fork child processes, you will lose 30 points. Your node should be a single process! I've mentioned this at the beginning of the project. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Thu Oct 26 23:39:58 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9R6dwQ1012833 for ; Thu, 26 Oct 2006 23:39:58 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9R6ahvp005033 for ; Thu, 26 Oct 2006 23:36:43 -0700 Message-Id: <200610270636.k9R6ahvp005033@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: cs551: grading guidelines Date: Thu, 26 Oct 2006 23:36:43 -0700 From: william@bourbon.usc.edu Someone wrote: > Two quick questions on grading guidelines: > > (for n09, the log file should have things like JNRQ, JNRS, > HLLO, KPAV, NTFY, STRQ, and STRS; there should be > 1 JNRQ and 2 JNRS; there should be 4 HLLOs; the JNRS > should have distances "ebfb342a" and "4aeaeea3" from > nodes *00 and *04) > > 1. For part1, how will the log file have STRQ and STRS or is it just > an example? Hmm... These are typos. I will remove them. > 2. Should distance be logged in HEX format? I'm logging it in decimal > format to avoid confusion with UOID while reading the log file. Since the spec did not say that they should be in hexstring format, they should be in decimal format. Sorry about the bug in the grading guidelines. I will need to fix them. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Thu Oct 26 23:32:56 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9R6WuUi012446 for ; Thu, 26 Oct 2006 23:32:56 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9R6TeTQ004890 for ; Thu, 26 Oct 2006 23:29:40 -0700 Message-Id: <200610270629.k9R6TeTQ004890@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: logging Date: Thu, 26 Oct 2006 23:29:40 -0700 From: william@bourbon.usc.edu Someone wrote: > Just want to confirm that In Logging JNRQ , > the and belong to the data embedded in the message, > Theu have no relation with sending or receiving host. Correct. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Thu Oct 26 23:31:17 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9R6VHfQ012311 for ; Thu, 26 Oct 2006 23:31:17 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9R6S2ks004851 for ; Thu, 26 Oct 2006 23:28:02 -0700 Message-Id: <200610270628.k9R6S2ks004851@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: MinNeighbors? Date: Thu, 26 Oct 2006 23:28:02 -0700 From: william@bourbon.usc.edu Someone wrote: > I feel that I may be entering a realm of thinking too much... May be! :-) > but here goes: > > Suppose you we have a mesh of three fully-connected beacon nodes > and along come an obnoxious regular node that wishes to connect > the SERVANT network with a MinNeighbors of 5. Should he repeat > the join cycle (join message, wait for join responses until > JoinTimeout, try next beacon as a result of not enough join > responses) for each beacon indefinitely? I'm thinking the node > could do this because enough nodes may join in the meantime. Or > should he give up after he has tried all the beacon nodes once? If InitNeighbors is >= 5, then join should fail and your node should exit. If InitNeighbors is < 5 but MinNeighbors is 5, then it will cycle and never do anything useful. This would be considered as configuration error. You don't really need to detect this condition and should let it cycle. Hopefully the user will notice that this node is not doing anything useful and check the configuration file. (You should display useful messages when your node restarts to keep the user informed.) -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Thu Oct 26 22:57:28 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9R5vRgo010144 for ; Thu, 26 Oct 2006 22:57:28 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9R5sCN6004559 for ; Thu, 26 Oct 2006 22:54:12 -0700 Message-Id: <200610270554.k9R5sCN6004559@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Error in your DES Slides (Pg 12) Date: Thu, 26 Oct 2006 22:54:12 -0700 From: william@bourbon.usc.edu Ooops! Sorry! Wrong class. -- Bill Cheng // bill.cheng@usc.edu -----Original Message----- Date: Thu, 26 Oct 2006 22:26:29 -0700 From: william@bourbon.usc.edu To: cs551@merlot.usc.edu Subject: Re: Error in your DES Slides (Pg 12) Someone wrote: > There is an error in your DES slides on Pg. 12 in the algorithm that you > have mentioned. > > In Step 2 of the algorithm R0 is written to be b57b49 etc which is > wrong. It gives an impression that we have to use the bits from the key > for R0. > Instead it is m57m49 etc... > > 2) (L0,R0) ¬ IP(m1m2...m64), L0=m58m50...m8, R0=b57b49...b7 You are correct. For those who couldn't figure exactly which slide you are referring to... it's slide 33 of lecture 15. It's a minor typo. I'll fix the slide when I get back on campus next week. Thanks for catching it. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Thu Oct 26 22:29:45 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9R5TjxK008135 for ; Thu, 26 Oct 2006 22:29:45 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9R5QTVO004026 for ; Thu, 26 Oct 2006 22:26:29 -0700 Message-Id: <200610270526.k9R5QTVO004026@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Error in your DES Slides (Pg 12) Date: Thu, 26 Oct 2006 22:26:29 -0700 From: william@bourbon.usc.edu Someone wrote: > There is an error in your DES slides on Pg. 12 in the algorithm that you > have mentioned. > > In Step 2 of the algorithm R0 is written to be b57b49 etc which is > wrong. It gives an impression that we have to use the bits from the key > for R0. > Instead it is m57m49 etc... > > 2) (L0,R0) ¬ IP(m1m2...m64), L0=m58m50...m8, R0=b57b49...b7 You are correct. For those who couldn't figure exactly which slide you are referring to... it's slide 33 of lecture 15. It's a minor typo. I'll fix the slide when I get back on campus next week. Thanks for catching it. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Thu Oct 26 22:19:59 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9R5JxNl007438 for ; Thu, 26 Oct 2006 22:19:59 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9R5Ghfs003820 for ; Thu, 26 Oct 2006 22:16:43 -0700 Message-Id: <200610270516.k9R5Ghfs003820@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: CS551 - status cmd Date: Thu, 26 Oct 2006 22:16:43 -0700 From: william@bourbon.usc.edu Someone wrote: > Can we assume that the status neighbor, status files and shutdown > commands are "well formed" (no redundant spaces, capitalization) ? No. You need to parse user input. You can use strtok() to skip white spaces if you don't have a better way. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Thu Oct 26 13:26:01 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9QKQ1Te005797 for ; Thu, 26 Oct 2006 13:26:01 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9QKMlEt029928 for ; Thu, 26 Oct 2006 13:22:47 -0700 Message-Id: <200610262022.k9QKMlEt029928@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: keepalive Date: Thu, 26 Oct 2006 13:22:47 -0700 From: william@bourbon.usc.edu Someone wrote: > from previous mail > * > > Yes. If the keepalive timer expired on the other side, it > > should close the connection as if the socket is closed by > > this side. > > > * > > 1.On keepalivetimeout, Do we need to send msg to other side that i m > closing the connection? Yes. You need to send a notify message whenever you are about to close a connection. > And if yes, will the other side(if non-bcn) flood check msg on detecting > that connection has been closed? Yes, it should. > 2. When should a node flood check messsage, only on receiving of > notify msg, > OR whenever it detects that a connection is closed. Since the other side promises not to send anything to you or forward anything to you, either way is fine. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Thu Oct 26 13:00:48 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9QK0mOo004096 for ; Thu, 26 Oct 2006 13:00:48 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9QJvY47029499 for ; Thu, 26 Oct 2006 12:57:34 -0700 Message-Id: <200610261957.k9QJvY47029499@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: cs551: simultaneous connections Date: Thu, 26 Oct 2006 12:57:34 -0700 From: william@bourbon.usc.edu Someone wrote: > Actually, in my implementation, this event is not so unusual, in the > sense that, it happens every time, because I do not check if node B is > already A's neighbor before trying to connect to B. One thread simply > goes thro the list of beacons and tries to connect to all of them. If > some of them are "already" my neighbors, then the implementation WILL > take care of NOT creating another connection. However, these extra > hellos will be exchanged over the new connection which would have been > created if B was not already A's neighbor. So, is it OK to have these > extra hellos, or should I tweak my code not to attempt a connection to > an existing neighbor. Since this does not break the spec, it's fine (since the other side should expect this to happen sometimes). Just need to make sure that you don't send anything after HELLO if it suppose to be the connection that must be removed. -- Bill Cheng // bill.cheng@usc.edu -----Original Message----- From: william@bourbon.usc.edu [mailto:william@bourbon.usc.edu] Sent: Thursday, October 26, 2006 9:36 AM To: cs551@merlot.usc.edu Subject: Re: cs551: simultaneous connections Someone wrote: > Suppose node A and B (both beacons) come up at the same time and try to > connect to each other, how many Hello's should be exchanged between them > *in all* ? In my implementation, four (two for each connection attempt) > are exchanged, although ultimately only one connection is retained > between them in the end. Is this OK? I think it's fine for this unusual event. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Thu Oct 26 12:51:07 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9QJp7sg003281 for ; Thu, 26 Oct 2006 12:51:07 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9QJlqou029288 for ; Thu, 26 Oct 2006 12:47:53 -0700 Message-Id: <200610261947.k9QJlqou029288@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: [CS-551] Proj1 questions on Check completion Date: Thu, 26 Oct 2006 12:47:52 -0700 From: william@bourbon.usc.edu Someone wrote: > When Check message is flooded, what's the timeout on its > completion (at least one Check Response is received) ? > Can I use 1.2*MsgLifeTime timeout, similar to the "status neighbors" ? Yes. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Thu Oct 26 09:40:43 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9QGeh4E023477 for ; Thu, 26 Oct 2006 09:40:43 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9QGbTxM026423 for ; Thu, 26 Oct 2006 09:37:29 -0700 Message-Id: <200610261637.k9QGbTxM026423@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: logging Date: Thu, 26 Oct 2006 09:37:29 -0700 From: william@bourbon.usc.edu Someone wrote: > I have a question on the logging. > Since we are going to log all the messages. > when a neighbor connects, we need to send a hello message to them. > since we have no prior info about that neighbor, how do we generate the > node_id for that neighbor, so that we can log our hello message to them? This first message from the neighbor must be a hello message and the node ID is in the hello message. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Thu Oct 26 09:38:59 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9QGcxrW023336 for ; Thu, 26 Oct 2006 09:38:59 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9QGZjKB026374 for ; Thu, 26 Oct 2006 09:35:45 -0700 Message-Id: <200610261635.k9QGZjKB026374@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: cs551: simultaneous connections Date: Thu, 26 Oct 2006 09:35:45 -0700 From: william@bourbon.usc.edu Someone wrote: > Suppose node A and B (both beacons) come up at the same time and try to > connect to each other, how many Hello's should be exchanged between them > *in all* ? In my implementation, four (two for each connection attempt) > are exchanged, although ultimately only one connection is retained > between them in the end. Is this OK? I think it's fine for this unusual event. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Thu Oct 26 09:37:22 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9QGbM4p023200 for ; Thu, 26 Oct 2006 09:37:22 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9QGY9oa026327 for ; Thu, 26 Oct 2006 09:34:09 -0700 Message-Id: <200610261634.k9QGY9oa026327@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: cs551 beacon down Date: Thu, 26 Oct 2006 09:34:09 -0700 From: william@bourbon.usc.edu Someone wrote: > While a regular node is joining the NW, it randomly selects a bcn > node say B1, send it join request, > got some join responses but still waiting for join time out, in > the mean time, B1 goes down, > What should regular node do? It should do something reasonable. For example, since this node will not receive any more join responses, it should probably treat this as if join timeout has expired. Please remember that, in general, a spec does not spell out all possible state transitions, so, you need to do something reasonable if an unusual condition occurs. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Wed Oct 25 23:01:21 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9Q61K1R014975 for ; Wed, 25 Oct 2006 23:01:21 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9Q5w8Ll020668 for ; Wed, 25 Oct 2006 22:58:08 -0700 Message-Id: <200610260558.k9Q5w8Ll020668@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: cs551 neighbour not up Date: Wed, 25 Oct 2006 22:58:08 -0700 From: william@bourbon.usc.edu Someone wrote: > I think "If the number of neighbors that it can > connect to is less than *MinNeigbors* in the startup > configuration file, it should delete the init_neighbor_list > file and restart." Oops! You are absolutely correct. InitNeighbors in the startup configuration file is for join. Sorry about the mistake. -- Bill Cheng // bill.cheng@usc.edu ----- Original Message ----- From: To: Sent: Wednesday, October 25, 2006 10:41 PM Subject: Re: cs551 neighbour not up > Someone wrote: > > > While a regular node is participating in the network, it finds > > that one of the nodes mentioned in init_neigbor_list is not up, > > what should it do. exit or retry. > > Neither! When this regular node comes up, it should try to > connect to everyone in its init_neighbor_list just once. > If a node in its init_neighbor_list is not up at the time, > it will not retry. If the number of neighbors that it can > connect to is less than InitNeighbors in the startup > configuration file, it should delete the init_neighbor_list > file and restart. > -- > Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Wed Oct 25 22:44:29 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9Q5iTQY013948 for ; Wed, 25 Oct 2006 22:44:29 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9Q5fHhs020441 for ; Wed, 25 Oct 2006 22:41:17 -0700 Message-Id: <200610260541.k9Q5fHhs020441@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: cs551 neighbour not up Date: Wed, 25 Oct 2006 22:41:17 -0700 From: william@bourbon.usc.edu Someone wrote: > While a regular node is participating in the network, it finds > that one of the nodes mentioned in init_neigbor_list is not up, > what should it do. exit or retry. Neither! When this regular node comes up, it should try to connect to everyone in its init_neighbor_list just once. If a node in its init_neighbor_list is not up at the time, it will not retry. If the number of neighbors that it can connect to is less than InitNeighbors in the startup configuration file, it should delete the init_neighbor_list file and restart. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Wed Oct 25 20:29:31 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9Q3TVit005347 for ; Wed, 25 Oct 2006 20:29:31 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9Q3QJnD019039 for ; Wed, 25 Oct 2006 20:26:19 -0700 Message-Id: <200610260326.k9Q3QJnD019039@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: cs551: timeouts Date: Wed, 25 Oct 2006 20:26:19 -0700 From: william@bourbon.usc.edu Someone wrote: > Is it acceptable to do select for a small time (100ms) and then check if > any timer has expired (KPALV, jointimeout, etc), if not, doing a select > again? > Or will it be considered as busy wait with 100ms breaks :) The keyword for "busy wait" is *busy*, and busy means eating up CPU time. If you give up the CPU for 100ms when you call select(), then you are not busy. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Wed Oct 25 07:27:38 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9PERcIv019907 for ; Wed, 25 Oct 2006 07:27:38 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9PEOTqQ012097 for ; Wed, 25 Oct 2006 07:24:29 -0700 Message-Id: <200610251424.k9PEOTqQ012097@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: final project commitment forms Date: Wed, 25 Oct 2006 07:24:29 -0700 From: william@bourbon.usc.edu Someone wrote: > What is a convenient way of getting the final project commitment forms to > you? Is there a fax number that you can receive them at? Or is hand > delivery the only option? Mailing address.? :-P If you are on campus and near SAL, you can put it in my mailbox in SAL 349 and send me an e-mail to let me know that I should go check my mailbox (I don't often go there). Fax'ing would be fine also. Please fax it to the CS department at (213) 740-7285. Please put the following information on the cover page: Attn: William Cheng Room SAL 228 Dept of Computer Science, USC 941 West 37th Place Los Angeles, CA 90089 Please also send me an e-mail after you have fax'ed it so I can make sure to check. Thanks! -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Wed Oct 25 07:18:40 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9PEIehc019391 for ; Wed, 25 Oct 2006 07:18:40 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9PEFV6d011970 for ; Wed, 25 Oct 2006 07:15:31 -0700 Message-Id: <200610251415.k9PEFV6d011970@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Status Question Date: Wed, 25 Oct 2006 07:15:31 -0700 From: william@bourbon.usc.edu Someone wrote: > When we respond to the status request, do we have to send the > current active neighbor list (list of neighbors we currently have > active connection) or information from the file (ini file and > init_neighborlist file)? Only the currently active neighbors. (The status command should give you the current topology of the SERVANT network when you view the output file in nam.) -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Tue Oct 24 15:58:32 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9OMwWNs025435; Tue, 24 Oct 2006 15:58:32 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9OMtPxr031899; Tue, 24 Oct 2006 15:55:25 -0700 Received: (from william@localhost) by bourbon.usc.edu (8.13.5/8.13.5/Submit) id k9OMtOcU031898; Tue, 24 Oct 2006 15:55:24 -0700 Date: Tue, 24 Oct 2006 15:55:24 -0700 From: william@bourbon.usc.edu Message-Id: <200610242255.k9OMtOcU031898@bourbon.usc.edu> To: cs551@merlot.usc.edu, csac@merlot.usc.edu Subject: midterm grading schedule... Hi, I usually wait for all the midterm exams to arrive from DEN before I start grading, and it usually take them 48 hours to arrive. So, most likely, I won't start grading until this weekend. I should be able to finish grading around Wednesday next week. I will send your midterm scores to you via individual e-mails. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Mon Oct 23 23:58:13 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9O6wCif028709 for ; Mon, 23 Oct 2006 23:58:13 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9O6t7Q9021659 for ; Mon, 23 Oct 2006 23:55:08 -0700 Message-Id: <200610240655.k9O6t7Q9021659@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: BGP update Date: Mon, 23 Oct 2006 23:55:07 -0700 From: william@bourbon.usc.edu Someone wrote: > Looking at the BGP messages in the slide, which message provides the > ability for an AS to learn new paths. Update. > In the situation of when a AS just comes up, where the RIB are not built > as yet or are in transit state BGP uses Distance Vector. It tells its neighbors what it knows about everyone else. Initially, it knows about its neighbors. Please see the Distance Vector slides on how things get started. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Mon Oct 23 22:58:07 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9O5w7D8024825 for ; Mon, 23 Oct 2006 22:58:07 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9O5t297020601 for ; Mon, 23 Oct 2006 22:55:02 -0700 Message-Id: <200610240555.k9O5t297020601@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: slow start and congestion avoidance Date: Mon, 23 Oct 2006 22:55:02 -0700 From: william@bourbon.usc.edu Someone worte: > i have a question in the combination od SS and CA. > in SS we increase the cwnd by 1 for ever ack and reduce it to 1 on a > packet loss. > in CA we increase the cwnd by 1/cwnd until a packet loss. on a loss it > cuts the value by half and proceeds to increase by 1/cwnd. (is this slow > start or a variant ?) In congestion avoidance, when it gets a packet loss, it sets *ssthresh* to half the value of cwnd. > on in the implementation of TCP is SS and CA both used? Since TCP Tahoe, TCP includes slow start, congestion avoidance, and fast retransmit. > and if so when does TCP shift from SS to CA and back? If TCP in slow start, when cwnd reaches ssthresh, it switch to congestion avoidance. > and wut or who sets thats point? The sender. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Mon Oct 23 13:17:56 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9NKHuGG019956 for ; Mon, 23 Oct 2006 13:17:56 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9NKEqJb015634 for ; Mon, 23 Oct 2006 13:14:52 -0700 Message-Id: <200610232014.k9NKEqJb015634@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: TCP Reno and New Reno Date: Mon, 23 Oct 2006 13:14:52 -0700 From: william@bourbon.usc.edu Someone wrote: > Slide 23 says "Reno suffers timeouts with more than 2 lossed per > window. New Reno avoids that". > > My understanding is that difference between Reno and New Reno is > that New Reno try to push aggressively in case of multiple packet > losses. > > For example you sent 4 packets (1 2 3 4) and 3 and 4 is lost. > Next you send 8 packets and you got 8 dup acks. Reno will set the > cwnd to 4 + 8 = 12 and send 3 again. Now also, it can send upto > 12 new pakets more in the timeframe. Once it receives new ack > (here for 3) the cwnd reduced to 4. In case of New Reno the cwnd > again increased. My quesiton is how New Reno avoids the timeout > and why there is a timeout for Reno? > > Could you please explain? For Reno, I think there is a limitation on the number of retransmissions per RTT built into the Reno algorithm. So, if there are two packets dropped in a window-full of packets, one is fixed with fast retransmit and one is fixed with fast recovery. If there are more losses, Reno cannot recover all and will go into a timeout. With New Reno, we did not spent too much time on it. You should read the paper for details. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Mon Oct 23 09:49:11 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9NGnB49006421 for ; Mon, 23 Oct 2006 09:49:11 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9NGk8jN010215 for ; Mon, 23 Oct 2006 09:46:08 -0700 Message-Id: <200610231646.k9NGk8jN010215@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: AS_PATH inflation Date: Mon, 23 Oct 2006 09:46:08 -0700 From: william@bourbon.usc.edu Someone wrote: > T/he slide has the floowing "AS_PATH inflation affects only your > prefixes". Does that mean the path need to be originated from the > AS to do inflation? Yes. > Can the AS perform AS_PATH inflation if it is > readvertising it to other AS? That would be considered a bad practice! -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Oct 22 23:08:36 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9N68aHx030045 for ; Sun, 22 Oct 2006 23:08:36 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9N65ZEE003071 for ; Sun, 22 Oct 2006 23:05:35 -0700 Message-Id: <200610230605.k9N65ZEE003071@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Fair queue question Date: Sun, 22 Oct 2006 23:05:35 -0700 From: william@bourbon.usc.edu Someone wrote: > i have a question on the slide 28 of lecture 16. > it says that FX1 = FZ1 = 2 > and AY2 = 1.5 but the FY2 = 2.5, why is that > if we look at the rr equation it says F(i) = max( f(i-1), A(i) ) + P(i). > over here the f(i-1) is 2 and (a(i) is 1.5, shudnt we consider 2, rather > than 1.5 in f(i) for F(y2) F(i-1) is the finish time of the previous packet *in the same queue*. So, if F(i) is F_Y2, what's F(i-1)? Y2 is the first packet in queue Y, therefore, there is no F(i-1) (or F(i-1) is negative infinity). Therefore, max(F(i-1),A(i)) is simply A(i)=A_Y2 in this case. -- Bill Cheng // bill.cheng@usc.edu william@bourbon.usc.edu wrote: > Someone wrote: > > > I've a question regarding the fairing queue example (pg 30). > > > > 1. At real time 3.5 and logical time 2, X1 and Z1 goes out (see > > my calculation below). Then how did we get arrival time of Z4 to > > be 2.24? Could you please explain. Also, could you please explain > > how to handle the departure time (and its effect on the slope? > > It's not 2.24, it should be 2.25, I think. At real time 3.5 > and logical time 2, X1 and Z1 depart and Y2 and X3 are still > in the system. So, the slope is 1/2. The next arrival event > is at real time 4.0, so change in vertical axis is > (4.0-3.5)/2=0.25. Therefore, real time 4.0 maps to logical > time 2.25. > > I'm not sure what you meant by handling the departure time. > -- > Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Oct 22 20:05:51 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9N35pWa018318 for ; Sun, 22 Oct 2006 20:05:51 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9N32p5a001247 for ; Sun, 22 Oct 2006 20:02:51 -0700 Message-Id: <200610230302.k9N32p5a001247@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: [CS 551] Date: Sun, 22 Oct 2006 20:02:51 -0700 From: william@bourbon.usc.edu Someone wrote: > Say we have two sv_nodes, A and B. > > A receives a shutdown command, so it sends a Notify to B. > > Does A then wait (with a timeout), for a Notify response from B, or > does A shutdown immediately after transmitting all outstanding > Notifies to it's neighbors? > > Is the notify a two-way handshake for shutdown? No. Once A sends a notify, A can close the socket (and do a unilateral close, which TCP allows). Once all the sockets are closed, A can terminate. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Oct 22 20:03:51 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9N33p4N018181 for ; Sun, 22 Oct 2006 20:03:51 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9N30pMi001197 for ; Sun, 22 Oct 2006 20:00:51 -0700 Message-Id: <200610230300.k9N30pMi001197@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: cs551: join response Date: Sun, 22 Oct 2006 20:00:51 -0700 From: william@bourbon.usc.edu Someone wrote: > When a regular node tries to join the network, when should it stop > receiving join response messages? Please use JoinTimeout. Just a reminder that midterm exam is 28% of your total grade. Please don't forget to study! What I don't want to see is that at the end of the semester, someone comes to me and said that he/she did so well with the project and should get a better grade. I strickly use the percentages to calculate your final letter grade and I cannot take anything else into considerations. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Oct 22 19:59:42 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9N2xgvo017909 for ; Sun, 22 Oct 2006 19:59:42 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9N2ufQv001137 for ; Sun, 22 Oct 2006 19:56:41 -0700 Message-Id: <200610230256.k9N2ufQv001137@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Fairness Index question Date: Sun, 22 Oct 2006 19:56:41 -0700 From: william@bourbon.usc.edu Someone wrote: > If we have 3 flows and throughout of flows are 1 2 and 2 > respectively, then what is the fairness Index? Is it k/n (3/2) or > we need to use the summation equation? You must use the summation equation because it's the definition of the "fairness index". So, it's ((1+2+2)^2) / (3*(1+4+4)). > Does this mean, flow 1 > will not receive no allocations? I think I'm bit confused about > this topic. Please advice. It just gives and index *after* you've done the allocation. The closer it's to one, it's "more fair", according to this "fairness index". It's like an economic index... it's an indication of something. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Oct 22 19:55:01 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9N2t1g9017645 for ; Sun, 22 Oct 2006 19:55:01 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9N2q0ZH001081 for ; Sun, 22 Oct 2006 19:52:00 -0700 Message-Id: <200610230252.k9N2q0ZH001081@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Route flapping Date: Sun, 22 Oct 2006 19:52:00 -0700 From: william@bourbon.usc.edu Someone wrote: > The slide says "When the penalty reaches a threshold > suppress the route, but never forget the route"? What is the > reason for not forgetting the route? What happens if the > router forgets the route? Well, we didn't spend too much time on route flap dampening... If you look a little above it, it says, "associate a penalty with *each* route". So, for each route (not router), it keeps the route and a penalty value. If it forgets a route, it cannot remember the penalty value. -- Bill Cheng // bill.cheng@usc.edu ----- Original Message ----- From: william@bourbon.usc.edu Date: Sunday, October 22, 2006 12:05 am Subject: Re: Route flapping To: cs551@merlot.usc.edu > Someone wrote: > > > 1. When a router start flapping the penalty is below the forward > > threshold, do we send and accept routes from the flapping router? > > Yes. > > > 2. When the penalty is above the forward threshold, do we remove > > the paths from the routing tables? If not, then do we forward > > path information to the flapping router? > > Yes. You consider the flapping router down, even though it's > going up and down. > -- > Bill Cheng // bill.cheng@usc.edu > Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Oct 22 00:06:19 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9M76IYY013372 for ; Sun, 22 Oct 2006 00:06:18 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9M73Lhe030208 for ; Sun, 22 Oct 2006 00:03:21 -0700 Message-Id: <200610220703.k9M73Lhe030208@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Route flapping Date: Sun, 22 Oct 2006 00:03:21 -0700 From: william@bourbon.usc.edu Someone wrote: > 1. When a router start flapping the penalty is below the forward > threshold, do we send and accept routes from the flapping router? Yes. > 2. When the penalty is above the forward threshold, do we remove > the paths from the routing tables? If not, then do we forward > path information to the flapping router? Yes. You consider the flapping router down, even though it's going up and down. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Oct 22 00:02:33 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9M72XSi013113 for ; Sun, 22 Oct 2006 00:02:33 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9M6xZtK030126 for ; Sat, 21 Oct 2006 23:59:36 -0700 Message-Id: <200610220659.k9M6xZtK030126@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Fair queue question Date: Sat, 21 Oct 2006 23:59:35 -0700 From: william@bourbon.usc.edu Someone wrote: > I've a question regarding the fairing queue example (pg 30). > > 1. At real time 3.5 and logical time 2, X1 and Z1 goes out (see > my calculation below). Then how did we get arrival time of Z4 to > be 2.24? Could you please explain. Also, could you please explain > how to handle the departure time (and its effect on the slope? It's not 2.24, it should be 2.25, I think. At real time 3.5 and logical time 2, X1 and Z1 depart and Y2 and X3 are still in the system. So, the slope is 1/2. The next arrival event is at real time 4.0, so change in vertical axis is (4.0-3.5)/2=0.25. Therefore, real time 4.0 maps to logical time 2.25. I'm not sure what you meant by handling the departure time. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sat Oct 21 23:54:46 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9M6skvP012598 for ; Sat, 21 Oct 2006 23:54:46 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9M6pmSV030014 for ; Sat, 21 Oct 2006 23:51:48 -0700 Message-Id: <200610220651.k9M6pmSV030014@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: mid term Date: Sat, 21 Oct 2006 23:51:48 -0700 From: william@bourbon.usc.edu Someone wrote: > I wanted to know if we need to know the details of the BGP packets The exact format is not important. But in general, you should know what's in each type of messages. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Fri Oct 20 06:11:04 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9KDB4xk015682 for ; Fri, 20 Oct 2006 06:11:04 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9KD8CZk009849 for ; Fri, 20 Oct 2006 06:08:12 -0700 Message-Id: <200610201308.k9KD8CZk009849@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: cs551: waited fair queueing Date: Fri, 20 Oct 2006 06:08:12 -0700 From: william@bourbon.usc.edu Someone wrote: > Can you please post another problem for WFQ (for practice), without > detailed solution but only the final order in which the packets depart > and the finish times? Once you understood the posted solution, you should be able to create as many of these as you'd like and know how to calculate the start time and finish times! The final order doesn't give much information and not so interesting here. The most important things are the finish times. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Fri Oct 20 06:05:54 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9KD5s4e015297 for ; Fri, 20 Oct 2006 06:05:54 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9KD32mt009720 for ; Fri, 20 Oct 2006 06:03:02 -0700 Message-Id: <200610201303.k9KD32mt009720@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Memory/CPU Usage Date: Fri, 20 Oct 2006 06:03:02 -0700 From: william@bourbon.usc.edu Someone wrote: > What kind of memory usage and/or CPU usage would you expect > to see associated with a (single) node process? Hmmm... I've never really thought about this. I cannot imagine there is too much memory usage. If you are using C++ and STL, then it's probably hard to predict what it would drag in. But I cann't imagine it would be too much memory. As far as CPU usage... If you are not doing anything with your nodes (just doing keepalive), you should be using hardly any CPU time. Anything more than that means that you are probably doing a busy-wait somewhere. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Thu Oct 19 13:02:39 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9JK2dxR014476 for ; Thu, 19 Oct 2006 13:02:39 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9JJxpsZ028031 for ; Thu, 19 Oct 2006 12:59:51 -0700 Received: (from william@localhost) by bourbon.usc.edu (8.13.5/8.13.5/Submit) id k9JJxoeg028030 for cs551@merlot; Thu, 19 Oct 2006 12:59:50 -0700 Date: Thu, 19 Oct 2006 12:59:50 -0700 From: william@bourbon.usc.edu Message-Id: <200610191959.k9JJxoeg028030@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: error in today's lecture... Hi, I just realized that I've made a mistake during the last few minutes of the lecture. In the last slide, the title of it was "Inserting Data" and I was actually talking about "Searching Data", which is the next slide. As you can see in the next slide, searching is basically the same as inserting, so not much of what I said was wrong, just that I was talking about the wrong slide. Sorry about the mixup. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Wed Oct 18 09:58:01 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9IGw1sw007503 for ; Wed, 18 Oct 2006 09:58:01 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9IGtHW6011108 for ; Wed, 18 Oct 2006 09:55:17 -0700 Message-Id: <200610181655.k9IGtHW6011108@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Logging question Date: Wed, 18 Oct 2006 09:55:17 -0700 From: william@bourbon.usc.edu Someone wrote: > If we get a Hello message from some node, what nodeid should we > print to the log file. Say, the temporary port is 10005 and the > well-known port is 12345. When we receive hello, we also have to > break the ties (if any). Is it ok, if we log it as > _? You should *always* use the well-known port number because it identifies the neighbor node. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Wed Oct 18 07:15:47 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9IEFlqX029497 for ; Wed, 18 Oct 2006 07:15:47 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9IED2sd009356 for ; Wed, 18 Oct 2006 07:13:02 -0700 Received: (from william@localhost) by bourbon.usc.edu (8.13.5/8.13.5/Submit) id k9IED2bt009355 for cs551@merlot; Wed, 18 Oct 2006 07:13:02 -0700 Date: Wed, 18 Oct 2006 07:13:02 -0700 From: william@bourbon.usc.edu Message-Id: <200610181413.k9IED2bt009355@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: final project part (1) extension... Hi, I have not received a single "no" vote regarding the project extension. So, there will be an extension. Let's have a 4-day extension. So, project part (1) will due on Thursday, 11/2/2006. I have also moved the part (2) due date to Tuesday, 11/28/2006. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Tue Oct 17 22:44:19 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9I5iI3F029111 for ; Tue, 17 Oct 2006 22:44:18 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9I5fZSU004571 for ; Tue, 17 Oct 2006 22:41:35 -0700 Received: (from william@localhost) by bourbon.usc.edu (8.13.5/8.13.5/Submit) id k9I5fZ1A004570 for cs551@merlot; Tue, 17 Oct 2006 22:41:35 -0700 Date: Tue, 17 Oct 2006 22:41:35 -0700 From: william@bourbon.usc.edu Message-Id: <200610180541.k9I5fZ1A004570@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: weighted fair queueing example available Hi, I've put a sample weighted fair queueing problem and corresponding solution on the web at: http://merlot.usc.edu/cs551-f06/homeworks/hw2.html Please see problem 3 for the sample problem and its solution. There will be a somewhat similar problem on the midterm! -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Tue Oct 17 22:27:34 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9I5RXhg027843 for ; Tue, 17 Oct 2006 22:27:34 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9I5Oo2k004455 for ; Tue, 17 Oct 2006 22:24:50 -0700 Received: (from william@localhost) by bourbon.usc.edu (8.13.5/8.13.5/Submit) id k9I5Ooex004454 for cs551@merlot; Tue, 17 Oct 2006 22:24:50 -0700 Date: Tue, 17 Oct 2006 22:24:50 -0700 From: william@bourbon.usc.edu Message-Id: <200610180524.k9I5Ooex004454@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: midterm coverage... Hi, I've mentioned in class today that the midterm exam will cover everything from the beginning of the semester to the end of fair queueing. I will not ask anything about ns and nam. And you will only be responsible for part of [Ramakrishnan90a] which was covered under TCP congestion control (fairness and efficiency) and not under queue management (DEC-bit). I've updated the main class web page with a list of topics (not all topics covered are listed). Please see the web page for details. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Tue Oct 17 16:22:50 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9HNMolj004121 for ; Tue, 17 Oct 2006 16:22:50 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9HNK8nO032299 for ; Tue, 17 Oct 2006 16:20:08 -0700 Message-Id: <200610172320.k9HNK8nO032299@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: [CS 551] Date: Tue, 17 Oct 2006 16:20:08 -0700 From: william@bourbon.usc.edu Someone wrote: > When a beacon node first comes up, we are to persistently attempt to > connect to the other beacons listed in the [beacons] section of the > ini file. > > What about when a beacon's neighbor beacon goes down (or sends a > notify message). Are we to attempt re-connect, or is recovery of the > beacon mesh not necessary? You should attempt re-connect. The beacon nodes must form a full mesh. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Mon Oct 16 14:18:20 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9GLIKfd030269 for ; Mon, 16 Oct 2006 14:18:20 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9GLFgaU015214 for ; Mon, 16 Oct 2006 14:15:42 -0700 Message-Id: <200610162115.k9GLFgaU015214@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Notify question Date: Mon, 16 Oct 2006 14:15:42 -0700 From: william@bourbon.usc.edu Someone wrote: > Also, just to confirm: the join nodes will not send hello right? > They'll just send JOIN message, wait for responses and shut down. Yes. They have a "special" connection since they are not participating in the network at this time. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Mon Oct 16 14:09:07 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9GL97Gg029603 for ; Mon, 16 Oct 2006 14:09:07 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9GL6Tpd015068 for ; Mon, 16 Oct 2006 14:06:29 -0700 Message-Id: <200610162106.k9GL6Tpd015068@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Notify question Date: Mon, 16 Oct 2006 14:06:29 -0700 From: william@bourbon.usc.edu Someone wrote: > Under what circumstances a node should send notify? For example, > we are doing an autoshutdown and do we need to > send notify to all neighbors before we shutdown? The spec says: The notify message is used by a node to inform its neighbor that it is about to close the connection. So, any time you are about to disconnect. This only applies to links that you have sent HELLO. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Mon Oct 16 12:29:14 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9GJTEaU023254 for ; Mon, 16 Oct 2006 12:29:14 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9GJQagb013028 for ; Mon, 16 Oct 2006 12:26:36 -0700 Message-Id: <200610161926.k9GJQagb013028@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Autoshutdown stdin block Date: Mon, 16 Oct 2006 12:26:36 -0700 From: william@bourbon.usc.edu Someone wrote: > The command prompt thread which recevies the stdin input is blocking > the exit() call in my AutoShutdown thread. > > The exit() is executed only after there is a return at the > cin.getline() statement i.e. at the command prompt. I have tried > fgets() and its the same problem > > Is there any way around this? Please see my messages with timestamp "Wed 11 Oct 13:01" and "Wed 27 Sep 15:34". -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Mon Oct 16 11:31:34 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9GIV4Go019600 for ; Mon, 16 Oct 2006 11:31:34 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9GIRfvL012354 for ; Mon, 16 Oct 2006 11:28:01 -0700 Message-Id: <200610161828.k9GIRfvL012354@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Extension possibility Date: Mon, 16 Oct 2006 11:27:41 -0700 From: william@bourbon.usc.edu Someone wrote: > Is there a chance for the deadline to extend a little bit? We > also need to concentrate on preparing for the mid-term. If you > get consensus from students, will you consider it? Since many of you have been working hard on the project I would consider an extension of *everyone* agress to it. Let's do this... If I don't get a "no" from anyone by the end of day on Tuesday, 10/17/2006, I will consider an extension. But if there is one student who says "no", then I would have not choice but to stick to the original deadline, to be fair. (Of course, the only exception is extended server outage during the last 48 hours and documented illness or family emergencies from individual students.) So, there is a little less than 2 weeks to the deadline. If you expect not to finish, you should probably try to do a little bit of optimization. You can try to get the most points out of part (1) by examining the grading guidelines carefully, or you can try to minimize the fixing effort afterwards so you can start part (2) as soon as possible. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Mon Oct 16 11:12:55 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9GICt0G018466 for ; Mon, 16 Oct 2006 11:12:55 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9GIAH3C012191 for ; Mon, 16 Oct 2006 11:10:17 -0700 Message-Id: <200610161810.k9GIAH3C012191@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Location size Date: Mon, 16 Oct 2006 11:10:17 -0700 From: william@bourbon.usc.edu Someone wrote: > While reading in the Location, I was required to use a "long long" > data type to accomodate the value given for Location. If I simply use > a "long" or "int", I am getting an incorrect value for it. > > However, "long long" takes up 8 bytesm and the "join message" says the > Location has only 4 bytes. Could you please clarify. I don't know why you said that you are *required* to use "long long". The spec says: Location - The location of this node. (Ideally, this field can be the MD5/SHA1 hash of the node ID. But we restrict ourselves to an unsigned 32-bit integer for this project.) So, it's a 4 bytes quantity. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Mon Oct 16 10:29:57 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9GHTvnC015677 for ; Mon, 16 Oct 2006 10:29:57 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9GHRJfZ011649 for ; Mon, 16 Oct 2006 10:27:19 -0700 Message-Id: <200610161727.k9GHRJfZ011649@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Satus format question Date: Mon, 16 Oct 2006 10:27:19 -0700 From: william@bourbon.usc.edu Someone wrote: > My question is how to come up with this format (what is the > requirement)? Especially with the colors. It would be helpful if > we get some examples (say 3 nodes are connected then this is how > we should comeup with a nam format). The only requirement is that it must work with nam. Please do something reasonable. -- Bill Cheng // bill.cheng@usc.edu ----- Original Message ----- From: william@bourbon.usc.edu Date: Monday, October 16, 2006 10:16 am Subject: Re: Satus format question To: cs551@merlot.usc.edu > Someone wrote: > > > The status command require to produce a nam understandable > > format. Could you please provide some explanation (or point > to a > > source) fo the following output? > > > > V -t * -v 1.0a5 > > n -t * -s 3 -c red -i black > > n -t * -s 4 -c red -i black > > l -t * -s 3 -d 4 -c blue > > I'm not too familar with nam. Please check the documentation > for nam. > > If I create a file "foo.nam" with the above data and run > "~csci551/nam foo.nam", I get two nodes, "3" and "4" connected > by a blue line. So, my guess would be that the "n" line is > a node and the "l" line is a link. I have no idea what the > "-t *" is for. If I remove them and if that breaks nam, I > would keep them. > -- > Bill Cheng // bill.cheng@usc.edu > Return-Path: william@bourbon.usc.edu Delivery-Date: Mon Oct 16 10:28:16 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9GHSGVm015659 for ; Mon, 16 Oct 2006 10:28:16 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9GHPdxi011576 for ; Mon, 16 Oct 2006 10:25:39 -0700 Message-Id: <200610161725.k9GHPdxi011576@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Keep alive question Date: Mon, 16 Oct 2006 10:25:39 -0700 From: william@bourbon.usc.edu Someone wrote: > Do we send keepalive message to only those nodes that we > exchanged hello? Yes. And on a regular link, you can ignore all messages until you've seen a HELLO. > Also, I have some implemenation questions. > > 1. Is the keepalive sender can be another thread or can we use > the timer to do this? For example, a timer ticks ever second and > can check for whole bunch of stuff (such as stop enabled, beacon > timeout, keep alive timeout etc.). Or the timer just updates the > time tick and some other thread performs the timeout operations? I would just use a timer to do this similar to what you said above. When you decrement the count, if it reaches zero, you can just create a message and append it to the output queue that corresponds to the right network output thread. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Mon Oct 16 10:17:23 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9GHHN8q014874 for ; Mon, 16 Oct 2006 10:17:23 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9GHEkuC011397 for ; Mon, 16 Oct 2006 10:14:46 -0700 Message-Id: <200610161714.k9GHEkuC011397@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Satus format question Date: Mon, 16 Oct 2006 10:14:46 -0700 From: william@bourbon.usc.edu Someone wrote: > The status command require to produce a nam understandable > format. Could you please provide some explanation (or point to a > source) fo the following output? > > V -t * -v 1.0a5 > n -t * -s 3 -c red -i black > n -t * -s 4 -c red -i black > l -t * -s 3 -d 4 -c blue I'm not too familar with nam. Please check the documentation for nam. If I create a file "foo.nam" with the above data and run "~csci551/nam foo.nam", I get two nodes, "3" and "4" connected by a blue line. So, my guess would be that the "n" line is a node and the "l" line is a link. I have no idea what the "-t *" is for. If I remove them and if that breaks nam, I would keep them. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Mon Oct 16 09:50:16 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9GGoGPh013192 for ; Mon, 16 Oct 2006 09:50:16 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9GGlcTx010821 for ; Mon, 16 Oct 2006 09:47:38 -0700 Message-Id: <200610161647.k9GGlcTx010821@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: [CS-551] Proj1 questions on "status neighbors" completion Date: Mon, 16 Oct 2006 09:47:38 -0700 From: william@bourbon.usc.edu Someone wrote: > > > 1) What's the timeout for "status neighbors" command. > > > > You can something a little more than MsgLifetime since after > > MsgLifetime, intermediate nodes will stop forwarding responses. > > I just want to clarify this: MsgLifetime timeout should be used > to complete "status neighbors" command (or Ctrl+C). So, only at > that moment I can re-enable user command prompt and dump all the > received status data into a NAM file. > So by default, users will wait 30+ sec for "status neighbors" > completion. Corret. But I would use a small multiple of MsgLifeTime (like 1.2). Also, you can write data to the output file as soon as you get them. -- Bill Cheng // bill.cheng@usc.edu ----- Original Message ----- From: william@bourbon.usc.edu Date: Sunday, October 15, 2006 6:25 pm Subject: Re: [CS-551] Proj1 questions on status and join To: cs551@merlot.usc.edu > Someone wrote: > > > I've got a couple of questions on Proj 1: > > > > 1) What's the timeout for "status neighbors" command. > > You can something a little more than MsgLifetime since after > MsgLifetime, intermediate nodes will stop forwarding responses. > > > 2) When doing "join", and if the beacons list has more than one > > beacon, to which one connection should be established ? > > The spec says: > > When a new node wishes to join the SERVANT network, it > should go down this list and find a running beacon node > to send a join request. > > So, please go down the list until you find the first working > beacon node. > -- > Bill Cheng // bill.cheng@usc.edu > Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Oct 15 21:13:21 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9G4DLcF029246 for ; Sun, 15 Oct 2006 21:13:21 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9G4Aj7n003173 for ; Sun, 15 Oct 2006 21:10:45 -0700 Message-Id: <200610160410.k9G4Aj7n003173@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Uoid Date: Sun, 15 Oct 2006 21:10:45 -0700 From: william@bourbon.usc.edu Someone wrote: > Do we need to keep all sent and received uoids or keep just the > one's that does flooding (such as check, join etc.)? Just the right ones. :-) -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Oct 15 18:36:57 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9G1avWj019403 for ; Sun, 15 Oct 2006 18:36:57 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9G1YM5H001895 for ; Sun, 15 Oct 2006 18:34:22 -0700 Message-Id: <200610160134.k9G1YM5H001895@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Socket Mult-thead Date: Sun, 15 Oct 2006 18:34:22 -0700 From: william@bourbon.usc.edu Someone wrote: > I think I found the issue with the intermittent reception of > messages. I'm actually waiting on a select and the timeout is 1 > second. The select returns every one second and I look for the > timeout value / stop flag. If both are valid then I go back to > select. When I changed the timeout value to 10 seconds it starts > working. I'm wondering how to make this work if we want to > shutdown the node fast. Could you please advice? Timeout value for select() should not be that long. 100ms would be a good value. I think UNIX timeslice is around 100ms. You need to figure out why your code is not working if the timeout is small. -- Bill Cheng // bill.cheng@usc.edu -----Original Message----- Date: Sun, 15 Oct 2006 18:29:37 -0700 From: william@bourbon.usc.edu To: cs551@merlot.usc.edu Subject: Re: Socket Mult-thead Someone wrote: > I'm running 3 processes A, B and C. A and B are beacons nodes > and they exchanged Hello and sitting idle. C is a regular node > starts up and connects to A and sends a join request message. > > Process A: A thread is waiting on socket recv on connection A<-->B > Process A: Another thead starts for handling connection A<-->C > Process A: Now it tries to send a message to connection A<-->B > (flooding the request). > > The send call is not returning any error. But, the process B is > not getting receiving this request. I know that socket is > bi-directional and just wondering is multi-threading has anything > to do with this issue. Logically, I don't see anything wrong with the setup. You need to figure why the code is not working. I'm assuming that your keepalive is working properly. So, you need to figure out the difference between a keepalive and fowarding a join request. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Oct 15 18:32:12 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9G1WCuo019140 for ; Sun, 15 Oct 2006 18:32:12 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9G1TbDi001809 for ; Sun, 15 Oct 2006 18:29:37 -0700 Message-Id: <200610160129.k9G1TbDi001809@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Socket Mult-thead Date: Sun, 15 Oct 2006 18:29:37 -0700 From: william@bourbon.usc.edu Someone wrote: > I'm running 3 processes A, B and C. A and B are beacons nodes > and they exchanged Hello and sitting idle. C is a regular node > starts up and connects to A and sends a join request message. > > Process A: A thread is waiting on socket recv on connection A<-->B > Process A: Another thead starts for handling connection A<-->C > Process A: Now it tries to send a message to connection A<-->B > (flooding the request). > > The send call is not returning any error. But, the process B is > not getting receiving this request. I know that socket is > bi-directional and just wondering is multi-threading has anything > to do with this issue. Logically, I don't see anything wrong with the setup. You need to figure why the code is not working. I'm assuming that your keepalive is working properly. So, you need to figure out the difference between a keepalive and fowarding a join request. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Oct 15 18:26:55 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9G1QtnI018730 for ; Sun, 15 Oct 2006 18:26:55 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9G1OK84001719 for ; Sun, 15 Oct 2006 18:24:20 -0700 Message-Id: <200610160124.k9G1OK84001719@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: [CS-551] Proj1 questions on status and join Date: Sun, 15 Oct 2006 18:24:20 -0700 From: william@bourbon.usc.edu Someone wrote: > I've got a couple of questions on Proj 1: > > 1) What's the timeout for "status neighbors" command. You can something a little more than MsgLifetime since after MsgLifetime, intermediate nodes will stop forwarding responses. > 2) When doing "join", and if the beacons list has more than one > beacon, to which one connection should be established ? The spec says: When a new node wishes to join the SERVANT network, it should go down this list and find a running beacon node to send a join request. So, please go down the list until you find the first working beacon node. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Oct 15 09:40:32 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9FGeWVD015767 for ; Sun, 15 Oct 2006 09:40:32 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9FGbwwM028396 for ; Sun, 15 Oct 2006 09:37:58 -0700 Message-Id: <200610151637.k9FGbwwM028396@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: [CS 551] Date: Sun, 15 Oct 2006 09:37:58 -0700 From: william@bourbon.usc.edu Someone wrote: > Question 1) In status neighbors, the command format is described as: > status neigbors . Here, ttl and logfile are optional, > is that correct? No. They are mandatory. (In UNIX, optional stuff is usually surrounded by square brackets.) > Question 2) What is to be printed to the screen (or a defualt log?) if > a logfile is not specified in status neighbors? If a logfile is > specified, I log the nam format network topology. Nothing is required to go on the screen. The required data must go into the logfile. It's a very good idea to keep the user informed of progress. One thing you can do is to print messages like: 1 response received\r 2 response received\r 3 response received\r ... The '\r' will not produced a linefeed so it has a nice visual effect. This also let the user knows approximately when to press Cntrl+C. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sat Oct 14 20:44:11 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9F3iBE9004749 for ; Sat, 14 Oct 2006 20:44:11 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9F3fdtP027339 for ; Sat, 14 Oct 2006 20:41:39 -0700 Message-Id: <200610150341.k9F3fdtP027339@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Ini files not accessible Date: Sat, 14 Oct 2006 20:41:39 -0700 From: william@bourbon.usc.edu Someone wrote: > I cannot perfrom the following command on nunki. > > cp ~csci551b/public/final1/b1-n??.ini . Oops! Fixed. Thanks for letting me know. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sat Oct 14 19:08:17 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9F28HB4031065 for ; Sat, 14 Oct 2006 19:08:17 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9F25k4K026284 for ; Sat, 14 Oct 2006 19:05:46 -0700 Message-Id: <200610150205.k9F25k4K026284@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: cs551 select use Date: Sat, 14 Oct 2006 19:05:46 -0700 From: william@bourbon.usc.edu Someone wrote: > Since we are not going to use non-blocking I/O, it means > 'select()' is not used ANYWHERE. Why would you say that? If you have 5 connections you are selecting from and all of them are blocked, the natural thing to do is to use select() so that when one of them is unblocked, select() returns. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sat Oct 14 19:02:55 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9F22t1k030683 for ; Sat, 14 Oct 2006 19:02:55 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9F20NEi026218 for ; Sat, 14 Oct 2006 19:00:23 -0700 Message-Id: <200610150200.k9F20NEi026218@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: cs551 clarification on Connection Resolution. Date: Sat, 14 Oct 2006 19:00:23 -0700 From: william@bourbon.usc.edu Someone wrote: > I want some more clarification on Connection Resolution. > > Suppose retry is 30sec. > t-0: Beacon Node A with port no. 50099 starts up. > A tries to connect Beacon Node B. (B's port # 50088) > B is not up, A will retry at t-30. > t-5 > Beacon Node B starts up. > b tries to connect A. > As A is up, A and B are connected(connection initiated by B[50088]). > > t-10: > A and B exchanged some information. > > NOW at t-30, > SHOULD A RETRY TO CONNECT TO B OR NOT??? > > What i am doing is, at t-30, I check if A is already connected to B or not, > If connected, A does not try to connect to B, otherwise A tries to connect > to B > Is it correct? Correct. Since you should only have a single connection between a pair of neighboring nodes, if it's connected, there is no need to make another connection. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Fri Oct 13 08:04:51 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9DF4p3i024574 for ; Fri, 13 Oct 2006 08:04:51 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9DF2OPw005357 for ; Fri, 13 Oct 2006 08:02:24 -0700 Message-Id: <200610131502.k9DF2OPw005357@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: [CS551]: non-beacon after join and hello Date: Fri, 13 Oct 2006 08:02:24 -0700 From: william@bourbon.usc.edu Someone wrote: > That means a node will only flood messages to its neighbors > (the ones that exchanged hello messages), right? Yes. -- Bill Cheng // bill.cheng@usc.edu ----- Original Message ----- From: william@bourbon.usc.edu Date: Thursday, October 12, 2006 11:23 pm Subject: Re: [CS551]: non-beacon after join and hello To: cs551@merlot.usc.edu > Someone wrote: > > > If a node is participating in the network (as I understand a > > beacon node always participates in the network), it should send a > > Hello message first, right? > > Yes. > > > Lets say a beacon node B1 comes up first. Then beacon node B2 > > comes up next and connects to B1. The first thing they exchange > > is HELLO message. The nodes won't accept any messages if the > > HELLO is not exchanged. Now lets say, a regular node comes up and > > connects to a Beacon Node. Since this node is joining the > > network, it will send a JOIN request message first. > > > > Who are the neighbors of the beacon node? > > In the above example, B1's neighbor is B2 and B2's neighbor is > B1. That's it. The connection between a joining regular node > and a beacon node is not a regular connection, so the nodes at > the ends of this special connection are *not* neighbors. > > > Can a regular node be > > the neighbor of a beacon node? Can a beacon node be the neighbor > > of a beacon node. I didn't get the picture clearly from the spec. > > Could you please help here? > > Yes and yes. Neighbor is a bi-directional relationship. Node > A is node B's neighbor (and vice versa) if they have exchanged > HELLO messages. > > When a regular node A connects to node B (regular or beacon) > because B is in A's init_neighbor_list, after HELLO messages > are exchanged, A and B are neighbors. (A does not have to be > on B's init_neighbor_list in order for A and B to be > considered "neighbors", assuming B is a regular node.) > -- > Bill Cheng // bill.cheng@usc.edu > Return-Path: william@bourbon.usc.edu Delivery-Date: Thu Oct 12 23:27:58 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9D6RwuA023411 for ; Thu, 12 Oct 2006 23:27:58 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9D6PXCL032440 for ; Thu, 12 Oct 2006 23:25:33 -0700 Message-Id: <200610130625.k9D6PXCL032440@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: CS551: Node connection question Date: Thu, 12 Oct 2006 23:25:33 -0700 From: william@bourbon.usc.edu Someone wrote: > If a regular node is participating in the network, will it > connect to any Beacon nodes? If not, then how the beacon node > will know the existence of such a node (or how can it be part of > the network). If yes, what message it'll send to the Beacon node? If a beacon node is in the init_neighbor_list file of the regular node, it will connect to it and exchange HELLO messages. Please see slides 8 through 13 of lecture 9 for an example. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Thu Oct 12 23:24:54 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9D6OsWd023270 for ; Thu, 12 Oct 2006 23:24:54 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9D6MSHL032402 for ; Thu, 12 Oct 2006 23:22:28 -0700 Message-Id: <200610130622.k9D6MSHL032402@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: [CS551]: non-beacon after join and hello Date: Thu, 12 Oct 2006 23:22:28 -0700 From: william@bourbon.usc.edu Someone wrote: > If a node is participating in the network (as I understand a > beacon node always participates in the network), it should send a > Hello message first, right? Yes. > Lets say a beacon node B1 comes up first. Then beacon node B2 > comes up next and connects to B1. The first thing they exchange > is HELLO message. The nodes won't accept any messages if the > HELLO is not exchanged. Now lets say, a regular node comes up and > connects to a Beacon Node. Since this node is joining the > network, it will send a JOIN request message first. > > Who are the neighbors of the beacon node? In the above example, B1's neighbor is B2 and B2's neighbor is B1. That's it. The connection between a joining regular node and a beacon node is not a regular connection, so the nodes at the ends of this special connection are *not* neighbors. > Can a regular node be > the neighbor of a beacon node? Can a beacon node be the neighbor > of a beacon node. I didn't get the picture clearly from the spec. > Could you please help here? Yes and yes. Neighbor is a bi-directional relationship. Node A is node B's neighbor (and vice versa) if they have exchanged HELLO messages. When a regular node A connects to node B (regular or beacon) because B is in A's init_neighbor_list, after HELLO messages are exchanged, A and B are neighbors. (A does not have to be on B's init_neighbor_list in order for A and B to be considered "neighbors", assuming B is a regular node.) -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Thu Oct 12 22:38:45 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9D5cj9O020147 for ; Thu, 12 Oct 2006 22:38:45 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9D5aKxS031666 for ; Thu, 12 Oct 2006 22:36:20 -0700 Message-Id: <200610130536.k9D5aKxS031666@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: [CS551]: non-beacon after join and hello Date: Thu, 12 Oct 2006 22:36:20 -0700 From: william@bourbon.usc.edu Someone wrote: > If I remember correctly, you mentioned in one of the early lectures > about final project part1 that, when a non-beacon starts up, it sends > join, then hello (to selected join respnders), By the way, when you join, you are on a special connection and you don't need to exchange HELLO on this connection. HELLO is only sent when you are participating in the network. > writes init_nbrlist file, > and then, *shutdown and restart* this node (to start participating in > the network). Does this mean that we have to exit the program and the > user is going to run it again or just continue running with the newly > found nbrs as part of your network. No. This means that your main() function can look something like the following: main() { do { init(); do_servant_stuff(); cleanup(); } while (!user_shutdown and !abort); } So, do_servant_stuff() will check the existance of the init_neighbor_list file. If it doesn't exist, it will perform a join. When join is done and init_neighbor_list file is created, do_servant_stuff() will return. You then clean up all your data structures and check the user_shutdown and abort flags (and whatever else you need to check) and determine that you need to restart your node. In this case, you just go back to the beginning of the loop and call init() and do_servant_stuff() again. This time, you see that init_neighbor_list exists, so you are participating in the network, and you go on and make connections to your initial neighbors. And so on. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Thu Oct 12 22:29:40 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9D5TeEa019516 for ; Thu, 12 Oct 2006 22:29:40 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9D5RF4J031575 for ; Thu, 12 Oct 2006 22:27:15 -0700 Message-Id: <200610130527.k9D5RF4J031575@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: [CS 551] Date: Thu, 12 Oct 2006 22:27:15 -0700 From: william@bourbon.usc.edu Someone wrote: > I have a question about what constitutes polling. The main problem is with "busy wait" and not polling. Polling in a tight loop is doing a busy wait. It's fairly easy to tell if one is doing a "busy wait". If you spend a lot of CPU time waiting for state change, then you are doing a "busy wait". The key word is *busy*, which translates to spending a lot of CPU time. > If I have a function that checks for input waiting on cin, and if none > is available uses select to sleep 200ms, then try again - is that > polling or blocking? Using a method like this lets me check global > variables (such as a shutdown timeout), five times a second. This is polling and not doing a busy wait. When you sleep for 200ms and wake up to do something in microseconds, there is nothing *busy* about it. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Wed Oct 11 15:22:40 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9BMMeqE029412 for ; Wed, 11 Oct 2006 15:22:40 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9BMKJLX012493 for ; Wed, 11 Oct 2006 15:20:19 -0700 Message-Id: <200610112220.k9BMKJLX012493@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: nam output format Date: Wed, 11 Oct 2006 15:20:19 -0700 From: william@bourbon.usc.edu Someone wrote: > I have been playing with the nam input file format, it seems that > every node can only have an integer ID. I currently plan to uniquely > map every sv_node (port:hostname pair) to an integer value, then > connect them. Is this going to be enough information to determine the > network status? Does the user need to know the mapping of integer IDs > to port:hostname pairs? The design doc doesn't specify, and I'm not > sure nam supports more complex input. I don't think nam supports more complex format either. One thing you can do is to take the last 2 digits of port and use it as your ID and forget about hostname since we will only run on nunki. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Wed Oct 11 13:03:42 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9BK3gvo020501 for ; Wed, 11 Oct 2006 13:03:42 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9BK1Meh010622 for ; Wed, 11 Oct 2006 13:01:22 -0700 Message-Id: <200610112001.k9BK1Meh010622@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: [CS551]: breaking the accpet call Date: Wed, 11 Oct 2006 13:01:22 -0700 From: william@bourbon.usc.edu Someone wrote: > I'm having the following problem: > By default SIGUSR1 terminates the process (when there is no > handler) Right??. But, I just want the accept to break and do > some cleanup before terminating the process and hence terminating > the process is not the way to go. But, if I define a handler for > it, then control just comes here and accept will not break. Of > course, I can do the cleanup in the handler and send SIGUSR1 to > the process again. But, I was wondering if there's a more > straightforward way to do this. So I guess my question is: Is > there any way to make sure that the accept call is broken > (without terminating the process) when the user enters > "shutdown". I assume you are doing accept() in one thread and reading from the command prompt in another thread. Have you looked at "man pthread_sigmask" (I've mentioned this in a lecture)? There is a really good example there. Read all the description around it to see how it works and then adapt it to your needs. You should make sure that the thread that will do accept() is the only thread that will get SIGUSR1. Then when you call kill() from your other thread, you will break out of accept(). -- Bill Cheng // bill.cheng@usc.edu ----- Original Message ----- From: william@bourbon.usc.edu Date: Wednesday, October 11, 2006 10:02 am Subject: Re: [CS551]: breaking the accpet call To: cs551@merlot.usc.edu > Someone wrote: > > > Assuming everything is fine, why would an accept() on a > blocking socket > > return with a failure? Or will it return with "EINTR" once I > send the > > signal. I tried it, but accept does not return when I send > SIGUSR1. > What I meant was that accept() will return -1 and you will need > to check errno (and the global variable). I just tried SIGUSR1 > on nunki and it seemed to work for me. > -- > Bill Cheng // bill.cheng@usc.edu > > > -----Original Message----- > From: william@bourbon.usc.edu [mailto:william@bourbon.usc.edu] > Sent: Tuesday, October 10, 2006 11:30 PM > To: cs551@merlot.usc.edu > Subject: Re: [CS551]: breaking the accpet call > > Someone wrote: > > > Suppose, my serverside thread is blocked on accept and I have > designated > > this thread to recv SIGUSR1 and let's say the handler for > SIGUSR1 is > > "handleSIGUSR1()". Now, I send SIGUSR1 to this thread using > kill() from > > another thread when the user enters "shutdown" at the SERVANT > CLI. Now > > how do I break the accept call in my handler function ie, > > handleSIGUSR1() ? > > I tried SIGTERM instead of SIGUSR1 but it kills the entire > process and > > not just the thread which it is supposed to kill. > > In your example, in handleSIGUSER1(), you just need to set a > global variable to say that you've got SIGUSR1. When accept() > returns with a failure, you can check if this global variable > is set. If it's set, then you know that you've got a kill > from your keyboard handling thread. > -- > Bill Cheng // bill.cheng@usc.edu > Return-Path: william@bourbon.usc.edu Delivery-Date: Wed Oct 11 10:03:00 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9BH30CJ008959 for ; Wed, 11 Oct 2006 10:03:00 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9BH0e12008482 for ; Wed, 11 Oct 2006 10:00:40 -0700 Message-Id: <200610111700.k9BH0e12008482@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: [CS551]: breaking the accpet call Date: Wed, 11 Oct 2006 10:00:40 -0700 From: william@bourbon.usc.edu Someone wrote: > Assuming everything is fine, why would an accept() on a blocking socket > return with a failure? Or will it return with "EINTR" once I send the > signal. I tried it, but accept does not return when I send SIGUSR1. What I meant was that accept() will return -1 and you will need to check errno (and the global variable). I just tried SIGUSR1 on nunki and it seemed to work for me. -- Bill Cheng // bill.cheng@usc.edu -----Original Message----- From: william@bourbon.usc.edu [mailto:william@bourbon.usc.edu] Sent: Tuesday, October 10, 2006 11:30 PM To: cs551@merlot.usc.edu Subject: Re: [CS551]: breaking the accpet call Someone wrote: > Suppose, my serverside thread is blocked on accept and I have designated > this thread to recv SIGUSR1 and let's say the handler for SIGUSR1 is > "handleSIGUSR1()". Now, I send SIGUSR1 to this thread using kill() from > another thread when the user enters "shutdown" at the SERVANT CLI. Now > how do I break the accept call in my handler function ie, > handleSIGUSR1() ? > I tried SIGTERM instead of SIGUSR1 but it kills the entire process and > not just the thread which it is supposed to kill. In your example, in handleSIGUSER1(), you just need to set a global variable to say that you've got SIGUSR1. When accept() returns with a failure, you can check if this global variable is set. If it's set, then you know that you've got a kill from your keyboard handling thread. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Tue Oct 10 23:32:33 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9B6WXU2000533 for ; Tue, 10 Oct 2006 23:32:33 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9B6UFNi002510 for ; Tue, 10 Oct 2006 23:30:15 -0700 Message-Id: <200610110630.k9B6UFNi002510@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: [CS551]: breaking the accpet call Date: Tue, 10 Oct 2006 23:30:15 -0700 From: william@bourbon.usc.edu Someone wrote: > Suppose, my serverside thread is blocked on accept and I have designated > this thread to recv SIGUSR1 and let's say the handler for SIGUSR1 is > "handleSIGUSR1()". Now, I send SIGUSR1 to this thread using kill() from > another thread when the user enters "shutdown" at the SERVANT CLI. Now > how do I break the accept call in my handler function ie, > handleSIGUSR1() ? > I tried SIGTERM instead of SIGUSR1 but it kills the entire process and > not just the thread which it is supposed to kill. In your example, in handleSIGUSER1(), you just need to set a global variable to say that you've got SIGUSR1. When accept() returns with a failure, you can check if this global variable is set. If it's set, then you know that you've got a kill from your keyboard handling thread. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Tue Oct 10 19:40:13 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9B2eD3i017937 for ; Tue, 10 Oct 2006 19:40:13 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9B2buLC032281 for ; Tue, 10 Oct 2006 19:37:56 -0700 Message-Id: <200610110237.k9B2buLC032281@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: [CSCI 551] Date: Tue, 10 Oct 2006 19:37:56 -0700 From: william@bourbon.usc.edu Someone wrote: > I am wondering about the implementation of the check message. It > seems to me that this message requires a timeout period, likely to be > specified in the .ini file. However, I see no information about such > a specification in the design doc. You can something a little more than MsgLifetime since after MsgLifetime, intermediate nodes will stop forwarding responses. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Mon Oct 9 22:55:43 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9A5thtj003540 for ; Mon, 9 Oct 2006 22:55:43 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9A5rTLO020663 for ; Mon, 9 Oct 2006 22:53:29 -0700 Message-Id: <200610100553.k9A5rTLO020663@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Project: Connection question Date: Mon, 09 Oct 2006 22:53:29 -0700 From: william@bourbon.usc.edu Someone wrote: > I'm little but confused about the connection operational > requirement (page 3 of the spec). Lets say, we have two processes > running on nunki; process A and process B. > > 1) Process A connects to process B port number 44444 (port > address of A is dynamically assigned by the OS and say it is > 12345). > 2) How is it possible for the port numbers of A and B to be > equal? Not possible. The OS guarantees it. > 3) In our project, the hostname will always be nunki.usc.edu. So, > checking strcmp(HA, HB) will be always equal. Exactly! > Could you please advice what to do here? The port numbers you need to compare are the "well-known" port numbers. These are the port numbers the processes listen to. In your example, your process B listens to port 44444 (or "serving at port 44444"). To what port number does your process A listen? Let's say that your process A listens to port 44449 and when process B connects to port 44449 of process A, the temporary port allocated by the OS for process B is port 36271. In this case, you need to compare 44444 with 44449 and decides which connection to drop. So, the picture looks like: A B 12345 ----> 44444 44449 <---- 36271 In (1) above, from the socket, process B will only know the temporary port number (12345) on A side of the connection. Process B can only know the well-known port for process A after it has received a HELLO message from that connection. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Mon Oct 9 10:10:16 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k99HACAe019829; Mon, 9 Oct 2006 10:10:12 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k99H7xRX012238; Mon, 9 Oct 2006 10:07:59 -0700 Message-Id: <200610091707.k99H7xRX012238@bourbon.usc.edu> Cc: Manish Kankani To: cs551@merlot.usc.edu, csac@merlot.usc.edu Subject: Re: Job Opening at Broadcom Corporation In-reply-to: References: <200610091608.k99G8gF1011256@bourbon.usc.edu> Comments: In-reply-to Manish Kankani message dated "Mon, 09 Oct 2006 10:00:19 -0700." Date: Mon, 09 Oct 2006 10:07:59 -0700 From: william@bourbon.usc.edu Dear Students, Please do not send your resume if you will not graduate by the end of this year. -- Bill Cheng // bill.cheng@usc.edu -----Original Message----- Date: Mon, 09 Oct 2006 10:00:19 -0700 From: Manish Kankani To: william@bourbon.usc.edu Cc: cs551@merlot.usc.edu, csac@merlot.usc.edu Subject: Re: Job Opening at Broadcom Corporation Hello, Even though it is clearly mentioned in the mail and also repeated by Prof. B ill Cheng, I have started receiving resumes of people graduating in May 2007. Please note that the said position is only for people who have already graduat ed or intend to gradute by Dec 2006. Please donot forward your resumes if you are graduating any time later than Dec 2006. Also mention you GPA in the resume. Thanks -Manish Kankani ----- Original Message ----- From: william@bourbon.usc.edu Date: Monday, October 9, 2006 9:09 am Subject: Re: Job Opening at Broadcom Corporation To: cs551@merlot.usc.edu, csac@merlot.usc.edu Cc: Manish Kankani > Dear Students, > > I'm forwarding a message for a job opportunity. My > understanding is that this is only for students who intend > to graduate by Dec 2006. Please contact Manish Kankani > if you have questions. > -- > Bill Cheng // bill.cheng@usc.edu > > > > -----Original Message----- > Date: Sun, 08 Oct 2006 21:40:52 -0700 > From: Manish Kankani > To: chengw@usc.edu > Subject: Job Opening at Broadcom Corporation > > Hello, > > I am a graduate student from USC, working at Broadcom Corporation > in San Die > go. We have an immediate opening for the following job. It would be > great if y > ou could forward this to all the CS 402, CS 551, CS599 students who > have alrea > dy graduated or intend to graduate by Dec 2006. > > JOB DESCRIPTION: > Position Type : Firmware > Job Title : Engineer, Firmware > Job Requirements : Requirements include a MSEE with some embedded > firmware e > xperience. Exceptional candidates with less experience will be > considered. Ski > lls include knowledge of RISC processors, microcontrollers, C and > Assembly lan > guage programming and debugging, low-level system debugging, > including skills > related to debugging firmware and operating system kernels, and > experience in > trouble-shooting HW device level problems. Knowledge of > Cryptography, MPEG tra > nsport, audio and/or video desired. > > Internal Description : Duties include firmware development and > verification > of new architectures/features/enhancements for the security design > inside sett > op box chip. This person will work as an integral part of the HW-SW > co-design > team for System-on-chip design and participate in fine tuning of > SW/HW archite > cture. Responsibilities include firmware development, testbench > development, d > ocumentation, and support of lab checkout of module > > Please forward your resume to me, if you meet the requirements. > > Thanks > -Manish Kankani > Return-Path: william@bourbon.usc.edu Delivery-Date: Mon Oct 9 10:08:02 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k99H82CB019687 for ; Mon, 9 Oct 2006 10:08:02 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k99H5nMx012164 for ; Mon, 9 Oct 2006 10:05:49 -0700 Message-Id: <200610091705.k99H5nMx012164@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Project questions Date: Mon, 09 Oct 2006 10:05:49 -0700 From: william@bourbon.usc.edu Someone wrote: > 1. What is the default timeout we use for recv? It's up to you. > 2. What is the significance of TTL for Hello message? All messages have a TTL. So, you should set it to 1 for HELLO. > 3. Clarifications on the socket selection (in case of conflict)? > Say if A connected to B first and then B also connects > to A (now we have two socket connections). Should we run the > connection choosing algorithm (as per the spec) even if we > exchanged Hello? Yes. You should close the right one down as soon as possible. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Mon Oct 9 10:04:47 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k99H4lVe019419 for ; Mon, 9 Oct 2006 10:04:47 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k99H2YXM012059 for ; Mon, 9 Oct 2006 10:02:35 -0700 Message-Id: <200610091702.k99H2YXM012059@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: CS551 msglifetime question Date: Mon, 09 Oct 2006 10:02:34 -0700 From: william@bourbon.usc.edu Someone wrote: > I would think that if a "route" expires, there is no need to drop your > connection with the neighbor from which that route was build. Isn't > this what msglifetime does, expire your routes for you after a period? > > Why is a notify being sent when a route is removed? You are absolutely correct. Sorry that I was thinking about keepalive! There is no need to close the connection if a you see a response for a message that has expired (although this would be unusual in our setup on nunki). -- Bill Cheng // bill.cheng@usc.edu On 10/8/06, william@bourbon.usc.edu wrote: > Someone wrote: > > > Upon expiration of msglifetime for a particular connection, should we simply > > close the connection or should we send a notify msg before we close. > > Yes. A code of 0 should be used. > > > Also, > > if we are in the middle of receiving something that needs to be routed while > > the msglifetime expires, should we forward the msg or simply drop it? > > It's up to you. Whatever it's convenient for you. > -- > Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Mon Oct 9 09:10:59 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k99GAshe015941; Mon, 9 Oct 2006 09:10:54 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k99G8gF1011256; Mon, 9 Oct 2006 09:08:42 -0700 Message-Id: <200610091608.k99G8gF1011256@bourbon.usc.edu> To: cs551@merlot.usc.edu, csac@merlot.usc.edu Cc: Manish Kankani Subject: Re: Job Opening at Broadcom Corporation In-reply-to: References: Comments: In-reply-to Manish Kankani message dated "Sun, 08 Oct 2006 21:40:52 -0700." Date: Mon, 09 Oct 2006 09:08:42 -0700 From: william@bourbon.usc.edu Dear Students, I'm forwarding a message for a job opportunity. My understanding is that this is only for students who intend to graduate by Dec 2006. Please contact Manish Kankani if you have questions. -- Bill Cheng // bill.cheng@usc.edu -----Original Message----- Date: Sun, 08 Oct 2006 21:40:52 -0700 From: Manish Kankani To: chengw@usc.edu Subject: Job Opening at Broadcom Corporation Hello, I am a graduate student from USC, working at Broadcom Corporation in San Die go. We have an immediate opening for the following job. It would be great if y ou could forward this to all the CS 402, CS 551, CS599 students who have alrea dy graduated or intend to graduate by Dec 2006. JOB DESCRIPTION: Position Type : Firmware Job Title : Engineer, Firmware Job Requirements : Requirements include a MSEE with some embedded firmware e xperience. Exceptional candidates with less experience will be considered. Ski lls include knowledge of RISC processors, microcontrollers, C and Assembly lan guage programming and debugging, low-level system debugging, including skills related to debugging firmware and operating system kernels, and experience in trouble-shooting HW device level problems. Knowledge of Cryptography, MPEG tra nsport, audio and/or video desired. Internal Description : Duties include firmware development and verification of new architectures/features/enhancements for the security design inside sett op box chip. This person will work as an integral part of the HW-SW co-design team for System-on-chip design and participate in fine tuning of SW/HW archite cture. Responsibilities include firmware development, testbench development, d ocumentation, and support of lab checkout of module Please forward your resume to me, if you meet the requirements. Thanks -Manish Kankani Return-Path: william@bourbon.usc.edu Delivery-Date: Mon Oct 9 09:08:11 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k99G8BdJ015797 for ; Mon, 9 Oct 2006 09:08:11 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k99G5xSF011230 for ; Mon, 9 Oct 2006 09:05:59 -0700 Message-Id: <200610091605.k99G5xSF011230@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Socket accept question Date: Mon, 09 Oct 2006 09:05:59 -0700 From: william@bourbon.usc.edu Someone wrote: > I'm starting my TCP server in a new thread that'll accept > connections from its neighbors. In the main thread I'm blocking > all signlas (such as SIGINT) before starting this thread. I'm > just wondering how to make the accept call return if there are no > connections (when we want to shutdown the node gracefully). > > In my warmup 1 project, I closed the socket and the accept > returns. This is because my thread wasn't blocked to received the > SIGINT signal. Could you please let me know how to achieve this? > > BTW, I also used the select call. One way to do is that the > select timesout perioically and check to see if we have something > to read from the socket. > > fd_set readfds; > FD_ZERO(&readfds); > FD_SET(socket, &readfds); > int n = socket + 1; > > int status = select(n, &readfds, NULL, NULL, NULL); > dSocket = accept(socket, (struct sockaddr *)&dAddr, &addrSize); > > Now the problem is how to interrupt the select call. I don't think you need the select() call. You should just call accept(). It will return if this thread receives a signal. You should not block all signals for this thread. You can always designate SIGUSR1 or SIGUSR2 for this thread and calls kill() from another thread if you want to break out of accept(). -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Oct 8 15:57:33 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k98MvXIk015174 for ; Sun, 8 Oct 2006 15:57:33 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k98MtNtu002495 for ; Sun, 8 Oct 2006 15:55:23 -0700 Message-Id: <200610082255.k98MtNtu002495@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: CS551 msglifetime question Date: Sun, 08 Oct 2006 15:55:23 -0700 From: william@bourbon.usc.edu Someone wrote: > Upon expiration of msglifetime for a particular connection, should we simply > close the connection or should we send a notify msg before we close. Yes. A code of 0 should be used. > Also, > if we are in the middle of receiving something that needs to be routed while > the msglifetime expires, should we forward the msg or simply drop it? It's up to you. Whatever it's convenient for you. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Oct 8 08:20:12 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k98FKC2p018742 for ; Sun, 8 Oct 2006 08:20:12 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k98FI4pb031322 for ; Sun, 8 Oct 2006 08:18:04 -0700 Message-Id: <200610081518.k98FI4pb031322@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Grading guideline Date: Sun, 08 Oct 2006 08:18:04 -0700 From: william@bourbon.usc.edu Someone wrote: > As the link of your grading guideline is not existing, > could you please provide us the new one? Oops! Sorry! Fixed. -- Bill Cheng // bill.cheng@usc.edu ----- Original Message ----- From: william@bourbon.usc.edu Date: Saturday, October 7, 2006 11:08 pm Subject: Re: cs551 Non blocking I/O To: cs551@merlot.usc.edu > Hi, > > The grading guidelines for final project part (1) has been > posted. Please see: > > http://merlot.usc.edu/cs551-f06/projects/final.html#grading > > Please note that the Location values in the startup > configuration files do not match the network in the grading > guidelines. This will be fixed later. > -- > Bill Cheng // bill.cheng@usc.edu > Return-Path: william@bourbon.usc.edu Delivery-Date: Sat Oct 7 23:09:19 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k9869IAq021709 for ; Sat, 7 Oct 2006 23:09:18 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9867BCX000307 for ; Sat, 7 Oct 2006 23:07:11 -0700 Message-Id: <200610080607.k9867BCX000307@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: cs551 Non blocking I/O Date: Sat, 07 Oct 2006 23:07:11 -0700 From: william@bourbon.usc.edu Hi, The grading guidelines for final project part (1) has been posted. Please see: http://merlot.usc.edu/cs551-f06/projects/final.html#grading Please note that the Location values in the startup configuration files do not match the network in the grading guidelines. This will be fixed later. -- Bill Cheng // bill.cheng@usc.edu -----Original Message----- Date: Sat, 07 Oct 2006 09:42:10 -0700 From: william@bourbon.usc.edu To: cs551@merlot.usc.edu Subject: Re: cs551 Non blocking I/O Someone wrote: > The I/O for final project MUST be Non-blocking > OR > It is optional (could be blocking). Sorry that I have not posted the grading guidelines yet. I'll post it this weekend. There will be a 10 point deduction of you use non-blocking I/O or non-blocking socket. Please note that it's okay to use non-blocking I/O occassionally. If you look at the connect() code at: http://merlot.usc.edu/cs551-f06/projects/connect.html it turned the socket into a non-blocking one at first. Before the function returns, it turned the socket back to a blocking one. So, only during connect time, it uses non-blocking I/O, and that's a very small fraction of the life time of a socket. You really need to learn how to write code using blocking I/O! In the "real world", it's unacceptable to do non-blocking I/O unless there is a really really good reason. If you get caught doing non-blocking I/O, please don't say that you've learned it here! :-) -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sat Oct 7 22:20:09 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k985K9Po018367 for ; Sat, 7 Oct 2006 22:20:09 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k985I2Ov032126 for ; Sat, 7 Oct 2006 22:18:02 -0700 Message-Id: <200610080518.k985I2Ov032126@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: [cs551]Is socket thread safe? Date: Sat, 07 Oct 2006 22:18:02 -0700 From: william@bourbon.usc.edu Someone wrote: > I am aware of the rule. :) But in order to drop one of the > connection, shouldn't I first get a connection and pass around > msgs to decide who has bigger port number or bigger host name? Or > is there a way to drop the connection immediately without > actually sending and recving messages? Maybe I can do this by > trying to read the sockaddr structure? You are absolutely correct. You only know the hostname and port after you've received a HELLO message from the other side. Just reading the sockaddr structure will not give you that. So, you have to exchange data on both connections. > I am also using two threads to read and write and they use a same > socket for each connection. So there are all four threads for two > connections. I am wondering if this could be related with the > "pipe burst" error you mentioned in another email. I am getting > "broken pipe" error on the second connection, not the "pipe > burst". "Broken pipe" is very common. It just means that the connection has been severed. I googled "pipe burst", but all I got was plumbing related pages. By the way, are you running your code on nunki? Please remeber that if you are not, you may have to use the more compilcated version of connect(). The man pages of socket says: Sockets of type SOCK_STREAM are full-duplex byte streams, similar to pipes. A stream socket must be in a connected state before any data may be sent or received on it. If you are not running all nunki and simply call connect() directly, you may get into the situation where you are not really in the *connected* state when you try to read/write data. -- Bill Cheng // bill.cheng@usc.edu ----- Original Message ----- From: william@bourbon.usc.edu Date: Saturday, October 7, 2006 5:16 pm Subject: Re: [cs551]Is socket thread safe? To: cs551@merlot.usc.edu > Someone wrote: > > > If a node A has established a connection(using connect) with a > > node B, and if node B establishes another connection(using > > connect) with node A, is this supposed to be OK? > > The spec says that you must drop one of the connections! > Please see "Connections" in the "Some Definitions and > Operational Requirements" section of the spec. > > > I can get two > > connections all right and can send and receive msgs over the > > first connection, but as soon as the node B tries to send or > > receive over the second connection to node A, I get broken pipe > > error. I am having four threads total for each read & write for > > each connection. I am wondering I am having trouble as the > > sockets are not thread safe. > > I assume you are using different sockets. I'm pretty sure > that the sockets code are thread safe. Other than violating > the spec, you probably just have a bug somewhere. > -- > Bill Cheng // bill.cheng@usc.edu > Return-Path: william@bourbon.usc.edu Delivery-Date: Sat Oct 7 21:58:45 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k984wjrw016845 for ; Sat, 7 Oct 2006 21:58:45 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k984ucxQ031853 for ; Sat, 7 Oct 2006 21:56:38 -0700 Message-Id: <200610080456.k984ucxQ031853@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: [cs599] Attacks on RC4 Date: Sat, 07 Oct 2006 21:56:38 -0700 From: william@bourbon.usc.edu Someone wrote: > Ping, wrong e-mail group. Ooops! Sorry! -- Bill Cheng // bill.cheng@usc.edu On 10/7/06, william@bourbon.usc.edu wrote: > Someone wrote: > > > In the command > > > > hw4 histo -t=period -i=which [file] > > > > I am not bale to understand the meaning and use of " -i=which" > > parameter, the spec says that which means the one based index for > > the alphabet. I am not bale to understand that. > > I would really appreciate if you could clarify my doubt > > Assuming that the period is T, then there are T mono-alphabetic > substitution ciphers that we need to deal with and we can only > crack one at a time. One way to deal with a mono-alphabetic > substitution ciphers is to get the letter frequencies and that's > what the histo command tries to do. > > The "-i=which" commandline option tell you which one of the > T mono-alphabetic substitution ciphers to crack. The "which" > value must be between 1 and T, inclusive. If "-i=1" is > specified, you should only generate statistics for the > following characters in the input (the very first character > in the input is called character 1, that's what "one based" > index meant): > > i, i+T, i+2*T, i+3*T, i+4*T, ... > -- > Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sat Oct 7 17:24:14 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k980OESf032128 for ; Sat, 7 Oct 2006 17:24:14 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k980M8bx029744 for ; Sat, 7 Oct 2006 17:22:08 -0700 Message-Id: <200610080022.k980M8bx029744@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: [cs599] Attacks on RC4 Date: Sat, 07 Oct 2006 17:22:08 -0700 From: william@bourbon.usc.edu Someone wrote: > In the command > > hw4 histo -t=period -i=which [file] > > I am not bale to understand the meaning and use of " -i=which" > parameter, the spec says that which means the one based index for > the alphabet. I am not bale to understand that. > I would really appreciate if you could clarify my doubt Assuming that the period is T, then there are T mono-alphabetic substitution ciphers that we need to deal with and we can only crack one at a time. One way to deal with a mono-alphabetic substitution ciphers is to get the letter frequencies and that's what the histo command tries to do. The "-i=which" commandline option tell you which one of the T mono-alphabetic substitution ciphers to crack. The "which" value must be between 1 and T, inclusive. If "-i=1" is specified, you should only generate statistics for the following characters in the input (the very first character in the input is called character 1, that's what "one based" index meant): i, i+T, i+2*T, i+3*T, i+4*T, ... -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sat Oct 7 17:17:39 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k980HdXX031608 for ; Sat, 7 Oct 2006 17:17:39 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k980FXfN029656 for ; Sat, 7 Oct 2006 17:15:33 -0700 Message-Id: <200610080015.k980FXfN029656@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: [cs551]Is socket thread safe? Date: Sat, 07 Oct 2006 17:15:33 -0700 From: william@bourbon.usc.edu Someone wrote: > If a node A has established a connection(using connect) with a > node B, and if node B establishes another connection(using > connect) with node A, is this supposed to be OK? The spec says that you must drop one of the connections! Please see "Connections" in the "Some Definitions and Operational Requirements" section of the spec. > I can get two > connections all right and can send and receive msgs over the > first connection, but as soon as the node B tries to send or > receive over the second connection to node A, I get broken pipe > error. I am having four threads total for each read & write for > each connection. I am wondering I am having trouble as the > sockets are not thread safe. I assume you are using different sockets. I'm pretty sure that the sockets code are thread safe. Other than violating the spec, you probably just have a bug somewhere. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sat Oct 7 17:13:37 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k980Db8h031348 for ; Sat, 7 Oct 2006 17:13:37 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k980BUlR029610 for ; Sat, 7 Oct 2006 17:11:30 -0700 Message-Id: <200610080011.k980BUlR029610@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: regarding socket Date: Sat, 07 Oct 2006 17:11:30 -0700 From: william@bourbon.usc.edu Someone wrote: > I have a doubt regarding sockets and thread. > > Q could two different threads be created for read from the socket > and writing to it. > > If yes, woudn't it result in raise condition. as it might be > possible that both thread would like to work on it, i.e. one > wants to read and another wants to write. I assume you are asking if you can use one thread to read a socket while using another thread to write to the same socket. A socket is full-duplex. This means that it can be read and written simultaneously. Just like the telephone, if both parties try to talk at the same time, it's no problem. One student mentioned that he tried doing this but he got a "pipe burst" error. I said that I have never heard of such an error. If someone else is getting this error, please let me know. Thanks! -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sat Oct 7 17:10:17 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k980AHJa031195 for ; Sat, 7 Oct 2006 17:10:17 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k9808BrF029557 for ; Sat, 7 Oct 2006 17:08:11 -0700 Message-Id: <200610080008.k9808BrF029557@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: ini parser Date: Sat, 07 Oct 2006 17:08:11 -0700 From: william@bourbon.usc.edu Someone wrote: > In the ini parser that was provided, we need to search for the keys to > get the values.. this is fine for the basic information > but for the becons i am not sure how we can do that > since 'we' as in coders will not know the name of the becon servers from > b4, we would not be able to search for it using the search function > provided by the parser. I have not used the iniparser, but I assume that there is a way to read enumerate through all the keys in a section, even if you don't know what they are. May be one of the argument you need to pass a NULL to it to get this type of behavior. That's how the Windows API works, so I'm assuming that there will be something similar. > and if we decide to make our own parser, we have the same issue, we > would know the keys for the genral settings, but in the becons, we will > not know the name of the becon servers If you are writing your own parser, just read in every line of the file and create multiple lists. -- Bill Cheng // bill.cheng@usc.edu william@bourbon.usc.edu wrote: > Someone wrote: > > > I have been looking into ini parsers, I found a good and simple one, > > but the issues with that is it cannot differentiate similar keys. > > which is the case in our ini files under the becon section. > > In the [beacons] section, all keys are different. The spec says: > > If there are duplicate keys within the same section, the > first one should be honored and the rest should be ignored. > > > could you point to some ini parsers that you have used and is able to > > handle simalar keys. > > At the bottom of the spec, there is a link to Nicolas Devillard's > iniparser. You also can just write your own. Please see slides > 21 and 22 of lecture 9. > -- > Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sat Oct 7 17:06:09 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k98068ln030930 for ; Sat, 7 Oct 2006 17:06:08 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k98042AH029513 for ; Sat, 7 Oct 2006 17:04:02 -0700 Message-Id: <200610080004.k98042AH029513@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: cs551 server start time Date: Sat, 07 Oct 2006 17:04:02 -0700 From: william@bourbon.usc.edu Someone wrote: > When should a node bind a socket and start listening? > > Immediately as it is started(i.e. first step in main function after parsing) > OR > after creating init-neighbor_list (in case of regular node) > OR > after receiving hello from all neighbors > OR > doesn't matter, depends on implementation. It depends on your implementation. If this is a regular node and it's doing a join, then it shouldn't start accepting connection if you plan to restart this node after join finishes. Please remember that you can get connections from other nodes at any time, so you cannot wait until everything "stablelizes". This is the reality of a peer-to-peer system. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sat Oct 7 09:49:27 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k97GnRp3002994 for ; Sat, 7 Oct 2006 09:49:27 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k97GlMTC025834 for ; Sat, 7 Oct 2006 09:47:22 -0700 Message-Id: <200610071647.k97GlMTC025834@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: keepalive Date: Sat, 07 Oct 2006 09:47:22 -0700 From: william@bourbon.usc.edu Someone wrote: > About keepalive.. > i know that a nodes needs to send a keep alive message according to > keepalive timeout... > what does the other node do when it dosnt recive the keep alive? > does the listening node kill the whole socket if it dosnt recieve any > keep alive on that socket? Yes. If the keepalive timer expired on the other side, it should close the connection as if the socket is closed by this side. A simple way to do this is to use select() and have the timeout set at, say 100ms. If select() returns because of the 100ms timeout, you can check if the keepalive timeout has expired. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sat Oct 7 09:44:15 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k97GiFLU002713 for ; Sat, 7 Oct 2006 09:44:15 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k97GgARj025779 for ; Sat, 7 Oct 2006 09:42:10 -0700 Message-Id: <200610071642.k97GgARj025779@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: cs551 Non blocking I/O Date: Sat, 07 Oct 2006 09:42:10 -0700 From: william@bourbon.usc.edu Someone wrote: > The I/O for final project MUST be Non-blocking > OR > It is optional (could be blocking). Sorry that I have not posted the grading guidelines yet. I'll post it this weekend. There will be a 10 point deduction of you use non-blocking I/O or non-blocking socket. Please note that it's okay to use non-blocking I/O occassionally. If you look at the connect() code at: http://merlot.usc.edu/cs551-f06/projects/connect.html it turned the socket into a non-blocking one at first. Before the function returns, it turned the socket back to a blocking one. So, only during connect time, it uses non-blocking I/O, and that's a very small fraction of the life time of a socket. You really need to learn how to write code using blocking I/O! In the "real world", it's unacceptable to do non-blocking I/O unless there is a really really good reason. If you get caught doing non-blocking I/O, please don't say that you've learned it here! :-) -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Fri Oct 6 16:05:43 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k96N5hSL032386 for ; Fri, 6 Oct 2006 16:05:43 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k96N3eC2016509 for ; Fri, 6 Oct 2006 16:03:40 -0700 Message-Id: <200610062303.k96N3eC2016509@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: ini parser Date: Fri, 06 Oct 2006 16:03:40 -0700 From: william@bourbon.usc.edu Someone wrote: > I have been looking into ini parsers, I found a good and simple one, > but the issues with that is it cannot differentiate similar keys. > which is the case in our ini files under the becon section. In the [beacons] section, all keys are different. The spec says: If there are duplicate keys within the same section, the first one should be honored and the rest should be ignored. > could you point to some ini parsers that you have used and is able to > handle simalar keys. At the bottom of the spec, there is a link to Nicolas Devillard's iniparser. You also can just write your own. Please see slides 21 and 22 of lecture 9. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Fri Oct 6 15:23:42 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k96MNgi0029659 for ; Fri, 6 Oct 2006 15:23:42 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k96MLdiI016099 for ; Fri, 6 Oct 2006 15:21:39 -0700 Message-Id: <200610062221.k96MLdiI016099@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: [cs551] design Date: Fri, 06 Oct 2006 15:21:39 -0700 From: william@bourbon.usc.edu Someone wrote: > When i will be lockin the threads, > I wud invoke the following function > pthread_mutex_lock(&lock); > is there a way to debug, or know that the thread has acquired the lock > if possible or is the thread blocked in case that the lock is already > locked by some other thread? I think there is a way, but I don't remember what it is because I think it's a bad way to go. At the application level, we should learn to write code that's free of polling. > and just to clarify, the thread will halt operations until it can get > the lock, is that the correct understanding? Yes. And please use condition variables so that the thread library and the OS can help us to lock the mutex. Please read the pthreads book about condition variables if you are not familiar with them. It's bad to do the following: for (...) { pthread_mutex_lock(&mutex); check_if_there_is_work_to_do(); pthread_mutex_unlock(&mutex); } The above code will eat up CPU time even if you have nothing to do because it's doing some form of polling. -- Bill Cheng // bill.cheng@usc.edu william@bourbon.usc.edu wrote: > Someone wrote: > > > Yes, my message cache wud be a struct that wud keep a copy of the > > message that needs to be responded to. > > besides that i would like to keep a var that has the socket that the > > request came from, or even better the pointer to the thread that handles > > writing to that specific socket. > > how would i implement the thread pointer? since the listner dosnt know > > the thread that corresponds to itself > > I think if you call getpid() within a child thread, you get > some form of a thread ID. If you really need the actual > "thread ID", you need to save it when pthread_create() is > called. > > > Secondly, if i have the map to the socket or the thread that handles > > that socket, how wud we dispatch the job to that thread? > > Just add the job to the queue which corresponds to that thread. > > If the data structures you designed before are not working > out for you, you may have to design another set of data > structures using all the information you have so far. > -- > Bill Cheng // bill.cheng@usc.edu > > > > william@bourbon.usc.edu wrote: > > Someone wrote: > > > > > The look up is where i am having an issue, > > > let say i do all that > > > cache a request > > > wait for a response > > > get a response > > > do a look up > > > find that the message id match and needs to be sent out > > > but here is my problem, the message cache only has the message_id, which > > > is independent of the socket or connection it came from. > > > how does the dispatcher know which thread to call which is connected to > > > that neighbor to whom the message response needs to be forwarded to? > > > > You need to tag the message_id with the connection. > > > > I assume that your "message cache" is a collection of > > objects or data structures organized in some fashion > > (list, tree, hash, etc.) (If it's just a collection of > > message_ids, then it's not very useful.) So, you just > > need to add more members to the object or more fields > > to the data structure so that you can find the connection > > or neighbor Node ID. > > -- > > Bill Cheng // bill.cheng@usc.edu > > > > > > > > william@bourbon.usc.edu wrote: > > > Someone wrote: > > > > > > > As one of the possible designs, we can have all the listening thread > > > > create a message cache which holds the messages that needs to be > > > > responded back to. > > > > Now lets say there is a response to a message that was cached that > > > > arrives to the listening queue. > > > > Would the listener itself check weather the response is valid, in terms > > > > of there something waiting? > > > > > > You lost me in the last phrase... What do you mean if a response > > > is "valid"? > > > > > > > secondly, if the response is valid, how do we map the message response > > > > to the correct port/connection, since the message is independent of the > > > > sending threads. > > > > > > I'm not sure how you identify a neighbor. Let's assume that > > > you use the Node ID of the neighbor as an identifier. When > > > you get a request message that you may need to forward response > > > to, and this message came from your neighbor with X as its Node > > > ID, you need to tag the message ID with X. Later on, when you > > > get a response for this message, you need to *look it up* and > > > determine that you need to forward the response to X. > > > > > > The *lookup* will be much easier if there is only one message > > > cache. All you need to do is to lock the cache, do the lookup, > > > and release the lock. If your cache has many pieces, you need > > > to do lock, lookup, and release in all the caches. > > > -- > > > Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Fri Oct 6 13:29:06 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k96KT6Vt022393 for ; Fri, 6 Oct 2006 13:29:06 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k96KR4d2014712 for ; Fri, 6 Oct 2006 13:27:04 -0700 Message-Id: <200610062027.k96KR4d2014712@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: [cs551] design Date: Fri, 06 Oct 2006 13:27:04 -0700 From: william@bourbon.usc.edu Someone wrote: > Yes, my message cache wud be a struct that wud keep a copy of the > message that needs to be responded to. > besides that i would like to keep a var that has the socket that the > request came from, or even better the pointer to the thread that handles > writing to that specific socket. > how would i implement the thread pointer? since the listner dosnt know > the thread that corresponds to itself I think if you call getpid() within a child thread, you get some form of a thread ID. If you really need the actual "thread ID", you need to save it when pthread_create() is called. > Secondly, if i have the map to the socket or the thread that handles > that socket, how wud we dispatch the job to that thread? Just add the job to the queue which corresponds to that thread. If the data structures you designed before are not working out for you, you may have to design another set of data structures using all the information you have so far. -- Bill Cheng // bill.cheng@usc.edu william@bourbon.usc.edu wrote: > Someone wrote: > > > The look up is where i am having an issue, > > let say i do all that > > cache a request > > wait for a response > > get a response > > do a look up > > find that the message id match and needs to be sent out > > but here is my problem, the message cache only has the message_id, which > > is independent of the socket or connection it came from. > > how does the dispatcher know which thread to call which is connected to > > that neighbor to whom the message response needs to be forwarded to? > > You need to tag the message_id with the connection. > > I assume that your "message cache" is a collection of > objects or data structures organized in some fashion > (list, tree, hash, etc.) (If it's just a collection of > message_ids, then it's not very useful.) So, you just > need to add more members to the object or more fields > to the data structure so that you can find the connection > or neighbor Node ID. > -- > Bill Cheng // bill.cheng@usc.edu > > > > william@bourbon.usc.edu wrote: > > Someone wrote: > > > > > As one of the possible designs, we can have all the listening thread > > > create a message cache which holds the messages that needs to be > > > responded back to. > > > Now lets say there is a response to a message that was cached that > > > arrives to the listening queue. > > > Would the listener itself check weather the response is valid, in terms > > > of there something waiting? > > > > You lost me in the last phrase... What do you mean if a response > > is "valid"? > > > > > secondly, if the response is valid, how do we map the message response > > > to the correct port/connection, since the message is independent of the > > > sending threads. > > > > I'm not sure how you identify a neighbor. Let's assume that > > you use the Node ID of the neighbor as an identifier. When > > you get a request message that you may need to forward response > > to, and this message came from your neighbor with X as its Node > > ID, you need to tag the message ID with X. Later on, when you > > get a response for this message, you need to *look it up* and > > determine that you need to forward the response to X. > > > > The *lookup* will be much easier if there is only one message > > cache. All you need to do is to lock the cache, do the lookup, > > and release the lock. If your cache has many pieces, you need > > to do lock, lookup, and release in all the caches. > > -- > > Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Fri Oct 6 13:03:49 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k96K3nGx020760 for ; Fri, 6 Oct 2006 13:03:49 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k96K1lIW014394 for ; Fri, 6 Oct 2006 13:01:47 -0700 Message-Id: <200610062001.k96K1lIW014394@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: [cs551] design Date: Fri, 06 Oct 2006 13:01:47 -0700 From: william@bourbon.usc.edu Someone wrote: > The look up is where i am having an issue, > let say i do all that > cache a request > wait for a response > get a response > do a look up > find that the message id match and needs to be sent out > but here is my problem, the message cache only has the message_id, which > is independent of the socket or connection it came from. > how does the dispatcher know which thread to call which is connected to > that neighbor to whom the message response needs to be forwarded to? You need to tag the message_id with the connection. I assume that your "message cache" is a collection of objects or data structures organized in some fashion (list, tree, hash, etc.) (If it's just a collection of message_ids, then it's not very useful.) So, you just need to add more members to the object or more fields to the data structure so that you can find the connection or neighbor Node ID. -- Bill Cheng // bill.cheng@usc.edu william@bourbon.usc.edu wrote: > Someone wrote: > > > As one of the possible designs, we can have all the listening thread > > create a message cache which holds the messages that needs to be > > responded back to. > > Now lets say there is a response to a message that was cached that > > arrives to the listening queue. > > Would the listener itself check weather the response is valid, in terms > > of there something waiting? > > You lost me in the last phrase... What do you mean if a response > is "valid"? > > > secondly, if the response is valid, how do we map the message response > > to the correct port/connection, since the message is independent of the > > sending threads. > > I'm not sure how you identify a neighbor. Let's assume that > you use the Node ID of the neighbor as an identifier. When > you get a request message that you may need to forward response > to, and this message came from your neighbor with X as its Node > ID, you need to tag the message ID with X. Later on, when you > get a response for this message, you need to *look it up* and > determine that you need to forward the response to X. > > The *lookup* will be much easier if there is only one message > cache. All you need to do is to lock the cache, do the lookup, > and release the lock. If your cache has many pieces, you need > to do lock, lookup, and release in all the caches. > -- > Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Fri Oct 6 12:52:41 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k96JqfmE020097 for ; Fri, 6 Oct 2006 12:52:41 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k96JodtD014231 for ; Fri, 6 Oct 2006 12:50:39 -0700 Message-Id: <200610061950.k96JodtD014231@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: [cs551] design Date: Fri, 06 Oct 2006 12:50:39 -0700 From: william@bourbon.usc.edu Someone wrote: > As one of the possible designs, we can have all the listening thread > create a message cache which holds the messages that needs to be > responded back to. > Now lets say there is a response to a message that was cached that > arrives to the listening queue. > Would the listener itself check weather the response is valid, in terms > of there something waiting? You lost me in the last phrase... What do you mean if a response is "valid"? > secondly, if the response is valid, how do we map the message response > to the correct port/connection, since the message is independent of the > sending threads. I'm not sure how you identify a neighbor. Let's assume that you use the Node ID of the neighbor as an identifier. When you get a request message that you may need to forward response to, and this message came from your neighbor with X as its Node ID, you need to tag the message ID with X. Later on, when you get a response for this message, you need to *look it up* and determine that you need to forward the response to X. The *lookup* will be much easier if there is only one message cache. All you need to do is to lock the cache, do the lookup, and release the lock. If your cache has many pieces, you need to do lock, lookup, and release in all the caches. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Thu Oct 5 09:45:00 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k95Gj01u013423 for ; Thu, 5 Oct 2006 09:45:00 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k95Gh2l3027608 for ; Thu, 5 Oct 2006 09:43:02 -0700 Message-Id: <200610051643.k95Gh2l3027608@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Msg id format question Date: Thu, 05 Oct 2006 09:43:02 -0700 From: william@bourbon.usc.edu Someone wrote: > The spec says we need to log only the last 4 bytes of the msgid. > If the id i is 0x11223344556677889900AABBCCDDEEFF10203040 then > what should be the last 4 bytes? It's the 8 ASCII characters at the end of the hexstring. > In this example, what item should be in the array index 0? This is the same as warmup #1. The first byte (0x11) is in array index 0. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Thu Oct 5 09:43:20 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k95GhKjX013284 for ; Thu, 5 Oct 2006 09:43:20 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k95GfMbj027567 for ; Thu, 5 Oct 2006 09:41:22 -0700 Message-Id: <200610051641.k95GfMbj027567@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Project question: msgsize Date: Thu, 05 Oct 2006 09:41:22 -0700 From: william@bourbon.usc.edu Someone wrote: > So it is the length of the complete message (not limited > to the header size), right? Yes. -- Bill Cheng // bill.cheng@usc.edu ----- Original Message ----- From: Leslie Cheung Date: Wednesday, October 4, 2006 9:28 pm Subject: RE: Project question: msgsize To: cs551@merlot.usc.edu > Someone wrote: > > > The spec says (page 11) "The field should account for the > message > >header". The size of the basic message header is 27 bytes. Is > this is > what we > >need to consider? Could you please clarify? > > I am assuming you are talking about logging. > > In the log, the field should be the size of the message, > includingthe size of the header (27 bytes). For example, in a HELLO > message to > "nunki.usc.edu", the size of the message should be42 bytes (27 > bytes header > + 15 bytes data). When you log the message, you should print "42" for > , and not "15". > > --Leslie Return-Path: william@bourbon.usc.edu Delivery-Date: Wed Oct 4 21:38:14 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k954cErR032133 for ; Wed, 4 Oct 2006 21:38:14 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k954aIem021366 for ; Wed, 4 Oct 2006 21:36:18 -0700 Message-Id: <200610050436.k954aIem021366@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Project question Date: Wed, 04 Oct 2006 21:36:18 -0700 From: william@bourbon.usc.edu Someone wrote: > Do we allow the users to enter commands as soon as the system > starts up? Or wait for the initialization to complete (For beacon > nodes, it establishes the required connections, For normal node, > it completes the join or participation)? Please see my message with timestamp "Sat 30 Sep 09:40". In addition, for a regular node, if it's joining the network and you've decided to give the user a command prompt, you can simply print a busy message. Actually, you have many other choices here. You can hold the user's command and wait for the node to start participating in the network and then execute the command. You can abort the command and say that the node has not joined the network and ask the user to retry later. Or you can not give user the command prompt. Although I'm not sure if the last one is a good option since a node can be joining the network because CHECK failed and you have already given the user a command prompt and you cannot take it back. The bottomline is that the spec doesn't say what you must do. So you need to decide on something reasonable. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Wed Oct 4 13:27:41 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k94KRfOJ001029 for ; Wed, 4 Oct 2006 13:27:41 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k94KPkvi017219 for ; Wed, 4 Oct 2006 13:25:46 -0700 Message-Id: <200610042025.k94KPkvi017219@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: [cs551]: SHA1 Date: Wed, 04 Oct 2006 13:25:46 -0700 From: william@bourbon.usc.edu Someone wrote: > Can the first byte of the sha1 msg digest be all zeros? Yes. > in other words, Is the following a valid UOID : > " 0 62 c2 55 9a 95 c9 19 54 d6 e6 37 c2 6 5a 5a d0 88 ac 52" > (I got this by calling SHA1() on some arbitrary string) Yes. But when you write things down in the "hexstring" format (like in an e-mail message or when you log things), you must use two characters for every byte. Therefore, you should have written: 00 62 c2 55 9a 95 c9 19 54 d6 e6 37 c2 06 5a 5a d0 88 ac 52 -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Tue Oct 3 10:17:26 2006 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k93HHPwJ026073 for ; Tue, 3 Oct 2006 10:17:25 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k93HFZ1Z001933 for ; Tue, 3 Oct 2006 10:15:35 -0700 Message-Id: <200610031715.k93HFZ1Z001933@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: [CS-551] Part 1- questions on logging Date: Tue, 03 Oct 2006 10:15:35 -0700 From: william@bourbon.usc.edu Someone wrote: > I've accumulated a few Part 1 questions/clarifications on the > logging format: > > 1) should