Week 5 Net Flashcards
What are regular expressions used for?
- match a pattern of characters
- specify pattern to be matched
Steps for making regular expressions in Java?
- create a regular expression as a string
- use pattern to compile regex
- use matcher to apply pattern to a string / input
“\d{2,5} what regex does this mean?
between 2 and 5 digits
\d{4,}what regex does this mean?
4 or more digits
\d{2}\w? what regex does this mean?
2 digits followed by one or more of [a-zA-Z_]
“\^\d+
what regex does this mean?
’^’ followed by at least one digit
\s+glob\s+
what regex does this mean?
‘glob’ with spaces either side
What is the purpose of the client system
to provide the user an interface to the application
Describe some client functions
- interface to human user
- check and interpret user input
- check and interpret network communication
- report system and network events and errors
What are the 3 components of a simple GUI?
- user input
- application operation
- signalling channel view
What are the 2 different events?
window events(WindowListener) GUI control action events(ActionListener) Client functions
What is the WindowListener?
- interface to window events
- activate, iconify
What is the ActionListener?
- interface to user interaction for application
- called when a user event occurs
- all handling user event handling through this method
What two communications does a thread use?
- user / data plane communication
- control / signalling plane communication
What is the purpose of a server system?
to provide access to resources and provide application services
describe the functions of a server?
- 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
What is the scalability for a server?
- service and resources for many users, not just one
- simultaneous access for many users
What is the performance for a server?
- provide a satisfactory service for each user
- performance impact for individual users should be minimal as service is scaled
Why might servers in a datacentre not all be identical?
- specific tasks to provide overall service
- specific hardware and software for specific tasks
Describe the server loop?
- check for incoming connection requests
- check for incoming messages
- check for session termination requests
- forward/relay outgoing messages
What level is HTTP on?
application, running over TCP
is HTTP stateful or stateless?
stateless, single request, single response
What is the HTTP request message format?
header
What is the HTTP response message format?
header and payload