Questions tagged [client-server]

Client-server is a distributed software architecture where one layer runs on a server and processes request sent by another layer running on a different computer.

Client-server is a distributed software architecture where one layer runs on a server and processes request sent by another layer running on a different computer. Typically, the client interacts with the user.

Client-server can also distribute more than 2 layers on more than 2 processing nodes (tiered architecture).

178 questions
83
votes
4 answers

Should I use HTTP status codes to describe application level events

Several servers I have dealt with will return HTTP 200 for requests that the client ought to consider a failure, with something like 'success : false' in the body. This does not seem like a proper implementation of HTTP codes to me, particularly in…
Kagan Mattson
  • 941
  • 1
  • 7
  • 5
64
votes
10 answers

How do I mitigate a scenario where a user goes to pay, but the price is changed mid-request?

This is kind of similar to the Two Generals' Problem, but not quite. I think there is a name for it, but I just can't remember it right now. I am working on my website's payment flow. Scenario Alice wants to pay Bob for a service. Bob has quoted…
turnip
  • 1,657
  • 2
  • 15
  • 21
38
votes
3 answers

What's the point with HATEOAS on the client-side?

As I currently understand HATEOAS is basically all about sending together with each response links with information about what to do next. One simple example is easily found on the internet: a banking system together with an account resource. The…
user1620696
  • 4,817
  • 7
  • 31
  • 46
26
votes
5 answers

Why can't we use IP address instead of cookies in identifying the client in servlets?

I know we have some extra advantages in using the cookies over IP address, but my question is Why can't the container just remember the IP address of the client in identifying the client when he visit his site again? Is it possible for the container…
JAVA
  • 1,220
  • 3
  • 15
  • 17
19
votes
4 answers

Managing client-side and server-side validations in one place

I'm 100% on board with the case that one should definitely use both client-side and server-side data validations. However, in the frameworks and environments I've worked in, the approaches I've seen have never been DRY. Most of the time there's no…
asfallows
  • 2,331
  • 19
  • 18
16
votes
3 answers

How to deal with faster computers in a client/server real-time videogame

I'm creating my first online game using socket.io, and I'd like it to be a real-time multiplayer game like agar.io or diep.io. But I've run into the issue of trying to figure out how to get all the computers to work at the same speed. I have three…
Pro Q
  • 667
  • 1
  • 7
  • 15
13
votes
4 answers

What are the advantages of a client/server architecture in webapplications as opposed to a server generated frontend application

In our company, we need to build a web interface onto an embedded Linux platform. I kind of see 2 options: You use a technology where the HTML and JavaScript is generated on the server side (Think JSP, Grails, but is is something that is using C++…
Wim Deblauwe
  • 321
  • 2
  • 7
9
votes
1 answer

Do I actually need a message broker or are websockets enough?

The website I am building has a real-time messaging component. The backend is built with Flask and I have integrated Flask-SocketIO to handle Websocket connections when users are on the messaging page. My current infrastructure is pretty simple.…
turnip
  • 1,657
  • 2
  • 15
  • 21
9
votes
6 answers

How do large engineering teams describe the interface/contract between a web service and client JavaScript code?

I'm looking for a formal way for a front-end and a back-end team to communicate on the shape of a JSON web API. For example, let's say you are on a client-side team writing the JavaScript & HTML for a AJAX SPA app. Another team writes the back end…
user62575
  • 285
  • 2
  • 6
9
votes
3 answers

have we come full circle with microservices, back to very old school approaches?

In terms of software architecture and design, how do microservices "stack up" (pun intended) against middleware? I'm coming from Java, and it seems like as you move away from straight REST as an API, and abstract away different layers and…
8
votes
4 answers

Web Applications REST API: Should the data be structured to meet the UI's requirements on the client or on the server?

For a web app I am working on I have a pretty basic relational database. I access this database through a RESTful API and generate the markup in React once the data is retrieved. If I find myself constantly manipulating/processing these JSON…
connected_user
  • 477
  • 4
  • 11
8
votes
2 answers

RESTful API, what's the best way to implement status changes and events?

For example I need to update the status of a "Purchase Order" from "Draft" to "Sent". What's the best way of doing this? Do I just the update the status field in the client side and then just POST the whole entity to /purchase_order/1 And how about…
wnoveno
  • 201
  • 2
  • 4
8
votes
1 answer

Does it ever make sense to read from and/or write to a bound, listening socket?

I'm experimenting a little with creating a socket server, in PHP. In doing so I'm trying to abstract away the kinds of sockets I think I'll be needing, that I've tentitively named: ListenSocket — the 'master' socket, that is bound to an…
Decent Dabbler
  • 570
  • 2
  • 16
7
votes
3 answers

How do desktop applications get notified of events over the internet?

I would like to display something on my desktop by tapping a button on my mobile app. For example, there is a "show cat" button on my mobile app. When I tap that button, a new window should be opened and display a cat picture on my desktop. The…
LevelRin
  • 81
  • 1
  • 5
7
votes
2 answers

A simple approach for data synchronisation

I want to synchronise the local database of mobile devices with the server's database. This synchronisation will happen for example when user comes online, to update the local as well as the remote database with possible changes. I thought about 2…
User
  • 341
  • 4
  • 10
1
2 3
11 12