G6060 Exam Jun 16 PDF

Title G6060 Exam Jun 16
Course Web Applications and Services
Institution University of Sussex
Pages 4
File Size 67.6 KB
File Type PDF
Total Downloads 215
Total Views 659

Summary

Candidate Number G6060 THE UNIVERSITY OF SUSSEX BSc FINAL YEAR EXAMINATION May/June 2016 (A2) WEB APPLICATIONS AND SERVICES Assessment Period: May/June 2016 (A2) DO NOT TURN OVER UNTIL INSTRUCTED TO BY THE CHIEF INVIGILATOR Candidates should answer TWO questions out of THREE. If all three questions ...


Description

Candidate Number

G6060 THE UNIVERSITY OF SUSSEX BSc FINAL YEAR EXAMINATION May/June 2016 (A2) WEB APPLICATIONS AND SERVICES Assessment Period: May/June 2016 (A2)

DO NOT TURN OVER UNTIL INSTRUCTED TO BY THE CHIEF INVIGILATOR Candidates should answer TWO questions out of THREE. If all three questions are attempted only the first two answers will be marked. The time allowed is ONE AND A HALF hours. Each question is worth 50 marks. At the end of the examination the question paper and/or answer book, used or unused, will be collected from you before you leave the examination room.

G6060

WEB APPLICATIONS AND SERVICES

1. (a) Are the following statements true or false? Briefly explain your answer. i. A user requests a Web page that consists of a base html page, one CSS file, one JavaScript file and two images. For this page, the client will send five HTTP GET request messages and receive five response messages. [5 marks] ii. Two distinct Web pages (for example, www.mit.edu/research.html and www.mit.edu/students.html) can be sent over the same HTTP persistent connection. [5 marks] iii. The Accept: header in the HTTP request message can be included in REST requests to indicate the type of acceptable resource representations. [5 marks] iv. HTTP response messages never have an empty message body. [5 marks] (b) Explain how DNS redirection is used by Content Distribution Network (CDN) providers to serve content to end-users faster. [10 marks] (c) How are 3-tier architectures structured and what is the purpose of each tier? How do different components of the framework provided by Java Enterprise Edition (J2EE) map to the 3-tier architecture? [20 marks]

2

WEB APPLICATIONS AND SERVICES

G6060

2. (a) Explain the purpose of the stub, skeleton and dispatcher components of the Remote Procedure Call (RPC) reference architecture. [5 marks] (b) What is the role of the Interface Definition Language (IDL) in RPC? Is there a need for a separate IDL (e.g. like in Apache Thrift) in Java Remote Method Invocation and why? [10 marks] (c) Describe the REST interaction below by explaining the HTTP request and response lines along with all headers. [20 marks] REQUEST: PUT Hotel/guest/bc45-9aa3-3f22d HTTP/1.1 Host: www.somehotelservice.com Content-Length: 94 Content-Type: application/x-www-form-urlencoded zip=30314&lastName=Doe&firstName=John&country=UK&city=Brighton RESPONSE: HTTP/1.1 200 OK Content-Length: 36 Content-Type: text/plain; Location: http://somehotelservice/guest/bc45-9aa3-3f22d

The guest resource has been updated. (d) Briefly explain all Java annotations in the source code below and their relevance to concepts used in databases, such as primary keys, foreign keys and tables. [15 marks] @Entity public class Customer { @Id private int id; private String name; @OneToMany(mappedBy="customer") private Collection orders; } @Entity public class Order { @Id private int id; private String address; @ManyToOne() private Customer customer; }

3

Turn over/

G6060

WEB APPLICATIONS AND SERVICES

3. (a) What properties are required of a secure digest function?

[5 marks]

(b) Explain how SHA1 would be used in creating a hash based message authentication code (HMAC). [10 marks] (c) A transaction concurrency control mechanism is correct if it only allows schedules that are computationally equivalent to a serial schedule. Explain what is meant by the phrase above. [5 marks] (d) Two transactions T and U are acting upon two objects x and y. Transaction T will perform a read followed by a write operation on object x, followed by a write operation on object y. Transaction U will perform a write operation on object x, followed by a read and then a write operation on object y. i. What are the possible schedules that can occur under strict two phase locking? [10 marks] ii. Are there any schedules that are computationally equivalent to a serial schedule that are not possible under strict two phase locking? If so, show what they are. [10 marks] (e) A large social media site, such as Facebook, allows its users to post status updates to their own timeline. These updates will then appear on the walls of other users who are linked to the original poster (e.g. they are friends). What form of ordering should be maintained between the status updates on users’ walls? Justify your answer and assumptions. [10 marks]

4

End of Paper...


Similar Free PDFs