Analysis of Design Choices
Jeffrey K. Brown
I was faced with a dilemna. I knew I needed a socket server, a database, a telnet interface and a web page interface. The question was one of how they fit together. I came up with three possibilities and thought about them at length. I decided to diagram them and discuss them with Professor Sonderegger to hear her opinion on them. In the end, I decided upon Design 3.
Lets take a closer look at the three Designs.
In this approach, the web interface would directly communicate with the database. The telnet interfaces would talk to the Socket Server, which would maintain the connections and also talk to the database on behalf of each connection. This was my original idea, but I decided against this choice for two main reasons. First, because the web interface talked to the system one way, and the socket server interface talked another way, I would have to implement each command twice. This double coding to satisfy both interfaces proved to be the biggest turnoff. Secondly, the tons of hits to the database may impact performance.
Design 2 attempted to overcome the double coding shortfalls of Design 1. The web interface and the telnet interface would both communicate directly to the database, like before. The difference would be that there is a third "server-type" element called the Parser. The Parser would read the Input Table, which is populated by the user input coming from each interface. The Parser would then translate the input into the appropriate output table and then the Web interface and Socket interfaces would query the output table for some output and produce it for the users when it appears.
I liked this approach very much, because it provided a standard approach for either (and other) interfaces. In the event where someone would like to run a talker without a web interface, or a web interface without a socket interface, this would be great. Of course, the shortcoming to this would be the database hits. There would still be lots of them.
Design 3 is the simplest one. The web interface would be achieved using a combination of Java Applets and socket communication, while the Telnet interface would work the way it usually does. The web interface would have to send special input codes so that the socket server realizes that it is a web interface talking rather than a socket interface, so it would send data parsed in that particular way. Because the communication is not handled by the database, our database acecsses are no longer a problem. We will still use the database for user and environmental data.
Now that I have decided upon a design strategy, I can begin implementing the design.