Difference between server and client - server

What is the difference between server and client? What difference does it make for some software installations?
For example, I've checked on how to download and install cvs and one of the user asked about server or client.

A server is a program, or machine, that waits for incoming requests.
A client is a program, or machine, that sends requests to servers.
Wikipedia: Server (computing), Client (computing)
For cvs; Are you setting up your own project, in which case you will need to set up the cvs server as well as a client to connect to said server. Or are you connecting to an existing project, in which case you need the client.

In simplest form, a server is a connection point for several clients, that will handle their requests.
A client is software that (usually) connects to the server to perform actions. The client provide a user interface that allows users to carry out actions. It forwards these requests to the server, which carries out the action and returns a response.
In CVS, the server is where the central data repository is held, and client is what you use to access the said repository.

Server: A computer on the network that shares resources for others to use is called a server computer.
Client: A computer on the network that accesses resources that are shared by computers is known as a client computer.

Server is machine that fullfill the request sent by clients.
Client is a machine that sends request to server

Related

Is client-server option is available in Wiremock.

I am trying to validate server-client connectivity. I am running the client in one system and server in other system. When i manually running the Wiremock server in client system, i am able to see the responses from Server. My question here is "How to run the Wiremock Server in Server system via client System".

Application Server and Web Server on Two Different Machines

Today I'm hosting a Laravel v4 web application on a MacMini. Why a Mac? Because I created the application logic in Objective-C (leveraging my experience with iOS dev). Whether or not this was the right choice isn't the point of the question.
What I'm interested in knowing is how can I separate my web and application server. For instance, if I put my web server on Linode (or whatever) how do I go about communicating back and forth between the web server and the application server? Is there some sort of resource I can look to to understand how to do this?
Assumptions
Here's some assumptions I'm making:
I'm guessing Laravel and the Objetive-C Application are part of the same "system" and so I'm just gonna treat this as if you need a web server to send requests to a PHP application.
The Linode server will be a web server which sends request to the PHP application (Laravel)
Hosting PHP Applications
There are three moving parts:
The web server (Apache, Nginx)
The application gateway (PHP-FPM)
The application
The gateway and the code must live on the same computer/server. The web server can live on a separate computer/server.
This means you'll need your Macintosh to run PHP-FPM, which can then listen for remote connects and send them to the PHP application.
Macintosh
Install php-fpm on your mac. Make sure it can listen for remote network connections. This is usually done in the www.conf file in the listen directory, you can listen for connections on the remote network interface (whatever IP address the computer is assigned).
Linode
Install Nginx or Apache and have it proxy FastCGI requests off to your macintosh server at the macintosh's IP address (the one you set up to listen to addresses in the step above).
Firewalls
You may need to ensure the firewalls at both ends allow incoming/outgoing connects on the networks being used to communicate to eachother.

What kind of proxy server is this?

I want to use this as a proxy server to connect many different clients with servers. Here is what I'm looking to do:
The server software on a user's computer would connect to a proxy server that is running on a VPS. It would pass in some kind of Key or authentication info to identify itself and then would maintain a persistent TCP connection to the proxy server.
A client application running on a mobile device or other computer would connect to the proxy server and pass in some kind of Key or authentication info. The proxy server would match the connection between the client and server based on their authentication info, and then forward all data back and fourth between the connections.
The proxy server would need to be able to handle multiple clients and servers connecting to it at once and use the authentication info to pair them up. There could be multiple clients connecting to the same server at the same time too. The connection from the client and server would both be outbound so that they are not blocked by firewalls. I wrote the client and server software, so I can make them work with any specific proxy.
What is the name of this kind of proxy server? And can anyone recommend any?
Thanks!

About networking sockets

Do I need to have a server to work with sockets?
Can I directly send packets to other client and receive it without neither of the host being a server?
Yes, you can do this. Even on the very same computer. Just make sure they use the same port and the client tries to connect to localhost. I use this technique on a regular basis to test my networking apps.
Any two computers may talk, but one must be a server and the other the client. They can swap roles and each can be the opposite of the other.
The Client / Server distinction in socket programming isn't as specific as it sounds. Basically it has to do with the way the two machines connect.
The server uses bind, listen, and accept to constantly wait for incoming connections. The client has to know the IP address of the server. This is why URLs and DNS exist, to provide an easy-to-remember name that maps to a server's IP address.
Once the client connect()s and is accept()ed by the server, the differences are pretty much over. The client and server can both send() and recv() bytes whenever they want, and there are no restrictions on the data.
Any computer can be a server. You could have a 386 laptop as a server and a brand new dual-Xeon rack machine as a client.

How to deploy a WebSocket server?

When deploying a web application running on a traditional web server, you usually restart the web server after the code updates. Due to the nature of HTTP, this is not a problem for the users. On the next request they will get the latest updates.
But what about a WebSocket server? If I restart or kill the old process all connected users will get disconnected. So my question is, what kind of strategy have you used to deploy a WebSocket server smoothly?
You're right, every connected user will be disconnected if the server restarts.
I think the less bad solution is to tell to the client to reconnect in the onClose method of the client.
WebSockets is just a transport mechanism. Libraries like socket.io exist to build on that transport -- and provide heartbeats, browser fallbacks, graceful reconnects and handle other edge-cases found in real-time applications.
In our WebSocket-enabled application, socket.io is central to ensuring our continuous deployment setup doesn't break users' active socket connections.
If clients are connected directly to sever that does all sockets networking and application logic, then yes - they will be disconnected, due to TCP layer that holds connection.
If you have gateway that clients will be connecting to, and that gateway application is running on another server, but will communicate and forward messages to logical server, then logical server will send them back and gateway will send back to client responses. With such infrastructure, you have to implement stacking of packets on gateway until it will re-establish connection with logical server. Logical server might notify gateway server before restart. That way client will have connection, it will just wont receive any responses.
Or you can implement on client side reconnection.
With HTTP, every time you navigate away, browser actually is creating socket connection to server, transmits all data and closes it (in most cases). And then all website data is local, until you navigate away.
With WebSockets it is continuous connection, and there is no reconnection on requests. Thats why you have to implement simple mechanics when WebSockets getting closing event, you will try to reconnect periodically on client side.
It is more based on your specific needs.