Our Logo  

Distributed Systems Lab 2003


Home Page
News & Feedback
Lab Organization
Lab Environment
Task Description
Overview
Lab 1
Lab 2
Lab 3
Lab 4
Certification Authority
WWW Tutorial
HTTP Tutorial
FAQ
Downloads

Welcome to the real stuff


Once you read through the organizational section and feel comfortable with the lab environment (or finished downloading and setting up the environment at home), this is the section of the homepage you'll spend most of the time with ;) It provides an overview of the ShareMe system, which you have to implement, and details on the four mandatory tasks to achieve this.

By now you should

  • have checked that you use the Java version 1.4.1 by executing java -version ,
  • if you do not use the provided build.xml file : have set your CLASSPATH correctly (i.e., to include all the necessary *.jar files) and set the JIKESPATH environment variable if you decided to use jikes (see the description of the lab environment for details.),
  • know where to find the Java Tutorial and Java API documentation on the Web or on your local machine - you'll definitely need them,
  • have read the Lab organization section to be familiar with the grading scheme and the deadlines,
  • know how to operate your editor (vi, emacs, or anything else), and
  • understand the information presented in the lab environment .
  • You can also read the overview before continuing here ... or you simply read it after finishing this page.

How to get HELP!

Whenever you have the feeling that something is going wrong, you don't understand a word, feel lost, the others are talking about things you don't have a clue about, or worse ...

DON'T PANIC!!

Probably, everybody else feels much the same way you do. So,

DON'T PANIC!!

Here are some good rules for such situations:

  1. Calm down, think it all through again and make sure you did not just forget a small detail (e.g., to re-compile your source code, use the correct host names and ports, etc.).
  2. Ask the guy/girl next to you (this does not mean to copy his solution or do it together) - but it is okay to get help!) or to ask one of our tutors .
  3. Use the newsgroup: maybe someone else already came across the same problem and has the solution for you. To make this work, also help other students by answering their questions! Also the tutors and assistants will answer questions in the newsgroup - this may take a day or so, but then you should get help. Remember though: postings in the newsgroup are welcome, BUT make sure you have checked previous postings in order to not to ask questions that have already been answered. Also NEVER post your FULL source code to the newsgroup in order to illustrate a problem!! Only include the necessary statements to describe your problem.
  4. If you tried all of these steps and still feel as described above, contact one of the assistants via email. This should really be the last resort because our time is also limited.
  5. If you reach this step, go back to step #1.

The ShareMe project structure and the lab package

If you are working in the lab, the development structure is already set up for you. If you are working at home, download the full lab package from the download section and install it as described in the working mode section . You'll then have four directories created for you: the src/ directory, the classes/ directory, the lib/ directory and the resources/ directory.

The src/ directory

The source directory will contain all the Java source files you create. All your files will use the package prefix at.ac.tuwien.infosys.rnue.implementation and must be stored in the src/at/ac/tuwien/infosys/rnue/implementation/ directory and its subdirectories. This is important because otherwise the Jikes compiler and the submission roboter will not work correctly!

You'll implement a total of four subpackages according to the four lab examples. To make sure you really understand what we mean, here are the full names of the packages.

  • Lab 1: Multicast ( at.ac.tuwien.infosys.rnue.implementation.multicast )
  • Lab 2: Searching ( at.ac.tuwien.infosys.rnue.implementation.search )
  • Lab 3: Security ( at.ac.tuwien.infosys.rnue.implementation.security )
  • Lab 4: HTTP ( at.ac.tuwien.infosys.rnue.implementation.http )

If you do not use the provided build.xml file (where this is done for you), make sure that you always specify the classes directory as target directory of any compilations. No *.class files should reside outside the classes/ directory (see below).

Since the src/ directory is what you'll submit for grading, please be sure that nothing else but source files are stored there. Otherwise your submission will not be accepted.

Hint: It proved to be useful to create a backup of your sources after every task you implemented! You definitely should make a backup after every lab submission - before you continue implementing the next lab!

The classes/ directory

