Answer the question
In order to leave comments, you need to log in
Multi server or client-server?
What is the best way to communicate between client and server?
In multi-server mode, both the client and the server can be the request initializer, which makes it easier to implement, but introduces its own flaws.
When implementing a regular client-server, the client must always request the necessary information from the server, respectively, a large load on the communication channel, and it is small.
So I would like to hear advice, what is generally more correct?
there is a multi-threaded application - the client, on certain events, requests are sent to the server and waiting for responses, there are no responses to some commands.
But, sometimes the network goes down and the data is stored in the database, then the network rises and you need to send data to the server that was not synchronized, if you start sending them en masse when establishing a connection with the server, this will block sending data on events that are in priority than data synchronization.
At the same time, when a permanent connection with the client is established, the server can give a command: turn off device number 5.
And then the thought came up about how to abandon the multiserver function altogether? And switch to a non-persistent connection, like in a browser, and even send data from several classes at once to +100500 threads?
Answer the question
In order to leave comments, you need to log in
Um .... with a client-server architecture, you have one server and heaps of clients. The client connects to the server, a tcp connection is created and that's it. Further, the client either sends data or does not send ... the connection simply hangs in the pool.
Or I misunderstood the question.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question