Solved 1st term exam

Already available, just follow this link.

Marks will be available in a few days in this same site as an update of this post.

Update: Exam marks are available in the same link as the attendance pages. Please note that solved exam contained a couple of errors that have been now fixed, just download a fresh version.

Second Update: It seems that some of you have trouble doing the math to know your current score, so now you have that numbers on the mark's page. I repeat what I explained the first day of class and it is detailed in Chapter0 slides.
mark(%) = attendance*10/classes + (9-assignments)*exam/10  +  assignments*10  + lab
The underlying logic is that exam only accounts for 70% of the final mark if you pass two assignments, 80% if you pass one assignment or 90% if you did not pass (or did not turn in) any assignment. Also note that failing on an assignment has not any negative effect on your score.

The same logic will be applied to the second term marking and then, both marks will be averaged to obtain your final grade.

Please remember the pass mark is 50%, so if you score less than this you will have to work harder on the second term to pass the subject.

Lab exam is still being marked so it has not yet been accounted for.

Third Update: Now the lab mark has been included. Go and check yours!

1st term exam

To be held January 30th, classroom B-5 at 10:00am laboratory exam.

For those of you who missed one or more laboratory sessions the exam will start at 10:30am. Duration two and a half hours.

Telegraphy vs. e-mail

It seems the fight is over.

Second assignment solution


It might not be the cleanest approach but I try to keep the line count low. You may download this server code that performs as required on the assignment#2 text.

What you may find weird is the fact that a timeout message is printed every 10 seconds when an upload is not taking place (therefore block number is zero). If you do not like this you can add an "if" sentence not to print that unless block number is larger than zero, but for me it serves as a sign that the server is up and running even when a file is not being received.

Second assignment marks

Ramazan, Anna, Manuel, Javier and Edgar have turned assignment#2 in. All of them have passed, though there are some comments, read on.

Some of them had the creative idea that a timeout event can stop the server. Let me tell you that "the show must go on" whatever it happens to the server. So you need to treat (catch) any exception that might cause the server to stop working.

On the other hand, I asked explicitly for the received files to be named in a certain way. Again some of you did not follow this part of the specification.

Edgar made the important observation that the performance when transmitting with this system is quite poor. And he also pointed out the cause: The use of a stop and wait protocol where the round trip time compared with the transmission time is quite significant.

Finally, to all of you that for any reason did not send me your work I want to encourage you to do it next time. I really think that assignment work can help you to improve your practical knowledge of network programming. Think of it like a little challenge and try not to follow the advice on this page.

Class attendance and assignments records

By following this link you can check a copy of the records I keep about both attendance and assignments so you can double check them. If you detect an error please contact me ASAP to get it fixed.

Please bookmark it on your browser so you can return to it easily.

Second assignment is out


As promised here you have the second assignment work that deals with UDP network programming. As in the first assignment, it is a client/server application. Again you have to program a small server that receives files from the client and writes them down to disk.

I have chosen an "invented" protocol as there are lots of Java code out there for many standard protocols (including TFTP). The good news is that I tried to keep it as simple as possible. The bad news is that my skills at writing the protocol specification are not on par with a good RFC. As usual, feel free to ask me any question you may have about the assignment.

Although I know you can copy and paste the client's source code from the PDF file, you can also find the source code file here.

First assignment results


I want you to know that Javier, Edgar, Aitor, Ana, Ramazan and Manuel turned in their work. Unfortunately, one of them failed to meet the problem requirements but the rest pass the test with flying colors.

Congratulations, not bad for your first networking problem.

Those of you that did not turn in anything please remember there are still three other assignments to come.

Network programming is like riding a bike: None of you learnt it by reading a manual, did you?

The many uses this blog


I was reviewing last year's posts and I realized that many of the posts are applicable now as we are going through the same chapters at the same time. So instead of reposting the same entries I invite you to check last year's entries along the whole course and there you'll find useful information, interesting links and related material.

Please note that assignments are different.

Class attendance record

These are the attendance numbers so far (out of 13 classes).





















Ayoub10

Aitor13

Martin9

Luis Manuel8

Edgar10

Carlos8

Erol1

Ramazan12

Jakub1

Roberto2

Ana6

Manuel6

Javier11

Taha9

Carlos S1


Please note that some of you are joining the class quite late. I understand that you may have other subjects too, but please note you'll need some effort to catch up with the class.

Sample IM server application

I've created a server application like the one you have to write for assignment #1.

