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
8
votes
1 answer

Manage Android Device through web browser from a laptop using WiFI

Requirement: I want to control my android phone through my laptop using WI-Fi. For this I need to run a web server and a "customized" web app that runs on the android phone over a particular port and the wifi adapter's ip address. For example , I…
Donny
  • 678
  • 11
  • 34
8
votes
2 answers

Difference between Get and post method in comparision with HTTP and REST

I am new to REST. I want to know when to use get methods and when to use post methods. In the process of my literature survey I came across this knowledge. Actually when I searched for HTTP get and post methods, I read that get doesnt encode URL and…
javaMan
  • 6,352
  • 20
  • 67
  • 94
7
votes
2 answers

How to send message from server to client in web application

Recently, I came across this kind of need. The client(web browser) requests for a task to be done asynchronously at the server side, then the client leaves it behind. When the server finishes the task, it will notify the client by sending some…
xiaohan2012
  • 9,870
  • 23
  • 67
  • 101
7
votes
3 answers

Are there any libraries that let me display remote rendering on a website?

Rather than use WebGL, NaCl, Flash or developing a custom browser plugin, I'm interested in doing 3D real-time rendering on the server. It's for a specialist product not general use. Are there any existing technologies for this kind of thing, to…
Mr. Boy
  • 60,845
  • 93
  • 320
  • 589
7
votes
2 answers

android websocket client timeout

Thanks for reading! Background: I am developing an Android client for a server where the requirement is app that requires continuous exchange of messages back and forth with a WebSockets-based server. Implementation: For the client, I use…
Sagar Hatekar
  • 8,700
  • 14
  • 56
  • 72
7
votes
5 answers

The client (desktop app) pulls data...but I want the server (web app) to push data

I have a client-server application - wherein the server is essentially an ASP .NET web application and the distributed clients are desktop applications. The clients need to receive some data from the server - when there is new data for the client.…
Sameet
  • 2,191
  • 7
  • 28
  • 55
7
votes
1 answer

main class of a tomcat web application

I have a client server application. The server is made of restful services with jersey and is deployed on tomcat 7. Actually, I need to create the context of the services (read some high sized files) before the client access to the services. Is it…
TheFrenchGuy
  • 233
  • 1
  • 3
  • 14
7
votes
2 answers

Proper FIFO client-server connection

I'm trying to write simple client and server C programs, communicating with each other in separate terminals. The server has to create a public fifo and wait for the client. Meanwhile the client is creating his own fifo through which the server's…
uluroki
  • 171
  • 2
  • 2
  • 11
7
votes
2 answers

32bit - 64bit interprocess communication

I am tasked with implementing an xml editor based on Win32 as a frontend process, while the business logic will be handled via a 64bit process. In addition the communication between the two processes will be done via a message bus which can only…
FailedDev
  • 26,680
  • 9
  • 53
  • 73
7
votes
3 answers

Client-server game in Java with applets

I have to implement a simple tour client-server game in Java. Unfortunately, I'm just beginning with network programming and have some problems with choosing an apropriate solution. Let's assume I'm creating a chess game where two clients can…
syntax_error
  • 727
  • 1
  • 5
  • 17
7
votes
5 answers

Mobile : one single request or multiple smaller requests?

On an iPhone app (or mobile in general) that constantly needs to send requests to a Web Service, is it better to work with one single requests that will fetch a large amount of data or multiple (possibly simultaneous) requests for each element with…
scalbatty
  • 778
  • 4
  • 12
7
votes
5 answers

Java reliable UDP

Please suggest java library, that implements reliable udp. It will be used for a game server to communicate to clients and to other servers. PS Maybe you can suggest tech that will be more productive to work with for such task(game server)? But…
Viktor
  • 702
  • 3
  • 8
  • 20
7
votes
2 answers

Syncing objects between two disparate systems, best approach?

I am working on syncing two business objects between an iPhone and a Web site using an XML-based payload and would love to solicit some ideas for an optimal routine. The nature of this question is fairly generic though and I can see it being…
hyuan
  • 774
  • 4
  • 12
7
votes
2 answers

Android Socket Programming?

I need a little bit help regarding to android socket programming. I had made a server-client prototype using java socket programming. In server client scenario , I am sending commands from 1-10 and sever do some task according to command received…
Mudassar
  • 1,566
  • 4
  • 21
  • 31
7
votes
2 answers

Socket recv call freezes thread for approx. 5 seconds

I've a client server architecture implemented in C++ with blocking sockets under Windows 7. Everything is running well up to a certain level of load. If there are a couple of clients (e.g. > 4) receiving or sending megabytes of data, sometimes the…
michael
  • 81
  • 5