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
10
votes
3 answers

Should client-server code be written in one "project" or two?

I've been beginning a client-server application. At first I naturally created two projects in Eclipse, two source control repositories, etc. But I'm quickly seeing that there is a bit of shared code between the two that would probably benefit from…
Ricket
  • 33,368
  • 30
  • 112
  • 143
10
votes
2 answers

SOA vs Client-Server vs Web Service - what is the difference?

After reading some literature on the topics of SOA, Web-Services and Client-Server architectute. I really confused about these terms because can't see the real difference between them. Can someone explain what the actual difference between SOA and…
MainstreamDeveloper00
  • 8,436
  • 15
  • 56
  • 102
10
votes
6 answers

Creating a socket restricted to localhost connections only

I have a python program with many threads. I was thinking of creating a socket, bind it to localhost, and have the threads read/write to this central location. However I do not want this socket open to the rest of the network, just connections from…
Dr. Johnson
  • 579
  • 2
  • 6
  • 8
10
votes
1 answer

Simple TCPClient/Listener ("hello world") example

All I'm looking for is a simple TCPClient/Listener ("hello world") example. I'm a newbie and Microsoft TCPClient/Listener class examples are not what I am looking for. All I am looking is for the TCPClient to send a message "Hello world" and for a…
Benjamin Jones
  • 987
  • 4
  • 22
  • 50
10
votes
2 answers

Date.js vs Moment.js (and server-side formatting)

I've been using Date.js in my project and recently read a post that moment.js was superior. However, I'm having trouble believing that it is simply due to the fact that it can't parse input like "5 days from now" to an n actual date. My personal…
Kevin Brown
  • 12,602
  • 34
  • 95
  • 155
9
votes
4 answers

Evil proxy for testing client/server interaction

I'm writing a client that talks to a remote server over HTTP. I would like to place an evil proxy between the client and the server that would (randomly?) affect the traffic on the wire. Some things that I would like to happen: arbitrary delays…
EightyEight
  • 3,430
  • 4
  • 36
  • 67
9
votes
1 answer

How to handle RPCs in client-server PlayN game?

I'd like to use PlayN to create a client/server card game, e.g. Hearts. While I'm mostly focusing on the HTML5 output, I'd ideally like to be output-platform-agnostic in case I decide to make an Android client in the future. How should I approach…
Mark Schmit
  • 467
  • 4
  • 13
9
votes
4 answers

How to client-side validation and server-side validation in sync?

Typically when writing a web-app we want to perform validation on both client side to offer immediate feedback and on server-side to ensure data integrity and security. However, client-side browser apps are typically written in JavaScript.…
Tony
  • 36,591
  • 10
  • 48
  • 83
9
votes
1 answer

Live video streaming between Server and client - Using Java

this is part of a project I am working on. I have two desktop java application , one runs on the server (which has real IP), and the other is the client. I just want to stream a live video from a webcam connected to the server application , and play…
Mariam
  • 429
  • 2
  • 7
  • 13
9
votes
5 answers

What is the difference between a web application and a client/server application?

I took this from another question I had. Under appropriate uses for sqlite it has: Situations Where SQLite Works Well •Websites SQLite usually will work great as the database engine for low to medium traffic websites (which is to say, 99.9% of all…
johnny
  • 19,272
  • 52
  • 157
  • 259
9
votes
3 answers

Synchronizing Client-Server game state

I am making a client server MMO style game. So far I have the framework set up so that the server and clients interact with each other in order to provide state updates. The server maintains the game state and periodically calculates the next state…
Nick Banks
  • 4,298
  • 5
  • 39
  • 65
9
votes
7 answers

MMORPG protocol encryption

Anyone know what the trend is with MMORPG developers encryption their client/server protocols these days? The pro's and con's are as follows. Encrypting protocol: protects trade secrets regarding client/server protocol to a degree? Botting isn't…
Zombies
  • 25,039
  • 43
  • 140
  • 225
9
votes
4 answers

Authentication with separated client and server

I have created web application in angular 2 for the client side and NodeJS with express framework for the server-side. For the client side, I generated the project with angular-cli which runs on a lite-server, so my client and server are running on…
Ron537
  • 990
  • 1
  • 9
  • 20
9
votes
2 answers

Writing a simple C++ protobuf streaming client/server

I want to use protobuf to send messages back and forth between a client and server. In my case, I want to send an arbitrary number of protobuf messages from the server to the client. How can I build this quickly in C++? Note: I wrote this question…
aggieNick02
  • 2,557
  • 2
  • 23
  • 36
9
votes
2 answers

How client gets updates from server without frequent ajax request?

In my project, there are features like private chat and message notification. Message notification let as know if there are any new unread messages. For achieving that , the idea that came into my mind is Like in a client - server model , the…
Sachin
  • 2,627
  • 1
  • 19
  • 35