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

Replacing SQLite database while accessing it

I am completely new to SQLite and I intend to use it in a M2M / client-server environment where a database is generated on the server, sent to the client as a file and used on the client for data lookup. The question is: can I replace the whole…
Udo G
  • 12,572
  • 13
  • 56
  • 89
8
votes
0 answers

How can I test implementations of SOCKS5 proxy 'BIND' and 'UDP ASSOCIATE' commands?

Using RFC 1928, I have implemented SOCKS5 'BIND' and 'UDP ASSOCIATE' commands on Java, but I haven't found any way to test their work. I have tried browser (Firefox), FTP server and client in active and passive mods (run server on my Android phone…
Albert
  • 81
  • 3
8
votes
2 answers

TCP "Client" example in Clojure!

I am trying to use a TCP socket to communicate a shared state between a server and a bunch of clients. I am using "Server-Socket" from clojure.contrib for the server. That works pretty well and I can communicate with the server with other tools. I…
Ali
  • 18,665
  • 21
  • 103
  • 138
8
votes
4 answers

make a client server java application

I am trying to make a Java application in a client/server way. The client is a GUI in SWT which displays data from the server. The server is connected to a database. Ok, sorry for that, it's a classic question I'm sure, but I don't know how to…
fluminis
  • 3,575
  • 4
  • 34
  • 47
8
votes
4 answers

Send Video over TCP using OpenCV and sockets in Raspberry Pi

I have been trying to send live video frame from my client (Raspberry Pi) to a server hosted on Laptop. Both these devices are connected to the same network. Server.py import socket import sys import cv2 import pickle import numpy as np import…
Shinchan
  • 572
  • 2
  • 5
  • 16
8
votes
1 answer

How to get the Active directory token of a user?

I am developing a client-server application. In the usage of this application, clients and server have same AD (Active Directory) domain. I want my server application to authenticate every client by its AD user. That means, that when a user runs an…
parseh
  • 434
  • 1
  • 5
  • 20
8
votes
5 answers

How to make my Java Swing application a Client-Server application?

I have made a Java Swing application. Now I would like to make it a Client-Server application. All clients should be notified when data on the server is changed, so I'm not looking for a Web Service. The Client-Server application will be run on a…
Jonas
  • 121,568
  • 97
  • 310
  • 388
8
votes
1 answer

How can I use poll to accept multiple clients? (TCP Server) (C)

This polling business seems like it was written by a madman, and I am unsure how to use it to allow for multiple clients to connect to a server and then send their input to all other clients. So if I want to have three clients going, I will need…
countofmontecristo
  • 381
  • 3
  • 5
  • 15
8
votes
2 answers

How to determine the UID of a message in IMAP

I'm working in a mail client project using C#. I'm using both the POP and IMAP protocol to communicate with the server. The problem is than I can not figure out why when I want to get the UID for a message the result from the POP server and the IMAP…
Emanuel
  • 6,622
  • 20
  • 58
  • 78
8
votes
1 answer

db4o client/server appears to only be able to process one query at a time?

We're evaluating db4o (an OO-DBMS from http://www.db4o.com). We've put together a performance test for client/server mode, where we spin up a server, then hammer it with several clients at once. It seems like the server can only process one…
Peter Mounce
  • 4,105
  • 3
  • 34
  • 65
8
votes
3 answers

error: no match for ‘operator<’ in ‘__x < __y’ when trying to insert in two map

In code there are two map.One store pair and other store where Values is class with 5 variable with data type string,int,string,int,int.but during inserting in the second map i am getting error g++ error: no match for ‘operator<’ in ‘__x < __y’ when…
user3392294
  • 83
  • 1
  • 1
  • 3
8
votes
3 answers

How do you synchronize server-side and client-side code?

Something I've been learning (and teaching) in Software Engineering is that code duplication is the root of all evil. On the other hand, I find it quite hard to explain how this concept should be applied to the development of web apps. Allow me to…
Philippe Beaudoin
  • 3,290
  • 1
  • 22
  • 25
8
votes
1 answer

AngularJS - Getting data inserted in dom

I'm looking for a way to get initial data from a DOM after the application is loaded. Data has been inserted in a view by a server. Is Module's value method is a good way? As well i want to know how to get data from a views when i'm working with…
Ivan Chernykh
  • 41,617
  • 13
  • 134
  • 146
8
votes
2 answers

Long-running / blocking operations in boost asio handlers

Current Situation I implemented a TCP server using boost.asio which currently uses a single io_service object on which I call the run method from a single thread. So far the server was able to answer the requests of the clients immediately, since it…
Robert Hegner
  • 9,014
  • 7
  • 62
  • 98
8
votes
2 answers

Efficient reloading data / pushing data from server to client

I'm looking for the 'way to go' (i.e. the most efficient, most used, general accepted way) when it comes to the reloading of data from a web server to a front end. In the end application, I will have several output fields where data has to be…
user1544337