You'll find it running on port 7777 on the IP address 158.42.53.17. If for some reason it is not accepting your connections, please let me now, as a power outage might have happened on my side and manual restart would be needed.

Please note that the messages about a new client entering the server or a client leaving the server are not required on your code. I've just added them to give users a bit more of information.

News and reminders

Since Nov 16th we will be back to the "Seminari Nord" room. I've just posted the text of the first assignment, and I want to remind you that --although it is optional work-- doing it right will be worth 5 out of 100 points.

You do the four scheduled assignments right and you already have 20% of the subject.

You come to all the classes and you have 10% more.

Still not enough to pass the subject (you need 50%) but closer ...

Just a word of warning: Assignments are personal work, not team work. Your code will be checked against all the other submitters. If a copy is found all the involved parties will score 0% no questions asked. It is in your best interest to keep your work for yourself.

As with any other doubts you may have about the subject, I'm available during office hours for helping you solving them.

Programming Assignment #1

Instant Messaging Server

Your job is to write a Java application that will act as a the server for an Instant Messaging application. Clients will connect to the server [using a TCP connection] to talk to each other. Clients will type messages that are composed of one or more lines of text. Each time a user types a new line of text at the keyboard, that line will be transmitted to the server.

Each time the server receives a new line from any client, it will send a copy to all the clients but the one who sent it (i.e. to prevent a confusing double echo on the sending-client side).

Any client that wants to abandon the service MUST type a line with the text QUIT. Whenever the server receives such a line of text it will interpret its meaning, closing the socket this client was using. From them on, no attempt to send any more data to that client will happen (note: trying to send data to an already closed socket would trigger an exception).

Still, a client could leave the service by just closing the connection without the mandatory QUIT command. You do not need to manage that case though.

Your Code

Your code has to conduct the following tasks:

  1. Accept any number of simultaneous clients, but it is safe to assume no more than one hundred simultaneous clients.

  2. Retransmit any text line, including empty lines, to any active client but the one typing that text line.

  3. Not to retransmit those lines which only contents is the QUIT command. Any combination of upper and lower case characters should be accepted and recognized (i.e: both QuiT and quit should work too).

  4. The server program prints “NEW CLIENT” whenever a new client connects to the server and it prints “CLIENT GONE” when any client quits the system.

Some tips

  • Server listens on port 7777

  • You may use several telnet windows as clients of your server (for testing purposes) by just typing;

telnet localhost 7777

Due date

Your Java source code has to be submitted by email (address available on the front page) by Nov 30th.

If you have any doubt about the assignment I strongly suggest you to stop by my office during office hours (posted on the web).

News


I mentioned in the class this sample server program.

Next class will be held on Aula Informática, on the ground level, see the plane (click on the image to get a larger view).

A bird's eye view of the Internet


There are several projects aimed to provide such a view. This is just one of them.

A tree is built connecting lower level networks. As you can see a huge hierarchical view is shown, and that is just part of how it was the Internet some time ago as it is evolving on a daily basis.

Changing location

During the two first weeks of November we will have our classes in the "Aula Informática" so all of you can try for yourself with a networked computer how things really work. This will be from November the 2nd till November 10th.

FYI: For Your Information

Any submission to the IETF intended by the Contributor for publication as all or part of an IETF Internet-Draft or RFC and any statement made within the context of an IETF activity is considered an "IETF Contribution". Such statements include oral statements in IETF sessions, as well as written and electronic communications made at any time or place, which are addressed to:
  • the IETF plenary session,
  • any IETF working group or portion thereof,
  • the IESG, or any member thereof on behalf of the IESG,
  • the IAB or any member thereof on behalf of the IAB,
  • any IETF mailing list, including the IETF list itself, any working group or design team list, or any other list functioning under IETF auspices,
  • the RFC Editor or the Internet-Drafts function

All IETF Contributions are subject to the rules of RFC 3978 and RFC 3979.

Statements made outside of an IETF session, mailing list or other function, that are clearly not intended to be input to an IETF activity, group or function, are not IETF Contributions in the context of this notice.

Please consult RFC 3978 for details.

Welcome to all of you

I've just returned from a trip to a Finish university and I've discovered there are thrity eight people enrolled on the subject this year. This is definitely our best score ever and I just hope most of you will actually stick to the English group (I'm afraid that some of you might have ended in this group because other groups are full).

I'll see you all on Thursday,

Miguel