The design of the network communication is inspired by RMI and relies heavily on the use of proxies, abstracting the actual network communication from the application programmer. We have emphasised that the design uses interfaces heavily, and designed the interfaces so it is easy to extend the system with more efficient implementations.
We use UDP as the underlying network protocol, since UDP saves network resources and avoids the expense of setting up connections. The central class of the network communication is UdpTransmitter which handles all network communication, including fragmentation and exception handling.
We use the classes in package edu.it.xmlstore.rpc.udp, and the relationship between these classes is shown in the following figure:
When an XmlStoreServer A wants to invoke a method on another XmlStoreServer B the following steps occur:
The above steps are illustrated in the following sequence diagram:
The UdpTransmitter contains a number of inner classes and uses a constant number of threads for handling the network communication of the XML Store. The following sequence diagram depicts the send method of the UdpTransmitter: