辅导案例-2805ICT

欢迎使用51辅导,51作业君孵化低价透明的学长辅导平台,服务保持优质,平均费用压低50%以上! 51fudao.top
2805ICT: System and Software Design
3815ICT Software Engineering
7805ICT Principles of Software Engineering
Workshop 06
Vladimir Estivill-Castro
Larry Wen
August 25, 2019
Objectives
1. Understand and practice the fundamentals of a client-server architecture.
2. Identify the roles of a server and a client in a client-server architecture.
3. Identify the software structure (multi-threaded) server that attends several request simulta-
neously, and a server that attends to only one client at a time.
4. Discuss the issues regarding vulnerability of recent systems like the Amazon Echo.
What you should submit
A PDF file with enough evidence that you have completed the corresponding activities; in some
cases, you will be asked exactly what is required (a paragraph, a sample exam question). For
others, you will be required to complete a tutorial or execute a program with a slight modification.
You should include screenshots illustrating different levels of progress in achieving the activity
and indicative of your own work (the modified program print your name and student number for
example).
Client-Server Architecture
Activity 1 Study the short entry in Wikipedia for the “Client-Server Model”en.wikipedia.org/wiki/Client-server_model
1
Figure 1: The settings so the class SingleSocketServer has a configuration (named
Server in NetBeans) to compile the server which has a main method and becomes an ex-
ecutable program.
Activity 2
Implement a Java client and a single-response Java server by following the tu-
torial by Rick Proctor titled “Sockets: Basic Client-Server Programming in Java” (
edn.embarcadero.com/article/31995 ).
This is not meant to be a comprehensive introduction to computer networking, but should
be explanatory enough. The exercise is illustrative that in a client-server architecture there
are at least two programs, one (or many) client(s) and one (or many) server(s).
Our recommendation is that you build this using an IDE like NetBeans (netbeans.org).
You can build both (client and server) under the same project. Edit the project properties
to configure two run configurations, so you can work and compile both at the same time
when working on a single computer (the exercise by Rick Proctor works all on a single
computer identified as the localhost). See Figure 1 for the setting of a configuration
for the SingleSocketServer.
Activity 3
Experiment with the code of the previous activity, For example, run the client alone with-
out the server running. In fact, we recommend that you build the client with the option
Clean and Build Main project. This will build a jar file for the client that
you can run from a terminal window with
java -jar ClientServerTutorial/dist/ClientServerTutorial.jar
Experiment commenting code out. See what error you get (what do the catch blocks
return). Not that when you run this example, the server waits for about 10 seconds before
it issues a response, so you can observe the time stamp when the client issues the request
and when the server sends its reply.
2
Activity 4
We have modified the example above to create a client and a server that can communicate
across two computers. We have also modified the example so the server does provide
some service to the client. Check the code supplied with this workshop. Identify the dif-
ferences with the exercise above. You should inspect the code and also test the programs.
We have packaged as a NetBeans project already.
What is the service provided by the server?
Use the code provided and expand the multi-threaded server that answers to several clients
simultaneously to provide the same service but now accept multiple connections.
NOTE: If you try the server on one computer and the client in another there may
be some issues like the computers having different Java version installed and you
compile for one version not the host version, or they may be issues of firewalls block-
ing connections to ports (even you local computer may refuse remote connection).
Please be extremely careful if you modify the security and network setting of your
computer. We take no responsibility for any security loopholes you may create in
your own machines.
Security treats
Activity 5
Read “Alexa, are you listening?” by Mark Barnes (labs.mwrinfosecurity.com/blog/alexa-
are-you-listening).
Write a 300 word essay about whether this is a software engineering issue, a computer
engineering issue or both.
Additional exercises for 3815ICT and 7805ICT
These activities do not earn specific marks, thy enable the marking; that is, if they are not completed
the assessment item is awarded zero regardless of the performance in the previous activities.
Activity 6 Write 15 lines of a reflective report on the previous activities. Analyse and evaluate thematch of the activities to the learning objectives proposed in this workshop/laboratory.
Additional exercises for 7805ICT
Activity 7
Design an open ended question (that means there may be several correct answers) that
evaluates the learning objectives of this workshop and could be suitable for
1. a midterm, or
2. a final exam, or
3. a job interview for software engineering.
3
51作业君

Email:51zuoyejun

@gmail.com

添加客服微信: abby12468