Questions tagged [client-server]

DO NOT USE ALONE. The client-server model is a centralized model, in which a server performs a specialized service (such as HTTP, SMTP, etc.) for multiple clients on request. Use for issues regarding client server communication. Use with a appropriate language tag(eg: [python]).

The client-server centralized model is a model in which servers perform services for many clients, who request them, typically over a network. The client-server model contrasts with the peer-to-peer model.

Typically, a client-server interaction will work as such:

  1. The client connects to the server and issues a request. The request is formatted to any one of a number of protocols, depending on the server type.
  2. The server receives the request, and begins processing it. While this happens, the client is made to wait.
  3. The server sends the client a response which typically contains both a status (whether or not there was an error) and content (which is whatever the client asked for originally).
  4. The client or the server can either terminate the connection, or keep it alive for further requests.

Writing in a client-server domain presents a number of challenges:

  • Many, many clients may be requesting services at any given time. This issue is commonly faced by websites, and is typically solved with multiple layers of load-balancing and caching. Wikipedia's architecture is an example of this (albeit an unusually complex example).
  • Networks can easily become unreliable, and sessions can be terminated at any time.
  • Security can be an issue, due to security compromises like a Man In The Middle attack. Cryptography algorithms (like SSL) are widely deployed in various networking areas to combat this.
6508 questions
11
votes
2 answers

Backend framework choices for React Native

I want to develop an android app that is based on server-client system. I want to develop both backend and android client. It's 2020 and there has already many frameworks developed to provide server side missions to programs. My question is What are…
Yusuf Altıparmak
  • 456
  • 1
  • 6
  • 16
11
votes
3 answers

How can I code a server/client video and audio streaming application?

I have to create a client/server system to stream video and audio. It would be very simple. Like youtube style. The server should attend clients providing a list of medias first and waiting the choice of each client to start streaming the media.…
soneangel
  • 621
  • 3
  • 10
  • 22
11
votes
3 answers

Why is _GNU_SOURCE macro required for pthread_mutexattr_settype() while it is in POSIX/IEEE standard?

I have written a multithread server program in C, which echoes back all the data that a client sends. Initially, I used poll() function in my program to detect POLLRDHUP event, for that I defined _GNU_SOURCE macro (This event is defined here).…
0xF1
  • 6,046
  • 2
  • 27
  • 50
10
votes
2 answers

Netty - How to get server response in the client

I'm mostly there with Netty but one concept is still alluding me, and I can't find anything in the tutorials and so on. Firstly I do understand that Netty is asynchronous, but there must be a way for a client to call the server and be able to get a…
Stephane Grenier
  • 15,527
  • 38
  • 117
  • 192
10
votes
2 answers

Qt bidirectional client server using QTcpSocket and QTcpServer

I am trying to implement a bidirectional client-server program, where clients and servers can pass serialized objects between one another. I am trying to do this using Qt (QTcpSocket and QTcpServer). I have implemented programs like this in java,…
PTBG
  • 585
  • 2
  • 20
  • 46
10
votes
5 answers

iOS client-server app: HTTP or TCP/IP?

I am about to start designing/developing a client-server iOS app. I am leaning towards using HTTP requests to get/post data from/to a server, but want to make sure this is the right decision. What are the benefits of using sockets over http…
galactikuh
  • 765
  • 8
  • 18
10
votes
1 answer

What type of architecture/design pattern does MERN follow?

I am a part of a project that is using the MERN stack and need info on how to structure my system architecture diagram. I am unsure whether MERN is a MVC, layered, client-server, or other architecture pattern. I currently have a diagram on our…
Justin Smith
  • 173
  • 2
  • 9
10
votes
3 answers

PHP : Best way to push data from server to clients.....?

In my project I need to push some data from server to the client like facebook does, when some updates are performed in the clients profile like somebody writes something in the wall of the client, Facebook automatically push it to the client…
Pushpendra
  • 4,344
  • 5
  • 36
  • 64
10
votes
1 answer

Can't resolve method readAllBytes()

What I’m trying to do I'm trying to build a java.net application where client and server have to send data to each other via serialised collection types as byte[]. The problem For an unknown reason my DataInputStream can't resolve the method…
blkpingu
  • 1,556
  • 1
  • 18
  • 41
10
votes
5 answers

Cocoa client/server application

Is there a way in Cocoa that is currently considered best practice for creating a multi-tier or client server application? I'm an experienced web developer and I really love Python. I'm new to Cocoa though. The application I'm toying with writing is…
hashemi
  • 2,608
  • 1
  • 25
  • 31
10
votes
2 answers

How many clients can an http-server handle?

I built a web application with Angular2 as client and NodeJS as server. I want to serve it with npm's http-server application without any configuration but I wonder how many clients it can handle simultaneously?
Bünyamin Sarıgül
  • 3,031
  • 4
  • 30
  • 55
10
votes
11 answers

What is the best way to implement a cross-platform, multi-threaded server in C/C++?

Part of the development team I work with has been given the challenge of writing a server for integration with our product. We have some low-level sensor devices that provide a C SDK, and we want to share them over a network for use by people…
William Brendel
  • 31,712
  • 14
  • 72
  • 77
10
votes
5 answers

Many threads or as few threads as possible?

As a side project I'm currently writing a server for an age-old game I used to play. I'm trying to make the server as loosely coupled as possible, but I am wondering what would be a good design decision for multithreading. Currently I have the…
Erik van Brakel
  • 23,220
  • 2
  • 52
  • 66
10
votes
1 answer

How to increase the connection timeout to a remote ipython notebook server?

I use ipython notebook on the browser of my laptop that connects to a remote ipython notebook server in my office. The problem is that if the network is down for a very short period, the connection will be closed. Then to reconnect to the server, I…
eric.li
  • 288
  • 1
  • 5
  • 11
10
votes
4 answers

Cloud computing over Client-server: differences, cons and pros?

As far as I know, Cloud computing might be a evolution in software architect, and it will replace some current architectures, such as client-server. These two architecture seem to share similarities for me (I know very little about both), but I…
Delta76
  • 13,931
  • 30
  • 95
  • 128