Week 5 Net Flashcards

1
Q

What are regular expressions used for?

A
  • match a pattern of characters

- specify pattern to be matched

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Steps for making regular expressions in Java?

A
  • create a regular expression as a string
  • use pattern to compile regex
  • use matcher to apply pattern to a string / input
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

“\d{2,5} what regex does this mean?

A

between 2 and 5 digits

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

\d{4,}what regex does this mean?

A

4 or more digits

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

\d{2}\w? what regex does this mean?

A

2 digits followed by one or more of [a-zA-Z_]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

“\^\d+

what regex does this mean?

A

’^’ followed by at least one digit

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

\s+glob\s+

what regex does this mean?

A

‘glob’ with spaces either side

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the purpose of the client system

A

to provide the user an interface to the application

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Describe some client functions

A
  • interface to human user
  • check and interpret user input
  • check and interpret network communication
  • report system and network events and errors
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What are the 3 components of a simple GUI?

A
  • user input
  • application operation
  • signalling channel view
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are the 2 different events?

A
window events(WindowListener) GUI control
action events(ActionListener) Client functions
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is the WindowListener?

A
  • interface to window events

- activate, iconify

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is the ActionListener?

A
  • interface to user interaction for application
  • called when a user event occurs
  • all handling user event handling through this method
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What two communications does a thread use?

A
  • user / data plane communication

- control / signalling plane communication

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is the purpose of a server system?

A

to provide access to resources and provide application services

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

describe the functions of a server?

A
  • access to the application functions and resources
  • check and implement operations requested by client
  • check and interpret network communication
  • report system and network events and errors
17
Q

What is the scalability for a server?

A
  • service and resources for many users, not just one

- simultaneous access for many users

18
Q

What is the performance for a server?

A
  • provide a satisfactory service for each user

- performance impact for individual users should be minimal as service is scaled

19
Q

Why might servers in a datacentre not all be identical?

A
  • specific tasks to provide overall service

- specific hardware and software for specific tasks

20
Q

Describe the server loop?

A
  • check for incoming connection requests
  • check for incoming messages
  • check for session termination requests
  • forward/relay outgoing messages
21
Q

What level is HTTP on?

A

application, running over TCP

22
Q

is HTTP stateful or stateless?

A

stateless, single request, single response

23
Q

What is the HTTP request message format?

A

header

24
Q

What is the HTTP response message format?

A

header and payload

25
Q

What are the 3 common HTTP methods?

A

get
post
header

26
Q

Explain what stateless HTTP is?

A
  • each client request is treated indepentely

- server does not maintain state or history of any previous requests from the client

27
Q

Who fetches all the page contents?

A
  • client
  • curl only fetches the url requested
  • client must fetch, look for additional links, and render and display
28
Q

Describe HTTP and TCP when they work together?

A
  • TCP must first be established
  • then HTTP request can be sent
  • TCP connection set up
  • HTTP request
  • HTTP response
  • TCP connection release
29
Q

Difference between HTTP 1.0 and HTTP 1.1?

A
HTTP 1.0 - New TCP connection
for each request means
higher latency, lower
application throughput.
HTTP 1.1 - Same TCP connection
for multiple requests.
30
Q

What is cache?

A

a performance optimisation tool, that is a local copy of data

31
Q

Why can can cache improve performance?

A
  • its closer to where it needs to be for use (spatial locality)
  • it can be copied to cache ahead of time (temporal locality)
32
Q

Advantages and disadvantage of sharing cached information

A
  • improve availability of data
  • reduce load on network and server
    X - security and privacy
33
Q

Describe advantages of client side caching?

A
  • local processing, fast response
  • takes load off of server
  • reduces network load
34
Q

Disadvantages of using client side caching?

A
  • may incur local storage and processing overheads

- private to client, which may introduce potential security and privacy issues

35
Q

Describe advantages of server side caching?

A
  • caching provides benefit for whole site with access to data
  • common content generated on demand
36
Q

Disadvantages of using server side caching?

A
  • higher overhead at server for each page for content generation
  • potential security and privacy issues