Client_Server Flashcards
What are the general questions to ask about client/server when considering how to structure your application
- Type of service being procided
- eg. file, name, web
- Layers of co-dependant servers
- How can client/server interactions vary?
- Does server store info about client?
What are the two key questions/issues?
Division of labor
packets or streams
What are the PROs and CONs of client vs server?
PRO:
- Dustrubuted access (anytime anywhere)
- Load distribution and scalability
- Cost effectiveness
CON:
- Tech issues
- Sys admin overhead (more machines to maint)
- Hidden cost of main
- Security
What is the difference between a Thick or Thin Client?
Division of labour
Thick:
- More functionality on client side
Thin:
- The client acts as display only.
- Relies on server to process everything.
- Can be delays because of communication
What are the factors to consider when determining division of labour?
Location of resources required
- If resources are on a single machine, then processesing should be completed there
Communication Costs
- Chose a patht that minimizes communication
Workload balance/distribution
- Try to balance workload across available machines
- CONSIDER:
- capability of machines
- number of machines
- application load variations
- CONSIDER:
What are Server design considerations?
- Stateful vs stateless
- Multi vs Single-Threaded
- Server Replication
What is a stateful server?
A server that maintains the “state” of clients
- “What clients am I currently connected to?”
- “What is each client currently doing?”
- FAULT TOLLERANCE CONSIDERATION:
- What happens when the server fails?
- How is the state information reconstructed?
These states allow for more complex functionality
- Shopping card
- Saving information when filling our a web-form
What is a stateless server?
Does not maintain any information about clients
PRO: Easy to recover from failure, just need to restart the server
What should be used to determine if you should create a concurrent or non-concurrent implementation?
Non-concurrent: Simple, quick tasks
Concurrent: Any time processesing would create any type of delay.
What are the advantages of multithreaded vs multi-process servers?
- All threads share a single memory space
- cheap to create and share data easily
- NOTE: concurrency requires syncronization(because the data space is shared)
What are the 3 variations on concurrent server implementations?
- Thread per request
- Thread per connection
- Thread per object
Draw the diagram of “Thread per request”
Draw the diagram of “Thread per connection”
Draw the diagram of “Thread per Object”
What is a server farm/pool
Using a bunch of “smaller”(and cheaper) machines
PRO: Enhanced performance and avialability
CON: Consistency
- How do we keep all the servers up to date and in sync?
- This may or may not matter
- ATM machine vs Web Page
- This may or may not matter