UPI Study › Courses › Software Engineering › Free lessons › Lesson 15.2 Free with a free account
Client-Server Networks: How They Work and When to Use Them
Software Engineering · Chapter 15: Distributed Systems, Services, and Sociotechnical TopicsSection 15.2 · lesson 96 of 1036 min · free with a free account
Free preview
Create a free account to keep watching
It takes a minute and costs nothing. Your free account unlocks all of Chapter 1 and 3 more lessons of Software Engineering.
Lesson complete
Earn the 3 college credits for Software Engineering
Enrolling adds a quiz after each lesson, the graded work and the official transcript. Recommended for credit by NCCRS.
Next lesson: Architecture Patterns for Building Distributed Systems →← Middleware: The Glue Between Software LayersNext lesson: Architecture Patterns for Building Distributed Systems →
In this lesson
How they work, how tiers split the work, and when to use them.
- Explain how responsibility divides between client and server
- Describe two-tier arrangements and their costs
- Explain what a three-tier arrangement changes
- Judge when client-server fits - and when it doesn't
Transcript
Everything said in the video, section by section (770 words). Read along, or search it.
Distributed Systems, Services, and Sociotechnical Topics
Client-Server Networks
Client-server was introduced earlier as one architectural shape among several. Here it gets a deeper treatment, as a genuine network arrangement. That means how responsibility splits across tiers, and what changes once client and server run on separate machines.
Style to Network Reality
Client-Server, Revisited
Earlier, client-server was one of several named architectural styles. A server provides services, and one or more clients request them. Revisited as a real network arrangement, the interesting question changes. How does responsibility for presentation, logic, and data actually get divided between client and server? And what does that division cost, once a real network, with real latency and real availability concerns, sits between the two?
Two-Tier
Client and Server, Directly
In a two-tier arrangement, a client connects directly to a server, often a database, with no layer in between. The client handles both presentation and business logic itself, and talks straight to the server for data. It is the simplest arrangement, but it has real costs. Business logic is duplicated across every client, so a change means updating each one. Every client needs its own direct connection, straining the server as clients grow. And clients are tightly coupled to the server's data structure, so a single schema change can break every client at once.
Three-Tier
Adding a Middle Layer
A three-tier arrangement adds a middle application tier, between a much thinner client and the data tier. Business logic moves into that middle tier, instead of being duplicated everywhere. Fixing it in one place is enough. The data tier is shielded from serving every client directly, and each tier can scale or be updated somewhat independently. This is essentially the dominant pattern behind modern web applications. A thin browser as the presentation tier, a web or application server as the logic tier, and a database as the data tier.
Figure 1
The Same Responsibilities, Split 2 Ways
Here are the same responsibilities, split two ways. In two-tier, the client holds both presentation and logic, and talks directly to the server for data. So the logic is duplicated in every client. In three-tier, the client handles only presentation. The logic lives in its own middle tier, which in turn talks to the data tier. Three-tier pulls the logic out of the client, and centralizes it in one place.
Worth Noticing
Cohesion and Coupling Again
Here is something worth noticing. Moving logic out of the client and into its own tier, is a direct application of cohesion and coupling. It separates what a user sees from what the system decides. Instead of tangling both together in the same place, each becomes a distinct, focused layer.
Strengths and Limits
What Client-Server Trades
Client-server has clear strengths. It centralizes shared data and logic, supporting consistency across many users. And it lets clients stay simpler, by leaning on the server's greater resources. The trade-off is real too. The server is a central point that every client depends on. And the network between client and server now affects responsiveness, in a way a single machine never has to account for. So a client-server system's overall availability is bounded by its server tier. If the server is down, every client is affected.
Table 1
When Client-Server Fits
Here are the two tier models side by side. In two-tier, logic lives in the client, duplicated across clients. It fits simple internal tools, and early client-server systems. In three-tier, logic lives in a middle application tier. That is the pattern behind most modern web applications. Client-server fits well when many clients need to share consistent, centrally managed data and logic. It fits less well where extreme resilience is required, or where participants need to talk to each other directly, as equals.
Apply It
A Database Schema Change
Let's apply that. The database schema needs to change. In a two-tier system, every client is tightly coupled to that data structure. So every client can break, and each one has to be updated. In a three-tier system, the middle tier can absorb the change. The clients are shielded from it entirely.
Key Terms
The Vocabulary of This Section
Let's lock in the key terms. A two-tier architecture is a client-server arrangement where the client handles presentation and logic, connecting directly to a server for data. A three-tier architecture adds a middle application tier to handle logic, separating a thin client from the data tier. And a single point of dependency is a shared component, such as a server, whose unavailability affects everything that depends on it.
Key Takeaways
What to Carry Forward
To pull this together. The key question in client-server is how presentation, logic, and data are divided. Two-tier duplicates logic across clients, and couples them tightly to the data. Three-tier centralizes logic in a middle tier, which is the pattern behind most modern web applications. The server tier bounds the availability of every client that depends on it. And client-server fits shared, centrally managed data, not participants that need to talk directly as equals.
About Software Engineering at UPI Study
Software Engineering (Computer Science 301) is a self-paced online course of 103 video lessons in 15 chapters, from process models and agile to requirements, design, user interfaces, reliability, security and project management. It carries a NCCRS credit recommendation for 3 semester credits.
Every lesson transcript is free on pages like this one, and the videos are free with a free UPI Study account. Enrolling adds a practice quiz after each lesson, the graded work and final exam that earn the credit, lifetime access, and an official transcript on completion. UPI Study has helped over 130,000 students with college credits. ACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities.
Enroll now → Course details Download the syllabus All Computer Science courses Every course with PRO →
Why take it here
Why students take Software Engineering with UPI Study
Where the credit goes
Universities that work with NCCRS
Software Engineering carries a NCCRS credit recommendation. These universities work with NCCRS; some are UPI Study's signed partners. ACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities.
Thomas Edison State UniversitySigned partner
University of the PeopleSigned partner
Charter Oak State CollegeSigned partner
Strayer UniversitySigned partner
Columbia Southern UniversitySigned partner
Indiana TechSigned partner
Penn StateWorks with NCCRS
Southern New Hampshire UniversityWorks with NCCRS
SUNYWorks with NCCRS
+many more cooperating universitiesFind my college →Find my college → Not listed? Ask Athena in the corner of this page, or book a 15-minute call.
FAQ
Questions students ask us
About Client-Server Networks: How They Work and When to Use Them
What is the difference between two-tier and three-tier architecture?
What are the disadvantages of a two-tier client-server architecture?
How does a typical web application use three-tier architecture?
When is a client-server architecture a poor fit?
About the Software Engineering course
How many college credits is Software Engineering?
How much does Software Engineering cost and what is included?
Which universities accept UPI Study credits?
How long does Software Engineering take?
How are the exams done?
How do my credits reach my college?
Ready for the full course? Earn 3 credits in Software Engineering.
103 video lessons, a quiz after each one, and the graded work that earns the credit. Recommended for credit by NCCRS.
3 credits · NCCRSEnroll →