Pages

Showing posts with label Client Server. Show all posts
Showing posts with label Client Server. Show all posts

Wednesday, April 25, 2018

Writing Client-Server Applications using IO::Socket

Introduction

You should now know what a client and server program is. Simply put, a client requests a service and a server services the request. There are several ways to do this. The crudest will be to call a program within perl and pass the parameters during the call. Another way is to use pipes. A program can call another program but the input to the called program will be passed through the STDIN of the other program. Both methods are crude and allow only for simple passing of input and output. Another way to do this is using sockets.

Sockets allow two programs to communicate with each other. The server binds a port on the machine. The client connects to that port to communicate with the server

Writing Client-Server Applications in Perl: Introduction


Introduction

The traditional architecture for applications is the stand-alone architecture. With this, all components of an application is executed in one giant program. This is ok if the application is meant to be used by one person on one machine at a time.

With the changes in technology AND business processes, this architecture has to change. We see several users now using the same application at the same time accessing the same database(s).
Obviously, this architecture has to change to accomodate changes in the way applications are used.

Tuesday, April 29, 2003

Perl IO::Sockets


Introduction to IO::Sockets

A client and server program works this way. Simply put, a client requests a service and a server services the request. There are several ways to do this. The crudest will be to call a program within Perl and pass the parameters during the call. Another way is to use pipes.

A program can call another program but the input to the called program will be passed through the STDIN of the other program. Both methods are crude and allow only for simple passing of input and output. Another way to do this is using sockets.

Sockets allow two programs to communicate with each other. The server binds a port on the machine. The client connects to that port to communicate with the server,