For my Electrical Engineering summer research project we're using a single mysql server and multiple iPhones. The iPhones are going to collect data and send it to the server which will populate the database with the data. I am new to socket/network programming so I need some pointers to my proposed concept.

The server (C++ program) will be listening to a port that multiple clients are going to connect too. The clients are going to send location information and a maximum of 250 character message or search string. the server will return a status message or results from the query. To ensure that the server responds to each client as close to real time (connection speed ignored) would i create a separate thread for each connection or a completely new forked process. Right now we expect at least a maximum of a hundred connections at once in the future we expect a couple thousand. would that be the best way to handle the traffic load on a single dual core server for a hundred connections.

9 Years
Discussion Span
Last Post by Salem

It's like a post based system would this method be appropriate cause I heard other people use web servers and php scripts to be the medium between the iphone and the database so that the iphone is not directly connected to the database for security reasons.


True enough, but that's a separate decision from the processes vs. threads question you originally asked.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.