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
1
vote
1 answer

server client application in android

I am trying to develop an application in android in which users will be able to share their location information with other users they choose. Firstly i tried to make it a database driven application but it was a bit though for me . Now i decided to…
bahti
  • 636
  • 1
  • 7
  • 21
1
vote
3 answers

IP addresses and port numbers C#

I'm creating a chat program. I guess i'm a bit confused as to how MSN and other chats work? Currently, i'm putting in the localhost ip address and just connecting to myself. I'm able to get my client and server programs communicating back and forth.…
BigBug
  • 6,202
  • 23
  • 87
  • 138
1
vote
2 answers

How to access class variables of a remote object

I am currently working on an assignment that deals with RMI. Essentially, it is just a chatroom. The problem that I am running into, though, is that I want to be able to get a username variable from my client, but that variable is not part of its…
Andy
  • 49
  • 5
1
vote
2 answers

c# argument out of range was unhandled due to the SelectedIndex

'Argument out of range was unhandled' error occur when button is clicked due to no number or no such index number of client connected is selected. Error show to this code: workerSocket = (Socket)m_workerSocketList[comboBox1.SelectedIndex]; i want…
jae33
  • 85
  • 1
  • 2
  • 9
1
vote
6 answers

Chat system in Java

Is there a way to immediately print the message received from the client without using an infinite loop to check whether the input stream is empty or not? Because I found that using infinite loop consumes a lot of system resources, which makes the…
Guoxing Li
  • 189
  • 1
  • 3
  • 7
1
vote
1 answer

How to route to the nearest RMI Server?

In continuation to my question How to improve the performance of client server architecture application I have decided to maintain a centralized database and several slave server-database configuration. I plan to use Symmetric DS for replicating…
Snehal
  • 7,266
  • 2
  • 32
  • 42
1
vote
1 answer

asyncsocket ipad doesn't connect to server

My application times out while trying to connect to host. The timeout time is set to unlimited so I take it that the client is really just unable to connect at all. I have an iPad app running asyncsockets and I'm trying to get it to connect to a…
viperld002
  • 329
  • 4
  • 17
1
vote
2 answers

when transferring files they get corrupted with java sockets

I was playing around with Java sockets and I was trying to trasnfer files from a server to client, however, when they get transfer they are corrupted. This is the code from the server: DataInputStream input; DataOutputStream ouput; //these two…
Daniel
  • 2,484
  • 4
  • 27
  • 35
1
vote
1 answer

Suggestions for querying a large amount of data from a central server in iOS

So I'm writing a program that needs to scan the user's music library and then retrieve metadata on the tracks they have from a central server. I expect that each track will have roughly 100 bytes of metadata returned on average, so if the user has…
acjay
  • 34,571
  • 6
  • 57
  • 100
1
vote
3 answers

Client server program and mode_t

I need to send a variable of type mode_t through a socket. How do i do it? I mean I could convert it to a string using snprintf()..but is it ok? Thanks
Lipika Deka
  • 3,774
  • 6
  • 43
  • 56
1
vote
4 answers

Notify client about expired session - web programming

Is it posible to notify user that session has expired? Can browser act as server and receive such notifications? One solution would be to generate JavaScript that does countdown on client side and notifies client in the end, but I am iterested if it…
del-boy
  • 3,556
  • 3
  • 26
  • 39
1
vote
2 answers

How to sync a list on a server with many clients?

Consider a poker game server which hosts many tables. While a player is at the lobby he has a list of all the active tables and their stats. These stats constantly change while players join, play, and leave tables. Tables can be added and…
Meat
  • 243
  • 1
  • 3
  • 9
1
vote
1 answer

Client-Server chat application in Java

I'm currently trying to implement a client-server chat application in Java. The brief for this project is that a number of clients should be able to connect to a central server, through which each client communicates. It should work as…
Richard Stokes
  • 3,532
  • 7
  • 41
  • 57
1
vote
0 answers

server and client sockets on android

I have a Client socket running on my Android application to send files to the Server socket running on the PC, via Wi-Fi. Everything works fine to this point. I would also like to create another thread within the same android application that acts…
Abhishek Sharma
  • 609
  • 1
  • 11
  • 22
1
vote
3 answers

Using GZipStream for Client/Server Async Communication

I have Client/Server System (using Socket) with multiple clients and single server, which is sending xml datas every seconds on all clients. The XML datas are always in different size between 1 - 18000 characters and server needs to send these…
Racooon
  • 1,468
  • 2
  • 10
  • 28