next up previous contents
Next: Overview Up: Implementation Previous: Implementation   Contents


Choosing a programming language

The structure of the control architecture has been thought in such a way that each module can be represented as an object. The RSVP message formats also have an object philosophy: messages consist of a common header followed by a variable number of variable length, typed objects.

Therefore, an object-oriented programming language was particularly adapted to this project. I hesitated between C++ and Java for a long time. I had not done any real programming before in either of those two languages.

The advantage of C++ is that, like C, it is very fast: by using structures and manipulating data directly in memory (with the memcpy, memmove and memcmp functions), you get a very efficient program.

Although Java is not very adapted to low level programming, it does not have any problems with memory allocation, and programming is thus easier: since no segment violations can occur and since null pointer exceptions easily fixable, the debugging stage is much more quicker with a Java program than with a C++ program. The main drawback of Java is its slowness, because of the garbage collection and also because Java programs are byte-compiled.

Some of the advantages of Java that could be useful for this project were the native multithreading support and distributed programming facilities.

As I had a good knowledge of C and I wanted to discover Java, I finally chose to implement it in Java for educational reasons. Moreover performance was not an issue, as control operations are slowed down because of the open control of the network anyway.


next up previous contents
Next: Overview Up: Implementation Previous: Implementation   Contents
Hugo Haas
hugo@larve.net
July 1998 - Please note that this HTML version is broken; I advise you to read the PostScript version.