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
What are the two implementation sof a server-farm?
Draw the diagram of each
Round Robin
DNS request comes in and maps to one of avail local servers
Server Redirect
DNS request comes in, goes to one host and then redirects to a closer server geographically

What is Wide Area Server Replication?
How does it work with a CDN?
What is a CDN?
Allows for efficient delivery of content across a large geographic area via wide-area server replication
Often used to replicate websides
Akamai being one of the largest
CDN: Content Distribution/Delivery Network
Content is replicated to servers geographically located in strategic areas to increase the speed of access to these servers.
What are the challenges with a Wide Area Server Replication?
How do CDNs help with this?
Questions to consider
- Where to replciate content to
- What to replicate
- When and how to maintain consistency
CDN:
Content provided maintians origin site and the CDN then replicates
Users acess the “edge servers”
Edge servers are hosted and maintained by network providers
Draw a diagram of a Centralization Application Logic

Draw a diagram of a Single Tier client/server

Draw a diagram of 2 tier client/server

Draw a diagram of 3 Tier Client/Server

How does a 3 tier design increase flexibility?
Any layer can be replicated

What are the guiding principles for determering what type of tier design to use?
Location of resources accressed
Communication costs
Workload distribution
Draw a diagram of the following:

Note: Business logic can also be replicated for each departmental system

Structuring an existing system into clients and servers is commonly gleaned by what 3 key observations?

What is the definition of middleware
“Any software that is used solely to connect applicaiton components together”
The name comes from software sitting in the middle
MUST:
- Provide communications (messaging)
- Be general enough to support a wide range of applications and provide simple APIs
Processing that is common to many distributed systems can be factored out into middleware
What are the benefits of middleware
- Less complexity (abstracted to middleware)
- speed of development
- Enhanced Reliability
What are the examples provided from class of low(ish) level middleware?
Low level:
- RPC, RMI
- XDR, ASN 1
Other examples:
- Transaction monitors and security frameworks
- Object Request Brokers (ORBs)
- Web services