[NTLUG:Discuss] What is the best method to communicate between a device and a server?

Wayne Walker wwalker at bybent.com
Fri Apr 4 11:11:23 CDT 2008


Use NTP for time maintenance
Use HTTP for all else (HTTP has GET, POST, DELETE, etc.)
Look up RESTful programming and you can write the server side VERY
simply and cleanly.

FTP is unsecure and a VERY ugly protocol to try to traverse a firewall
with.

SNMP often goes across UDP and is therefore unreliable.  It also just
doesn't fit your model.

SMTP) is a heavy protocol made specifically for mail.  I'd not use it
except for sending mail.

On Fri, Apr 04, 2008 at 08:34:58AM -0500, Kipton Moravec wrote:
> I am designing a device or appliance (it does not matter what) that
> needs to report results to a server, over the Internet and get new
> instructions once a day or whenever it powers up. (Or had a power
> failure). There could be thousands of these devices.
> 
> I have to assume the device will be behind a firewall so the device will
> have to contact the Linux server and the server will not be able to
> initiate the communications to the device.
> 
> The device will send a progress report each day, reporting a few
> statistics (probably 100 - 200 bytes). The only other time it will
> report is when things go wrong.
> 
> When it checks in, it will look for any new commands for itself,
> including software updates. A command may be to provide additional data,
> or a recommendation to check in at a specific time (for load balancing
> on the server). It may be required to download a new program revision,
> and reprogram itself.
> 
> I do need to keep track of time, so I am thinking of implementing NTP
> also. It will have its own clock that is good to a couple of seconds per
> month.
> 
> What application protocols are best for something like this?
> 
> I can see using FTP to upload and download files with the data.
> 
> I can see using SMTP and a POP server (email) for sending and receiving
> messages.
> 
> Some have suggested SNMP which I am not familiar with.
> 
> Another way is to open a socket to socket custom connection.
> 
> Someone suggested opening up a secure telnet connection.
> 
> I am sure there are more ways to do this. But what I do not know is what
> is the best way to do this. I want something that is robust, and easy.
> (KISS) And preferably small. 
> 
> It is hard to predict what will be required in the future so flexibility
> is good for both sides, the device and the server.
> 
> Any suggestions? And more importantly why one way would be better than
> another?
> 
> Kip
> -- 
> Kipton Moravec KE5NGX
> "Always do right; this will gratify some people and astonish the rest."
> --Mark Twain
> 
> 
> 
> _______________________________________________
> http://www.ntlug.org/mailman/listinfo/discuss

-- 

Wayne Walker

wwalker at bybent.com                    Do you use Linux?!
http://www.bybent.com                 Get Counted!  http://counter.li.org/
Perl - http://www.perl.org/           Perl User Groups - http://www.pm.org/
Jabber:  wwalker at jabber.bybent.com   AIM:     lwwalkerbybent
IRC:     wwalker on freenode.net



More information about the Discuss mailing list