×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Jun 2009
    Posts
    2

    Network Timeout Question

    Hello,

    as I understand it -- the Connector component which sits on the Nokia mobile device must maintain a connection at all times with the Gateway. This is necessary as the Connector is the conduit for HTTP Requests and Responses. First of all -- is this understanding correct? If so, then this means that the Connector must maintain a connection to the Gateway at all times. But this is quite difficult to do as there will be numerous network elements between the Nokia mobile device and the Gateway computer (i.e. switches, nats, firewalls, etc...). Moreover, if there is a sufficient period of idle time in which no requests are received, it is normal behavior for some network elements to timeout idle connections. How does the connector deal with this problem?


    ThankYou

  2. #2
    Nokia Developer Expert
    Join Date
    Mar 2003
    Posts
    457

    Re: Network Timeout Question

    Quote Originally Posted by xman007 View Post
    as I understand it -- the Connector component which sits on the Nokia mobile device must maintain a connection at all times with the Gateway. This is necessary as the Connector is the conduit for HTTP Requests and Responses. First of all -- is this understanding correct?
    Yes
    If so, then this means that the Connector must maintain a connection to the Gateway at all times.
    That's correct.
    But this is quite difficult to do as there will be numerous network elements between the Nokia mobile device and the Gateway computer (i.e. switches, nats, firewalls, etc...). Moreover, if there is a sufficient period of idle time in which no requests are received, it is normal behavior for some network elements to timeout idle connections. How does the connector deal with this problem?
    There's periodic keepalive traffic between the gateway and the connector that, on the one hand, keeps the connection alive, and, on the other hand, allows the occasional network breakages that anyway will happen, to be detected.

    Johan

  3. #3
    Registered User
    Join Date
    Jun 2009
    Posts
    2

    Re: Network Timeout Question

    Thanks Johan,

    what is the timeout value you are using to establish a keep alive? And does the 'ideal' timeout value change during the day for a given mobile carrier or between carriers?


    Thanks

  4. #4
    Nokia Developer Expert
    Join Date
    Mar 2003
    Posts
    457

    Re: Network Timeout Question

    Quote Originally Posted by xman007 View Post
    what is the timeout value you are using to establish a keep alive?
    I actually don't know exactly what http://mymobilesite.net does; the following applies to the open sourced prototype.

    In the prototype, the keepalive messages are only sent by the gateway; the connector on the device just receives and discards them. Basically, the gateway sends a keepalive message with an ever increasing interval (we follow the Fibonnacci sequence) and when the connector does not receive an expected keepalive message - in each keepalive message, the gateway tells when the connector should expect the next - the connector reconnects (using another TCP socket) at which point the gateway reverts to last known good value. We have a maximum (configurable) interval length (300 seconds) where we stop when it has been reached.

    In some operator networks, a keepalive interval of 2 hours (yes, hours) should be enough. However, in practice there are anomalies, which causes the connection to break much earlier than that. So in order to detect those quickly you should have as short an interval as possible, but that's deadly for the battery. So, you have to strike a balance between increased battery consumption and the maximum length a device may be unreachable before it is detected.

    And does the 'ideal' timeout value change during the day for a given mobile carrier or between carriers?
    Under ideal conditions, I don't think the 'ideal' keepalive interval for a mobile carrier changes during the day and it could be so long (hours) that it wouldn't have any practical impact on the battery consumption.

    However, in practice the conditions are not ideal and you have to assume that the connection may break pretty much at any point in time. I don't have any hard evidence, but these unexpected breakages may to be related to base-station hand-overs or switching between 2G and 3G.

    Johan

Similar Threads

  1. Network Band Info
    By nishantghai in forum Symbian C++
    Replies: 7
    Last Post: 2010-10-24, 12:51
  2. RFComm timeout question
    By pekus in forum Mobile Java Networking & Messaging & Security
    Replies: 2
    Last Post: 2009-04-10, 15:46
  3. How to set WLAN IAP network mode to Ad-hoc instead of Infrastructure?
    By PopAndDestroy in forum Wired and Wireless interfaces (Closed)
    Replies: 2
    Last Post: 2007-08-29, 08:04
  4. Forcing 6630 to logon to 3G network
    By biatch0 in forum General Development Questions
    Replies: 1
    Last Post: 2006-01-02, 14:40
  5. some network question
    By ddhungry in forum Symbian Networking & Messaging (Closed)
    Replies: 1
    Last Post: 1970-01-01, 02:00

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •