![]() |
Best way to communicte between mobile and server?
Hello Everyone,
Im developing a application that needs to exchange data with a server every 15 second. (about 2-3 kb) I have thought of two approaches, but im not sure of either. method one, use libcURL to make post and request data to a php or django server method two, have a socket connection going between the cellphone and the server. Is there anything out there that may be similar to what I am doing ? any suggestions welcome. -Maze |
Re: Best way to communicte between mobile and server?
Well. Depends pretty much what you want to achieve. I'd say that the easiest way is to use the technology that you are familiar with.
One thing that I would recommend you to check are web services. Setting a system up is not that easy, but after setting up the server and publishing the service you can really easily use the service provided on almost any language without having to understand anything about sockets or protocols such as HTTP. |
Re: Best way to communicte between mobile and server?
Maybe you might want to look into the JSON-format for communication over slow connections if you take the HTTP-route. There are ways to de- and encode JSON for almost every programming-language and it's overhead is not as big as XML...
I've read somewhere that PHP's json_encode() is faster than the 'php-native' serialize(), but can't remember where, which makes the information kind of rubbish. |
All times are GMT. The time now is 19:35. |
vBulletin® Version 3.8.8