This is where your compiled Java classes must be stored. Again ensure that they obey the package structure (i.e., the class at.ac.tuwien.infosys.rnue.implementation.search.SearchEngineImpl has to be compiled to the classes/at/ac/tuwien/infosys/rnue/implementation/search directory. Check the build.xml file to learn how this can be done.

The resources/ directory

In the resources directory, you'll find two files: the property file which is the central configuration file for the ShareMe system and the interface definition language (IDL) file which is necessary for the CORBA part of lab 3. The property file is only a template and has to be edited by you in the course of the lab implementation. Although you don't have to write the CORBA IDL file on your own, we strongly encourage you (also with respect to the test) to take a close look at it. You should be able to design a similar IDL file on your own!

The lib/ directory

The lib directory contains the ShareMe.jar library which contains all the necessary interfaces, many helper classes and the implementation of the DSG certification authority. Full Java documentation for these classes is available in the ShareMe API documentation .

The build.xml file

The build.xml file acts as input for jakarta-ant, a Java Makefile replacement. It defines compile targets for all labs including the necessary CLASSPATH settings. If you are not familiar with ant, you can find more information in the Linux Tutorial .

The property file

The property file is the central configuration file for the ShareMe system. We provide a template of this file in the resources/ directory. In the following we briefly describe the information stored in the property file:

  • ShutdownPort : this port is used to listen for shutdown messages. Make sure the port is not in use - a good choice is 7000 + 5 * {your account number}.
  • ShutdownPassword : you have to supply this password to successfully shut down your implementation.
  • MulticastAddress : this property is fixed ( 224.0.0.1 ) and denotes the address of the ShareMe multicast group.
  • MulticastPort : the port is also fixed ( 10000 ) and is the port on which the ShareMe peers communicate.
  • RMIRegistryPort : the port on which your RMI registry will be listening. Again, a good choice might be 7001 + 5 * {your account number}
  • RMIServiceName : the RMI service name of your ShareMe implementation (arbitrary).
  • HumanReadableName : a human readable name for your ShareMe peer.
  • ORBHost : a fixed value ( corba.dslab.tuwien.ac.at ) indicating the host on which the CORBA ORB will be running.
  • ORBPort : a fixed value ( 10050 ) indicating the port on which the ORB is listening.
  • KeyFile : specifies the name of the keyfile which is used to store your public and private keys.
  • FileBase : identifies the directory which contains the files you want to share with others.
  • DocumentBase : defines the directory which is used as document root for the Web server you'll implement in lab 4.
  • HTTPServerPort : the port on which your HTTP server will listen for requests. A good choice could be 7002 + 5 * {your account number}

You will gradually fill the property file with values when implementing the lab examples. If you work at home and want to start more than one instance of your ShareMe system, you have to provide a separate property file for each of them. Also make sure that you adapt the property file to your local environment, e.g., replace the ORBHost property with localhost .

Hint: If you are working under Windows, you have to escape all '\' characters in the property file (e.g., for the file and document base). This means that you have to use '\\' instead.

Source code documentation

The only important thing to remember is that source code documentation is mandatory (!) and not optional. We do not require you to write full JavaDoc documentation for your code (actually we think it is better to invest your time in solving the lab examples, playing cool computer games or do some other fun activities). But some documentation such as a short explanation of what the class does or how a critical section works is necessary and will influence the grading!

Command Line Output

Yes, you can use arbitrary command line output for debugging and/or testing your application. However, you must only use System.out.println() and System.err.println() . Do NOT use System.out.print() - this would mess up the submission roboter and grading scripts!

Important Requirements

This paragraph lists some rules you have to stick to in all your implementation work. If you do not comply with these requirements, we won't grade your submissions!

A word of caution!

As stated in the lab organization section, we will rigorously discard identical (or suspiciously similar) submissions and you'll get no points! If you feel that you are not treated in a fair way, you have the possibility to defend your submission in front of a jury of DSG members. The evidence, however, usually speaks for itself.

We strongly recommend to solve the examples on your own and - yes - help others. But don't give them your source code or copy from them! A submission defense in front of the DSG jury is usually no fun (especially not for the student!). Mind you, 'typical' excuses such as 'we worked together', etc. will NOT be accepted.



Powered by MyXML Last update on: 2003-03-13
© 2001 Distributed Systems Group