ELEC1401 Chap.6 Application Architectures and Sockets
Application Architectures and Sockets
Application Architectures and Sockets shifts attention from machines to communicating processes. A process uses a socket as its interface to transport service, and the combination of network address and port guides traffic to the intended endpoint. Client-server architecture gives a known server process a waiting role while clients initiate requests.
Peer-to-peer architecture lets participating processes request and provide resources, distributing capacity but complicating discovery, availability and security. Many real systems are hybrid, centralising identity or discovery while exchanging data directly. Architecture labels therefore apply to specific functions, not automatically to an entire product.
Transport needs also follow application consequences: a configuration command may require complete ordered delivery, while a late live-media packet can be less useful than a small loss. A sound design answer names process roles, endpoint information and the cost of loss, delay or reordering.
What this chapter covers
- 01
Network application processes
- 02
Sockets and ports
- 03
Client-server roles
- 04
Peer-to-peer roles
- 05
Hybrid architectures
- 06
Application transport requirements
Worked example · free
Classify a hybrid sensor application
- 2Classify authentication as client-server because devices contact a known managed service.
- 2Classify direct file exchange as peer-to-peer for that data function.
- 2Explain that central policy control is gained while direct transfer reduces server load but increases endpoint coordination.
Key terms
- Client process
- A process that initiates a request to obtain a network service.
- Server process
- A process that waits at a known endpoint and responds to requests.
- Socket
- The endpoint interface through which an application process exchanges transport data.
Application Architectures and Sockets FAQ
Does client-server mean one physical server?
No. Several machines can implement one logical server service through replication and load distribution. The architecture label describes process roles and initiation, not the number of physical computers behind the service.
Why use peer-to-peer transfer?
Peers can contribute storage, bandwidth or data directly, reducing central traffic and scaling with participation. The trade-off is harder discovery, changing availability, endpoint trust and coordination across independently managed hosts.
How does a port differ from an IP address?
A network address identifies a host or interface for network delivery. A transport port helps select the destination process endpoint on that host. Both are needed to describe process-to-process communication precisely.
Can one application use both architectures?
Yes. A managed server can authenticate users or publish a directory while peers exchange large data directly. Classify each function separately, name which process initiates it and explain the trade-off. The central function improves control while direct transfer increases endpoint coordination and trust demands.
Exam move
Start with two processes rather than two devices. Draw a client that initiates, a server that listens and the socket interface each uses. Add network addresses and ports only after the roles are clear. Then redraw the same service with replicated servers to prove that client-server does not mean one machine.
For peer-to-peer practice, let each process both request and provide a resource, then list the new problems of discovery, changing membership and trust. Create hybrid examples by separating authentication, search, control and bulk transfer into functions; classify each independently. For transport requirements, write the application consequence of loss, delay and reordering.
A configuration command can require complete ordered delivery, while a live preview may discard data that arrives after playback. Avoid selecting TCP or UDP before stating those consequences. Practise endpoint diagnosis with cases where host reachability succeeds but the port or listening process is wrong. Use a four-line answer: initiating process, receiving process, endpoint identifier and required delivery property.
Test your understanding by swapping the application from file transfer to real-time media and explaining which requirement changes. Review mistakes that confuse devices with processes or treat a socket as the entire path. Finish each session by naming one function that benefits from central control and one that benefits from direct peer exchange.
Add a discovery exercise in which a peer changes address and decide which directory or signalling function must update. Run a failure thought experiment for each hybrid component so you can tell whether authentication, search or direct transfer depends on the unavailable process.
Build requirement cards for ordered configuration, live media, bulk files and status telemetry, then match each card to transport properties without naming a protocol first. Write the complete endpoint as host and port whenever several services share one machine. Separate availability, identity and confidentiality because a listening socket proves none of the latter two.
Conclude each architecture comparison with the concentrated risk of central control and the coordination burden of distributed participation.
Working through Application Architectures and Sockets in ELEC1401? Sia is AskSia’s AI Electrical Engineering tutor — ask any ELEC1401 Application Architectures and Sockets question and get a clear, step-by-step explanation grounded in how ELEC1401 is taught and assessed. Read this chapter free, then take your hardest questions to Sia.