Second assignment is out

Second assignment is about coding a simple web proxy. No local storage (no cache handling). Just a simple iterative server but with a twist: As you need to read from two streams (request and response) you have to figure out the best way of doing it.

Only GET method is permitted, so you can safely reject any other method coming from the browser (to keep things as simple as possible).

You can click on this entry title to get the assignment text. Second assignment due date is December 23rd, 2009.

Haven't read RFC 821 yet?

Please note that some of you are doing assumptions for assignment#1 that do not match the protocol specification. I want to bring your attention to page 4 of RFC 821 where MAIL FROM and RCPT TO commands syntax is shown. Please note there is not a space between the colon and mailbox name. Do not confuse that with what appears inside the message header (From: and To: headers, where a space is found).

Click on the image on the left to get a better view of it.

Issues with Assignment#1


Apparently there are some difficult statements on the assignment text (given the submissions I'm getting). Let me repeat some of them here (pasted from original document, boldface added here):
  1. Please include a MANDATORY comment on the source code with your name.
  2. Please send me the java source code file by email to the email account shown here with
    EXACTLY the subject: Assignment#1
  3. Each time your server receives a message it will write it down to a text file named "received.txt".
  4. Main class name MUST BE SmtpServer.

In case you have not noticed it, I was using UPPER CASE to remark that these were IMPORTANT information.

Class code

Thrusday's class source code below:

How to write to a text file in Java?

I would suggest you to use PrintWriter class to write to a text file the same way you'll print to a socket. In the below example object out is created so later on out.println("whatever") can be invoked.

PrintWriter out = new PrintWriter(new FileOutputStream("received.txt"));

Friday's code

You can click on the title to get the code I typed in the class today.
 

Office hours change

I've changed office hours due to agenda conflicts. You can see below the new office hours.

Lab#2

This week lab#2 starts. You can get the lab text from this page file repository (or by clicking on this message's title). On the other hand, it has been a subtle change about lab's local storage: Now your home directory is set to your own private network storage. So, contrary to what the lab instructs you to do, you can keep the lab folder if you want.

This lab is about using sockets from the command line interface (CLI). FTP protocol is also presented here.

 

Java Network Programming


There are many good sources to learn from. But I think the best advice I can give you is that network programming is like riding a bike: you learn by doing it.

While on the campus network you can access a huge collection of Safari Books Online. A relevant one is this one.

But among many online resources, the Java Tutorial is worth trying. They even have a Sockets section you may enjoy reading.

Please remember that Java is free and open. You can easily download JDK to your system, so you can both compile and run any examples. I encourage to do so.

First assignment


I've published the first assignment on our file repository. If lazy, just click on this entry title.

You have till Nov 20th, 2009 to turn it in. Remember that while optional, assignments will count to your final mark.

Those from foreign universities can use a programming language different than Java.

I'm providing you a sample server binary that, hopefully, will work. You can run it by typing
java SmtpServer

Update:
There is been already one submission.

Lab Blues


I failed to mention that there is a self-assessment test at the end of each lab session. Unfortunately these exams are only available in Spanish. The good news is that you can safely skip them. It is ok if you do them too. It is ok if you provide random answers too.

The real assessment for the lab exercises will happen in the written exams, where 30% of the mark will come from questions about the labs. Please note other students (not the English one) have a different policy regarding the lab tests (these being mandatory). Please note the teacher in the lab may not know you're from the English group.

I am sorry I did not mention that before but please remember last week we did not have lectures of RED.

Fiber optics Nobel prize


It is said that success has many fathers.

Charles Kao, one of the fathers of fiber optic technology has been awarded this year's Nobel prize in Physics. The prize is shared with two other notable physicists.

This gives you an idea of how important fiber optic technology is.

Odd week


As you know next Friday is a national holiday. Next Thursday, however, it is not a holiday. But, in order to balance the number of weekdays next Thursday will be like a Monday regarding to lectures' schedule.

So to make a long story short: This week we won't have RED lectures.

September marks

Just in case you've not searched for them on the usual place, here you have September marks. They will become official by the end of this week.

Sorry, former link was not public, it should be fixed by now.

Some ideas if you bring your laptop to the lectures

A former student, Ismael, mentioned that some students found interesting to use software for adding comments on PDF slide files. Apparently PDF-Xchange Viewer (for Windows) and Skim (for OS X) can do the job (for free).

Of course this may only be interesting for those of you that are bringing a laptop to the class. But, time-proven technology, like paper and pen, can be very useful tool too.

 

Welcome to the 2010 class of RED


We'll use this blog for posting interesting data about the subject, slides, laboratory exercises, solved exams, assignments and marks.

Contrary to PoliformaT this blog is open to anyone, whether you are enrolled in the subject or not (or not yet).

Feel free to use the comments on any topic to ask questions or to make any comment you think it is appropriated.

Please note the "File Repository" link on the top right side will lead you to a Google site with (hopefully) all the required files related to the course.












Let's keep in touch

While I do know some of you are going to stay around for a while, others are already back to your home country. Because many of you are using the university provided email, contact will be lost as soon as your account has expired.

You still can reach me on Facebook or Linkedin networks, and I think it is a good idea to keep the link on. Sometimes you may need a recommendation letter or discuss any technical issue. Other times I may ask for some traveling advice. Who knows.

So farewell and see you online.

Challenge your programming skills

The new edition of Google's CodeJam contest is about to start. While you won't get any points on this subject, it can be fun and you can also get some cash!

Summer reading

I've found this article on Tom's hardware website quite interesting to read.

Spicing up your marks

After some changes on the marking due to your requests, marks have been adjusted so all the available range of the pass mark is covered. As a result some of the marks actually crossed the fail/pass border and those of you affected will be pleasantly surprised. Still some of you did not make it and you will have to come back in September for another exam. Please note the exam "algorithm" will be the same as in June: You can take 1st term, 2nd term or both exams.

REDES-2008_09