Active Topics

 


Reply
Thread Tools
Posts: 105 | Thanked: 15 times | Joined on Dec 2009 @ Baltimore, USA
#1
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
 
Posts: 162 | Thanked: 79 times | Joined on Jan 2010 @ Finland
#2
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.
 
velox's Avatar
Posts: 394 | Thanked: 1,341 times | Joined on Dec 2009
#3
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.
 
Reply


 
Forum Jump


All times are GMT. The time now is 04:23.