Home > Net >  C # data communication, data real-time display
C # data communication, data real-time display

Time:10-27

I am now doing a machine equipment running condition acquisition of software, a server is responsible for collecting equipment operation state is stored in the database, then there will be multiple clients (because there will be a lot of people use), the client is responsible for the real-time display equipment running condition, now it is in the client use SqlDependency to monitor database update, update is to get the data for display, but the problems is if there are multiple clients at the same time in the operation and input data too frequently, using SqlDependency way, the client's data will not be able to timely refresh, or data error, a great god can provide any good idea to solve this problem, on the Internet for the ability to trigger to do, and the server and client communication through the socket, but it felt too much stress on the server, you have any good idea, some some bai

CodePudding user response:

You are wrong.. The socket is the least stressed.

And you now function with database it doesn't matter.

To develop the service side is responsible for receiving and forwarding data.

Client connection after the server automatically put up forward real-time data is very strong.. This is the best solution..

CodePudding user response:

You mean, on the one hand, and of a service is a device to connect to collect data, on the other hand also and the client connected directly to send data to the client? I also want to deposit into the database data used for other functions, is now the client through what way to get the data real-time display, and data error is not efficient and stable

CodePudding user response:

Like a game you do, for example, legend, can you draw a good painting, you can do the data model is very good, but what you told investors "the game client saved to the database operation, server and other client to query the database table", so investors immediately went away! Because the network software can't tangle database table,

Data can be, even than to save to the database, but Internet software development, to gain competitive advantage, will, of course, is to see you, rather than watch can query the database,

CodePudding user response:

In terms of network topology form, may your server through a form with equipment, each client via the Internet (or local area network (LAN), at least after multilayer NAT router LAN) connected to the server, then you need to have some changes when the device status, related to the client have received instructions to fast, lightweight to refresh (as if into place money game client refresh interface, but not what to add and delete the game server database table), the design of this kind of system layer, the first entry, said communication technology, and at the time of first blocked with no database, use some database and so on questions,

CodePudding user response:

My server is a through the Socket and communications equipment, so that you want to do this kind of client, generally do not go as far as possible and database for docking, do data storage and management function, database client and server communication directly is a better way?

CodePudding user response:

After finishing the collected data in the database, the approach itself is no problem, and it is the right
Only takes time to get the latest data from the database to display terminals (10 frames per second is ok, it's not a movie)
The best fighter pilot in real time is a relative concept, instant response speed (from finding target to make the right response time) is 0.1 ~ 0.15 seconds, ordinary people is simply unattainable,
So if a catastrophic, is want to by your preset in the system of emergency procedures, rather than rely on artificial to evade

CodePudding user response:

Real-time display need the server active push message, signalr this framework can be used

CodePudding user response:

Use socket is suitable, the client connection server automatically put up forward data real-time is very strong..

CodePudding user response:

The building Lord, you solved, now I also encountered this kind of situation, please share your experience
  •  Tags:  
  • C#
  • Related