Answer the question
In order to leave comments, you need to log in
How to organize communication?
Available:
- C# project (Client that requests information from the database)
- MySQL database
- 45 PCs on which clients are installed
- The
client provides the ability to differentiate rights (Administrator, Editor, user) a certain message from the Administrator to the clients, on the clients it is necessary to display certain data from the database. Solution:
I created a table in the database that clients listen to every 5 seconds, but a question arises on weak PCs. The client freezes.
It needs to be implemented in some other way. Question:
How to implement communication between clients via TCP or UDP protocol (it is desirable to organize the client and server in one project)
Note:
Links to sources are welcome.
Answer the question
In order to leave comments, you need to log in
https://www.google.ru/search?q=websocket
specifically in C# just now Is there a working example of WebSocket server implementation in C#?
First. Think about whether all clients should go directly to the database. The differentiation of rights does not work for you: the client code cannot be trusted. You should make a dedicated server application.
Something is wrong here, or your server hangs, not the client. With an increase in the number of clients, the load on clients usually does not increase. And with one request every 5 seconds, absolutely any computer can handle it, unless you try to subtract the entire database every time.
Communication is very different and with very different requirements. If you need to send messages specifically, then the zeromq library may be suitable for you. Or maybe you'll be fine with keeping an open tcp socket between the client and server and manually forwarding messages through it, supplying them with delimiters.
How to implement communication between clients via TCP or UDP protocol (it is desirable to organize the client and server in one project)
I created a table in the database that clients listen to every 5 seconds, but the question arises on weak PCs. The client freezes.
It needs to be implemented in some other way.
There is either a message queue or WCF-based notifications (there is support for message queues) /
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question