辅导案例-2805ICT
2805ICT: System and Software Design3815ICT Software Engineering7805ICT Principles of Software EngineeringWorkshop 06Vladimir Estivill-CastroLarry WenAugust 25, 2019Objectives1. 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 submitA PDF file with enough evidence that you have completed the corresponding activities; in somecases, you will be asked exactly what is required (a paragraph, a sample exam question). Forothers, 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 activityand indicative of your own work (the modified program print your name and student number forexample).Client-Server ArchitectureActivity 1 Study the short entry in Wikipedia for the “Client-Server Model”en.wikipedia.org/wiki/Client-server_model1Figure 1: The settings so the class SingleSocketServer has a configuration (namedServer in NetBeans) to compile the server which has a main method and becomes an ex-ecutable program.Activity 2Implement 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 shouldbe explanatory enough. The exercise is illustrative that in a client-server architecture thereare 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 propertiesto configure two run configurations, so you can work and compile both at the same timewhen working on a single computer (the exercise by Rick Proctor works all on a singlecomputer identified as the localhost). See Figure 1 for the setting of a configurationfor the SingleSocketServer.Activity 3Experiment 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 optionClean and Build Main project. This will build a jar file for the client thatyou can run from a terminal window withjava -jar ClientServerTutorial/dist/ClientServerTutorial.jarExperiment commenting code out. See what error you get (what do the catch blocksreturn). Not that when you run this example, the server waits for about 10 seconds beforeit issues a response, so you can observe the time stamp when the client issues the requestand when the server sends its reply.2Activity 4We have modified the example above to create a client and a server that can communicateacross two computers. We have also modified the example so the server does providesome 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 clientssimultaneously 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 maybe some issues like the computers having different Java version installed and youcompile 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 yourcomputer. We take no responsibility for any security loopholes you may create inyour own machines.Security treatsActivity 5Read “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 computerengineering issue or both.Additional exercises for 3815ICT and 7805ICTThese activities do not earn specific marks, thy enable the marking; that is, if they are not completedthe 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 7805ICTActivity 7Design an open ended question (that means there may be several correct answers) thatevaluates the learning objectives of this workshop and could be suitable for1. a midterm, or2. a final exam, or3. a job interview for software engineering.3