I have many RPIs for IoT in pubs.
I need to monitor my RPIs and monitor licenses, services, disk space etc...
I have started to work on both server and client.
I am stucked, that I don't know, what will be better:
1) Client will have persistent connection with server
2) Client will connect to server only when some data are collected(for example cron every five minutes collects disk usage)
What do you think guys?
I know, that there are many tools already, but I need to make my own, because there will be many specific things to monitor.
If you have some tips, share it also with me please :)
Asked
Active
Viewed 1,056 times
0

user3063800
- 5
- 5
-
“many RPIs for IoT in pubs” — no idea what that means. Unless the meaning should be obvious to anyone who could possibly answer your question, I suggest you take the time to detail the acronyms you use, so people not familiar with that specific technology might help. Otherwise you're narrowing possible helpers to just those who know what “RPI for IoT in pubs” means, even if it's not relevant for a useful answer. – spectras Jun 18 '16 at 13:34
-
Okay, for example it is cashier system. Or monitoring, which seats in table are occupied. – user3063800 Jun 18 '16 at 14:20
1 Answers
0
I would go with "Client will connect to the server only when some data is collected (for example with a cron job every five minutes that collects disk usage)"[edited].
Also, do not overcomplicate your problem: E.g. do not write your own message format or TCP equivalent.
Just use JSON, BSON or XML and the code should be fairly easy to write.
If you need security and do not want third parties to listen to your disk usage reports use the ssl
package like here.

Community
- 1
- 1

Simon Kirsten
- 2,542
- 18
- 21
-
I use sockets with jsons right now and it works. If I use second option I don't have to add code to ping clients. – user3063800 Jun 18 '16 at 14:20
-
-
That one you answered me on. Does persistent connection need more performance? – user3063800 Jun 18 '16 at 14:33
-
Yes, but not noticeable. But a persistent connection is, in this case, pointless and it would be unnecessarily difficult to force a connection open for so long. – Simon Kirsten Jun 18 '16 at 14:44