Sequence of activities in a client-server system server starts running 2. The server waits for clients to connect. (listening 3. Clients start running and perform operations Some operations involve requests to the server 4. When a client attempts to connect, the server accepts the connection (if it is willing) 5. The server waits for messages to arrive from connected clients 6. When a message from a client arrives the server takes some action in response, then resumes waiting 7. Clients and servers continue functioning in this manner until they decide to shut down or disconnect www.oseng.com O Lethbridge/Laganiere 2001 Chap 3: Basing Development on Reusable
© Lethbridge/Laganière 2001 Chap. 3: Basing Development on Reusable Technology 11 Sequence of activities in a client-server system 1. The server starts running 2. The server waits for clients to connect. (listening) 3. Clients start running and perform operations — Some operations involve requests to the server 4. When a client attempts to connect, the server accepts the connection (if it is willing) 5. The server waits for messages to arrive from connected clients 6. When a message from a client arrives, the server takes some action in response, then resumes waiting 7. Clients and servers continue functioning in this manner until they decide to shut down or disconnect
a server program communicating with two client programs Application Services offered by the framew ork Application Horizontal framew ork Vertical framew ork Code to be provided to adapt the framew ork to the needs of the application www.oseng.com O Lethbridge/Laganiere 2001 Chap 3: Basing Development on Reusable
© Lethbridge/Laganière 2001 Chap. 3: Basing Development on Reusable Technology 12 A server program communicating with two client programs Application Application Horizontal framew ork Vertical framew ork Code to be provided to adapt the framew ork to the needs of the application Services offered by the framew ork
Alternatives to the client server architecture Have a single program on one computer that does everything Have no communication Each computer performs the work separately Have some mechanism other than client-server communication for exchanging information e.g. one program writes to a database the other reads from the database www.oseng.com O Lethbridge/Laganiere 2001 Chap 3: Basing Development on Reusable 13
© Lethbridge/Laganière 2001 Chap. 3: Basing Development on Reusable Technology 13 Alternatives to the client server architecture • Have a single program on one computer that does everything • Have no communication — Each computer performs the work separately • Have some mechanism other than client-server communication for exchanging information —E.g. one program writes to a database; the other reads from the database
Advantages of client-server systems The work can be distributed among different machines The clients can access the servers functionality from a distance The client and server can be designed separately They can both be simpler All the data can be kept centrally at the server Conversely, data can be distributed among many different geographically-distributed clients or servers The server can be accessed simultaneously by many clients Competing clients can be written to communicate with the same server. and vice-versa www.oseng.com O Lethbridge/Laganiere 2001 Chap 3: Basing Development on Reusable 14
© Lethbridge/Laganière 2001 Chap. 3: Basing Development on Reusable Technology 14 Advantages of client-server systems • The work can be distributed among different machines • The clients can access the server’s functionality from a distance • The client and server can be designed separately • They can both be simpler • All the data can be kept centrally at the server • Conversely, data can be distributed among many different geographically-distributed clients or servers • The server can be accessed simultaneously by many clients • Competing clients can be written to communicate with the same server, and vice-versa
EXample of client-server systems The World Wide Web Email Network File System Transaction Processing System ° Remote Display system Communication System Database System www.oseng.com O Lethbridge/Laganiere 2001 Chap 3: Basing Development on Reusable 15
© Lethbridge/Laganière 2001 Chap. 3: Basing Development on Reusable Technology 15 Example of client-server systems • The World Wide Web • Email • Network File System • Transaction Processing System • Remote Display System • Communication System • Database System