c# – C # Command Server + Android Client application architecture, what's the best way to do it?


So the subject:

I strain my brains on how to organize a monitoring system for devices on the computers of the network. I need to know the state of the device on a particular computer and its recent actions. And this "need to know" must be implemented in the form of an android application that will display these states.

There are N computers, each has a bot in the tray that monitors the processes associated with the device and writes a log to a remote MS SQL database (implemented) process or restart). I thought that raw-SQL queries from each computer were somehow frivolous and, after reading the Habr, after reading the Habr, I couldn't connect directly from the android to MS SQL, I decided to combine all operations related to the base into the Command Server. It seems that all operations with the base will go through him. By means of sockets, I sort of figured out how to receive and send messages like "HelloWorld". But here a lot of questions arose at once:

  • Too many links in the chain, can you somehow shorten it?

Login: MonitoringBot -> CommandServer -> MS SQL Insert, Update commands

Output: AndroidClient -> CommandServer -> MS SQL Select command

Control: AndroidClient -> CommandServer -> MonitoringBot win Commands -> CommandServer -> Response to AndroidClient

  • What is the best way to send commands? Maybe some kind of protocol needs to be used?
  • How to quickly update the information on the AndroidClient when the database changes?
  • Are there other options for implementing this task?


ASP Webservice? Android client -> send webserivce command, Android client -> ping some time for db status by ASP Webservice?

In my opinion, it is a good idea to close the interaction through the CommandServer. Write down just a competent api.

Scroll to Top