Java Reference
In-Depth Information
BasicServer server # new BasicServer(
new PersistentDB(conneciton));
StubFactory factory # new StubFactory(server);
( new Thread(factory)).start();
// instantiate the client components
CounterFrame counter # new CounterFrame(
new SocketProxy("localhost"));;
BarCodeReaderUI reader # new BarCodeReaderUI();
The reader can extend the supermarket support system in several ways:
Add the monitoring interface to the supermarket server.
Adapt the system to a web-based interface, consider the increment in
network traffic and the scalability limits.
Use RMI instead of sockets as a communication medium.
Architectural model . Since the nodes are client, server and database, the
architecture selected for the application is a three-tier model.
Paradigm . The components that represent the three tiers of the archi-
tecture should be loosely coupled. This suggested an approach based on a
declarative communication paradigm. The communication between the
client and the server tiers is based upon an application-specific protocol,
which has been designed ad hoc. The interaction between the server and the
database uses the JDBC standard protocol.
Technology . The application-specific protocol uses the socket technol-
ogy. It is based on a TCP
IP connection between client and server; this type
of connection guarantees the delivery of packets, thus relieving the applica-
tion protocol of this issue. Access to the database is based on JDBC, which is
a standard protocol supported by classes in the standard Java library.
Search WWH ::

Custom Search