sockets vs http
Posted: Tue Jun 30, 2009 10:37 am
Hello,
Not sure if this is the correct place to post this as it kind of fits everywhere! lol
Anyway, we are designing a new piece of hardware that will send messages to our server. The question I have is whether we send the messages vie http to a PHP page or use sockets - possibly having a php listening socket. I am trying to find information on which way is the best way to go - all I can find are some sockets tutorials but these don't really answer the question as to which is best.
The problem we are anticipating the the volume - the messages are very small 9 bytes on average but there will eventually be many of them. They cold grow to 6000 a minute. We don't want to put a strain on the web server by receiving all these messages and at the same time serving web pages to the clients. Also we are being charged a network charge for bandwidth.
My thinking that the packages sent on Http would be larger due to the header information? But has anyone got any idea how much larger? Can anyone think of any dire reasons not to go with a socket approach?
We are running a LAMP server on Cent OS.
Many thanks
Scott Bailey
Not sure if this is the correct place to post this as it kind of fits everywhere! lol
Anyway, we are designing a new piece of hardware that will send messages to our server. The question I have is whether we send the messages vie http to a PHP page or use sockets - possibly having a php listening socket. I am trying to find information on which way is the best way to go - all I can find are some sockets tutorials but these don't really answer the question as to which is best.
The problem we are anticipating the the volume - the messages are very small 9 bytes on average but there will eventually be many of them. They cold grow to 6000 a minute. We don't want to put a strain on the web server by receiving all these messages and at the same time serving web pages to the clients. Also we are being charged a network charge for bandwidth.
My thinking that the packages sent on Http would be larger due to the header information? But has anyone got any idea how much larger? Can anyone think of any dire reasons not to go with a socket approach?
We are running a LAMP server on Cent OS.
Many thanks
Scott Bailey