Simplicity is Beauty

        Simplicity is Beauty

Important:

The lab time has changed!

The lab on Tuesday has been moved to Thursday and the two combined lab time slots are changed to:

Thursday 18:20---21:10  H929

กก

1. To check day to day events, go to blog file.

2. To check RMI faq, go to RMIfaq.

3. To check CORBA faq, go to CORBAFAQ.

4. To check common mistakes in your assignments, go to commonMistakes.

5. To check those simple quick tips about project, go to projectFAQ.

6. About demo and report. Please download demo sheet here and fill in the form and mail back to me.

A letter from me about marking of assignment:

As I explained in previous mail, I am really in a rush in order to give you the feedback
before you finish assignment 2. So, there are quite a few mistakes in some of you. Please
send in email with title of "marking error of assignment 1". Otherwise they maybe drowned
in the oceans of mails in my mailbox. And please allow me a few days more to handle this
issue because I am already behind my own schedule on some issues. And for those who had already sent the mails,

please DO NOT re-send them.


Besides, I should say maybe somebody feel unhappy about my marking and feel the marking
is too harsh in some aspect. And I try to explain my scheme like this:


1. In requirement of assignment, it is said it will be based on correct mutual exclusion.
So, I have to put this in highest priority because this course is not concentrated on
common program design. And if your assignment shows no sense of synchronization at all, I
will consider it is basically incorrect.

2. The original mark distribution in requirement is 35% for report and 35% for
implementation. And please check website that "screen shot" are explicitly required to be
part of report. Somebody complains about this by saying that in no course he took in
concordia places "screen shots" in such high priority or whatever. OK, let me tell my
small story happened in "compiler design". When I submitted the first assignment with
report and I was suprised to see my low mark because of lacking testing cases. I
complained this with professor on marker's marking. And professor answered me with both
harsh email and anouncement in class like this. It is your responsibility to let marker
to know the correctness of your implementation. It is your skill to allow other people
within less than ten minutes to understand what you have worked hard for ten hours.
Otherwise what is purpose of a report if other people need to spend same amount of time
to figure out what you have done?
I hope this explains something beyond this course or report or test cases.

3. As for distribution of mark, I have to say in concordia, the absolute mark never means
too much in computer science department. What means too much is the relative position you
are in. Unfortunitely I notice that there are quite a few, say nearly 1/3 of class are
advanced students. Personally I feel lucky I finished this course in winter instead of
summer when people who have real industrial experiences are taking courses in concordia.

At last wish you good luck and thank you for the guy who wrote to me an anonymous email
with most "outrageous" words. Personally I understand your situation. However, as for the
CAD2700 you lost to concordia, I want to say, it has nothing to do with my marking. Even
though I give you a good mark, you are still probably to fail in midterm or final.
Anyway, I am sorry to disturb everybody with this newsgroup with my personal issue.
Thank you,

qingzhe huang
TA & POD
กก

  1. How?   
  2. Where?
  3. Why?
  4. Who?
  5. What?      
  6. When?
  7. Example code
  8. RMI FAQ
  9. CORBA faq
  10. commonMistakes
  11. The mark of assignment one.

How?

1. synchronization.

2. java vs c++ (These are some crazy tips only for those who are using java for the first time.)

3. I made a simple tutorial slides of synchronization to explain the issue more easily.

4. Some noticeable synchronization issues in web service.

top

Where?

1. Where can I get help?

Search your question in www.sun.com or send your question to qingz_hu@cs.concordia.ca

top

Why?

1. Why should I use synchronization?

Because you are writing non-trivial server instead of baby toy UI program and if you don't handle this issue properly you

may run into big troubles.

top

Who?

I am TA and POD of comp6231 in summer of 2006.  My name is qingzhe huang and you can call me either huang or nick.

And you can reach me by email: qingz_hu@cs.concordia.ca

top

What?

1. What are you expected to do?

a) You are supposed to write a server which satisfies the general properties of server like concurrency, high-performance, deadlock-free etc.

b) You are supposed to demonstrate by a design-choice report indicating how you design to achieve these goals.

c) You are supposed to implement by a program to achieve these goals.

d) You are supposed to write program to demonstrate that you have achieved these goals.

e) You are supposed to show me the result of your demo program.

2.  What exactly do I expect to see?

1. A bunch of source code files. Please follow the general requirement for programming style such as well-commented, meaningful variable naming etc.

2. A design choice report. In the report, it is better for you to specify what is your concern about the design issue of server. For example, concurrency and high-performance are always the priority of design of distributed system. What kind of design makes you believe you can achieve these goals are always the shining point in report. However, no matter what kind of good design you must fulfill a basic requirement first. That is correctness. A server which cannot handle basic problem in distributed system would never be much useful. For example, a server is usually running in a multi-threaded environment and proper synchronization is the basic requirement for design and implementation of the server system. And pointing out exactly where you need to do synchronization is a preferable way.  However, it is also not a good design by sacrificing performance with too many unnecessary synchronizations. i.e. The general principle for critical section is as short as possible. Also in the design report, you should attach a series of snapshots of running results of your program to show that they are doing what you design to do. (Let's say, place those pictures inside your report.)


3. A simple "readme.txt" to specify how to compile or run the program if there is anything unusual you want to mention. For example, if you setup any "environment variable" etc. Also if the design of your menu is not easy to understand, please give some explanations because I may randomly choose some of them to compile and run to check result.
กก

top


When?

POD time slots:
1. -T---- 20:30-22:00  in H-929     (will share with comp 471 lab)
2. ---J-- 17:30-19:00  in H-929
top

กก

Example code

1. synchronized_trap
2.  ShapeList example modified
3.  How to write objects into file.
4. How to make return value as self-defined class.
5. Is java Vector methods thread-safe? The answer seems yes.
6. Is C++ vector template methods thread-safe? The answer seems no.
7.  Hello CORBA
8.  Which one is safe? Which one is unsafe? (Hashtable, Vector is safe; TreeSet, ArrayList is unsafe.)
9. Which one is safe (continued)? I tested HashMap and it is also thread-safe. No it is NOT thread-safe! See modified code in which I increase 
	the number of threads to 100 and the program crashes when retrieving from HashMap.
10. I should have posted this example long time ago, but I just messed up my examples. This shows a demo of how to r/w record with fixed length.
11. Reference or copy? This is a critical issue you have to face.
12. Synchronized is for "instance-level" not for "class-level".
13. Single-threaded TCP ServerSocket handling transaction example.
14. A testing program I used before.
15. How to use naming service to store host name and port number of brokers? Download and run.bat which will compile and run the demo.
top

(C)2006 Qingzhe Huang