Page 2 of 2 FirstFirst 12
Results 11 to 13 of 13

Thread: iOS reconnect troubles

  1. #11
    Junior Member
    Join Date
    Nov 2011
    Posts
    13
    Ah interesting!

    If PHP returns a payload to the webserver (to be sent to the user) I'm not sure there's a practical way to detect that the payload never made to to the client (ie the connection became stale)

    So, long ping is running... change detected, change reported to user php completes, but payload never reaches client.

    However, I've noticed that the device subsequently attempts to "ping" but doesn't detect the change...

    Normally.. I imagine this is how it works normally....

    Ping, change detected, change reported to client
    sync, changes collected, changes delivered to client.
    Ping, etc.....


    But with a poor connection:

    Ping, change detected, change report fails to reach client
    ...
    ...
    Ping, wait for more changes.


    Would it be worth investigating repeating the result of the last ping if no sync has happened since the previous ping and no changes are immediately available?
    I feel like the spec should have more about "failed" pings...

    I'm hoping not to waste your time teaching me the intricacies of activesync... so I'll do more digging..

    I'm interested as to why its not a problem for android / windows... it doesn't surprise me that apple might be much more sensitive..

  2. #12
    Senior Member
    Join Date
    Nov 2007
    Location
    Belo Horizonte, Brazil
    Posts
    1,470
    Hi cpitchhord,

    Quote Originally Posted by cpitchord View Post
    Would it be worth investigating repeating the result of the last ping if no sync has happened since the previous ping and no changes are immediately available?
    I feel like the spec should have more about "failed" pings...
    If there weren't changes during ping request, the server responses with status 1 (no changes) and the device then issues a new ping request. For that to work the mobile device of course has to receive the response from the server.
    There is no way Z-Push can repeat the result of last ping (or any other command) because Active Sync protocol relies on a client server architecture and the client always issues the request to which the server responds.

    Quote Originally Posted by cpitchord View Post
    I'm interested as to why its not a problem for android / windows... it doesn't surprise me that apple might be much more sensitive..
    That's a good question to which we (Z-Push developers) don't have an answer. Only that there apparently are differences in how every vendor implements long term connection handling, network connection management via wifi/mobile data and last but not least the ActiveSync protocol itself. I'd be very happy to hear if you manage to dig something up in this matter.

    Manfred
    Please do not PM me asking for support. Use the forum instead. Thank you.
    I usually check the mobility thread at the end of the day, so please have some patience if there's no immediate response. Asking to look at certain thread per PM won't result in a faster answer.

  3. #13
    Junior Member
    Join Date
    Nov 2011
    Posts
    13
    Quote Originally Posted by manfred View Post
    Hi cpitchhord,



    If there weren't changes during ping request, the server responses with status 1 (no changes) and the device then issues a new ping request. For that to work the mobile device of course has to receive the response from the server.
    There is no way Z-Push can repeat the result of last ping (or any other command) because Active Sync protocol relies on a client server architecture and the client always issues the request to which the server responds.

    That's not quite what I meant, but I see what you mean..

    However, what I was thinking was more a "re-transmit on request" approach:

    What I think I've seen from the logs today:


    1) IOS sent ping request
    2) time passes
    4) IOS moves from wifi to 4G
    3) Z-push detects change
    4) Z-push tries to send response, not delivered
    5) More time passes
    6) IOS sends new ping request
    7) Z-push waits for a new change (i.e new mail to arrive)

    Because ios missed the response of the first ping, it ends up waiting for another new email to arrive before it updates / syncs

    What I imagine is a normal conversation:

    1) IOS sends ping
    2) Z-push waits for change
    3) Change detected
    4) Z-Push sends change response to IOS
    5) IOS sends Sync command
    6) Z-Push sends changes
    7) IOS sends another ping request
    8) Z-Push waits for another new change

    After a change detected ping, the device should sync...

    So its:

    1) Ping - change detected
    2) Sync
    3) Ping....

    However when it's broken its (the first ping change detected fails to arrive)

    1) Ping - change detected
    2) Ping...


    So, could we use that pattern to detect a ping was missed by IOS?
    If we knew that a ping was missed when a new ping request is made, we could immediately re-send the previous change detected


    PING:
    1) Ping cmd received
    2) If pending ping result exists:
    2a) SEND pending ping result - we'll immediately send the previous ping response
    2b) CLEAR pending ping result - we'll clear it so we don't repeat it a third time
    2c) done
    3) no pending ping result exists
    4) wait for change
    5) STORE change as pending ping result - Incase we couldn't successfully reply to the device
    6) send ping results (which might fail)

    SYNC:
    1) CLEAR pending ping result - If we're syncing, we don't need any previous ping results
    2) carry out sync


    That was kind of what I was thinking.

    I'm going to investigate exactly what changes are stored by z-push state when a ping is returned:

    a) it records which changes were detected so it doesn't re-report them
    b) it doesn't record anything, the state only changes after a sync action
    c) something else.

    The risk is, if we receive ping and report it... then the device ignores the ping and immediately pings again.. we'd keep sending a single duplicate... so I want to find out why a device wouldn't sync following a change..

Page 2 of 2 FirstFirst 12

Similar Threads

  1. SQL reconnect Errors
    By darootler in forum Administration and Integration
    Replies: 0
    Last Post: 26-09-2014, 08:02 AM
  2. Z-push 2.0.6 / Nokia N9 Troubles (Addressbook)
    By rickstinson in forum Z-Push when using Kopano/Zarafa
    Replies: 1
    Last Post: 04-02-2013, 03:59 PM
  3. SQL Reconnect error
    By kaya in forum Installation, Configuration and Maintenance
    Replies: 5
    Last Post: 28-11-2011, 09:12 AM
  4. [SOLVED] Troubles installing Zarafa Client 702
    By niels1 in forum Installation, Configuration and Maintenance
    Replies: 4
    Last Post: 18-11-2011, 07:41 AM
  5. Outlook Profile creation troubles...
    By ern64 in forum Outlook client
    Replies: 7
    Last Post: 14-10-2011, 11:08 PM

Bookmarks

Posting Permissions

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