UPI Study › Courses › Software Engineering › Free lessons › Lesson 15.3 Free with a free account
Architecture Patterns for Building Distributed Systems
Software Engineering · Chapter 15: Distributed Systems, Services, and Sociotechnical TopicsSection 15.3 · lesson 97 of 1037 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: Service-Oriented Architecture and SaaS →← Client-Server Networks: How They Work and When to Use ThemNext lesson: Service-Oriented Architecture and SaaS →
In this lesson
Peer-to-peer, broker, and distributed objects - when there's no natural center.
- Explain why client-server isn't the only distributed shape
- Describe peer-to-peer, and the problems it suits
- Describe the broker and distributed objects patterns
- Compare the patterns, and pick the one a problem's shape suggests
Transcript
Everything said in the video, section by section (902 words). Read along, or search it.
Distributed Systems, Services, and Sociotechnical Topics
Architecture Patterns for Building Distributed Systems
Client-server assumes one or more central servers, providing a service to many dependent clients. But not every distributed problem has a natural center. This section surveys three patterns for the shapes client-server does not fit.
Beyond Client-Server
Not Every Problem Has a Center
Client-server organizes a system around a clear distinction between a service provider, and the clients that depend on it. That is a useful default. But it is an assumption, not a law. A file-sharing network among equal participants does not fit it. Neither does a marketplace of buyers and sellers who never interact directly. And neither does a system of objects scattered across machines, which still need to interact as though they were local. Three patterns emerged for these shapes. Peer-to-peer, broker, and distributed objects.
Peer-to-Peer
No Fixed Center
Client-server routes everything through one center. Peer-to-peer removes the fixed center entirely. Its participants, called peers, act as both consumers and providers of a service, with no single central authority doing the heavy lifting. Any peer can request something from, or offer something to, any other peer directly. It suits file-sharing networks, some distributed-ledger systems, and collaborative applications with no single owner.
Table 1
Peer-to-Peer Trade-offs
Peer-to-peer brings real strengths. Resilience, because no single peer's failure stops the system. And scalability, because each new peer adds resources, as well as demand. It also brings real costs. With no central authority, coordinating behavior and guaranteeing consistency become harder. And establishing trust between strangers is harder too.
Broker
A Go-Between
In a broker architecture, a broker component sits between service providers and service requesters. Providers register what they offer with the broker. Requesters ask the broker for a service, rather than asking any specific provider. And the broker finds a match, and coordinates the exchange. It suits message-queue systems, service marketplaces, and middleware connecting many independent applications.
Figure 3
Neither Side Knows the Other
Here is the broker in action. Providers register with the broker. Requesters ask the broker for a service. The broker matches each request to a suitable provider. Neither side ever needs the other's identity. The broker is what connects them.
Table 2
Broker Trade-offs
That arrangement decouples each side from the other. A provider can be added, removed, or replaced without any requester needing to know, and the same goes the other way. So new participants join easily. The cost is that the broker itself becomes a critical component that everything depends on. If it is not built to handle that responsibility, it becomes a bottleneck, or a single point of failure.
Distributed Objects
Making the Remote Feel Local
In a distributed objects architecture, objects that may be running on different machines interact through method calls that look like ordinary object-oriented calls. The calling object does not need to know whether the object it calls is local or remote. The infrastructure locates it, and carries the call across the network. The call in the code looks identical either way. But the network hop underneath is very real.
Table 3
Distributed Objects Trade-offs
That transparency has a clear strength. Developers can reuse familiar object-oriented thinking, and existing object designs, across machines. But it also has a real cost. A remote call is far slower, and far less reliable, than a local one. And code written as though the difference does not matter tends to handle network delay and failure poorly. This pattern suits enterprise systems of many independently deployed components, that still need to act as one coherent object model.
Table 4
Which Shape Does the Problem Have?
None of these patterns, or client-server itself, is correct in general. The question is which shape the problem already has. Is there a natural, stable provider? That suggests client-server. Is there no natural center, or does resilience matter most? That suggests peer-to-peer. Does either side need to change without the other knowing? That suggests a broker. And do many independent pieces need to feel like one object model? That suggests distributed objects. Real systems can combine them. A peer-to-peer network might use a small broker, just to help new peers find each other.
Apply It
2 Systems to Diagnose
Let's apply that to two systems. Thousands of home sensors share readings directly with each other, with no company-run server at any point. Each sensor is both provider and consumer, with no center. That is peer-to-peer. Now a team builds a distributed objects system, treating every remote call exactly like a local one, with no handling for delay or failure. It works fine in testing on one machine, but breaks constantly once deployed across a real network. Testing on one machine never exercised a real network hop. The pattern's convenience was mistaken for a guarantee it never made.
Key Terms
The Vocabulary of This Section
Let's lock in the key terms. Peer-to-peer is an architecture where participants, called peers, act as both client and server to one another, with no fixed center. A broker is a component that matches service providers to requesters, so neither side needs to know the other directly. Distributed objects is an architecture where objects on different machines interact through method calls that resemble local ones. And a remote method call is a call to an object on a different machine, made to look like an ordinary local call.
Key Takeaways
What to Carry Forward
To pull this together. Client-server assumes a natural center, and not every distributed problem has one. Peer-to-peer removes the center, trading easy coordination and trust for resilience and scalability. A broker keeps providers and requesters decoupled, but becomes a critical, potentially bottlenecked component itself. Distributed objects make remote calls look local, which can hide the real cost of a network hop. And the right pattern is the one that matches the shape of the problem. Real systems often combine more than one.
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 Architecture Patterns for Building Distributed Systems
What is peer-to-peer architecture and when is it used?
What are the trade-offs of peer-to-peer versus client-server?
How does the broker architecture pattern work?
Why can a distributed objects architecture fail once deployed on a real network?
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 →