Tuesday, May 13, 2008

Processing incoming requests

Let us look at processing incoming request from different mobile applications. Depending on the channel the request might be asynchronous or synchronous, by this I mean the response is is sent using a different connection to the request vs the response being sent on the same connection of the request.
An example of an asynchronous channel would be SMS. The mobile phone sends a SMS to the server via the mobile network operator's infrastructure, the server process the request and then establishes a connection to the mobile network operator to send out the reply SMS. The incoming and out going SMS are not tied together in any way other than by the data they contain.
An example of a synchronous channel would be HTTP over GRPS. Here a connection is opened, the HTTP request data is sent to the server, the server processes the request and sends the response data down the connection and the connection is closed.
For asynchronous communication your application will require a level of internat thread management. This is difficult to achieve using many web scripting languages such as php whereas for synchronous communication you can get away with a web scripting language. To build an application that supports both types of communication requires a lot of thread management and synchronization techniques.

No comments: