Own network protocol

pfranken85 at gmail.com pfranken85 at gmail.com
Sat Dec 27 04:56:09 EST 2014


Hello!

I am just about setting up a project with an Raspberry Pi that is connected to some hardware via its GPIO pins. Reading the data already works perfectly but now I want to distribute it to clients running in the network. Hence, I have to setup a server in Python.

I do not want to reinvent the wheel, so I am asking myself whether there is a good practice solution. It should basically work such that once value (can be either binary or an analog value) has changed on the server, it should send the update to the connected clients. At the same time, it should be possible for the client to send a particular request to the server as well, i.e., switch on LED X.

What kind of protocol do you recommend for this? UDP or TCP? Do you recommend the use of frameworks such as twisted?

Thanks for your input!



More information about the Python-list mailing list