Chair for Applied Software Engineering Lehrstuhl für Angewandte Softwaretechnik

Home  |  People  |  Projects  |  Teaching  |  Publications  |  Internal  |  Changes  |  Index Software Engineering  |  Search
The main class is the ServerManager? class which handles the transports. I assume that we have 2 different types of transport: a ISDNTransport which can handle the calls from the mobile phone (or UMTSTransport depending on the possibilities) and a TCP/IP Transport which handles the connections from the PC.

The transport uses the Factory Design Pattern to build new Connection Objects.

My Transports would use a event interface with callbacks (since there can be only one listener, so no observer pattern is needed) to notify the listener of incoming connections, errors etc.


The next thing is the Directory which can be used to lookup users. Lets assume we have a mobile phone which calls a phone number registered with our server. The manager would then lookup the user corresponding to the number from the directory to get his IP address and establish the connection.


A connection represents a physical connection to a remote location and works on binary data. To abstract the connection to a phone or a SIP client, a proxy pattern is used (SIPProxy and PhoneProxy?). The proxy then uses the connection to send the data to its destination.

It is important to note that a connection is not always a participant in a conference. The SIP protocol for example establishes a connection before, to receive incoming calls etc.


As soon as the ServerManager? receives a incoming request for a conference, it creates a new conference object and adds the participants as needed.

The participants in the conference use a observer pattern to get notified of changes in the state of the conference (end etc).

Each participant uses its own specific video and audio codec, so a strategy pattern is used to decide which codec is used. Futhermore, another strategy pattern is used to decide which codec converter to call if different codecs are used on both sides.


Some pseudo code of important functions:

main():

ServerManager *manager = new ServerManager();

ISDNTransport *isdn = new ISDNTransport();
isdn->initialize();
manager->addTransport(isdn); //This would set the event callback

TCPTransport tcp = new TCPTransport
tcp->initialize();
manager->addTransport(tcp); //This would set the event callback

Directory *dir = new Directory();
dir->load();

/* Now we can enter the main event loop for the
manager */
manager->run();


The event callback code of the manager could look like this:

void transport_event_callback(Transport *tsp, Connection *connection, TransportEvent event)
{
   switch (event) {
      case NEW_CONNECTION:
         /* Append connection to list */
         tsp->addConnection(connection);
         /* Update the directory if necessary 
         (with the new IP Address for example) */
         tsp->manager->updateUser(connection);
         break;
      case ERROR:
         //handle error
   }
}


The event callback of the connection:

void connection_event_callback(Connection *connection, ConnectionEvent event)
{
   switch (event) {
      case DISCONNECT:
         /* Inform manager and conference*/
         break;
      case CALL:
         /* incoming conference call. lookup
         the called number in the directory and
         establish conference */
         break;
      case DATA:
         /* incoming data from the connection.
         send this to the conference for conversion etc                */
         break;
      case ERROR:
         //handle error
   }
}

-- ArminBauer - 15 May 2006 * DesignPatternsUML?.jpg:
DesignPatternsUML.jpg

Show attachmentsHide attachments
Topic attachments
I Attachment Action Size Date Who Comment
elsejpg DesignPatternsUML.jpg manage 89.2 K 06 Dec 2006 - 16:14 ArminBauer  
elseVSD DesignPatternsUML.VSD manage 178.5 K 06 Dec 2006 - 16:14 ArminBauer  

 

Lehrstuhl: ArminsDesignProposal .
Edit | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r1 | More topic actions
r1 - 15 May 2006 - 13:11:42 - ArminBauer
Copyright © 1999-2008 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding the website? Send feedback