Home > Archive > SQL Anywhere Mobile > October 2005 > download acknowledgement question









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author download acknowledgement question
Tony Lanzel

2005-10-27, 8:20 am

We recently upgraded to ASA 9.0.2.3044 from ASA7 and I'm
just now seeing what effect having the download
acknowledgement turned off is doing.

I have download acknowledgements turned off as recommended
by the help docs. Back in my consolidated DB, I am
recording sync times from my sync events and I use this
information to tell me if my clients are successful in their
synchronizations. For example, I have a sync begin, sync
end, upload begin, upload end, download begin, and download
end time being stored in a table.

Here's where the problem comes into play. I have a client
who has been failing downloads for a couple weeks now, due
to me sending data down that doesn't fit a foreign key
constraint. That's fine, but I had no idea it was ever
failing! According to my stats back here, the consolidated
side thinks it did finish because it continued to log a
download_begin, download_end, and sync_end times and I can
only assume it is thinking this because the download
acknowledgement is turned off.

I would like to take advantage of the download
acknowledgement being off (and download buffering as a
result), but at the same time, we absolutely need to know
back here if a download fails for a client so we can either
retry synchronization right away or look into the problem (I
would have thought most people would want to know when an
error occurred, so I was a little surprised that this is the
default behavior). Is it possible for me to have the best
of both worlds where I can still have appropriate feedback
from the client when an error occurs and still take
advantage of the benefits of turning download
acknowledgement off? In our business, it's more important
for us to ensure our synchronizations are working
successfully than to have them work fast, so if we have to,
we'll turn on download acknowledgements.

Please let me know what options are available.

Thanks!
Breck Carter [TeamSybase]

2005-10-27, 8:20 am

First of all, turn download acknowlegement on so your application
starts working properly again :)

Then, consider your options... with acknowledgment off, you cannot
know for sure the download actually worked until the *next*
synchronization starts.

If you have my book, see the Tip on page 252. If not, here it is...

=====
Tip: Your MobiLink scripts on the consolidated database can determine
if the previous download failed on the remote database even if
SendDownloadACK is 'OFF', and even if you don't use a hook procedure
to record the error. Simply compare the @last_upload and
@last_download parameters in the begin_publication script. If
@last_upload is larger than @last_download it means the previous
download failed on the remote database even though server might have
thought everything was OK. This allows you to leave SendDownloadACK
set to 'OFF' to reduce the load on the MobiLink server and on the
consolidated database, and that is especially helpful if the remote
databases are running on slower computers. For more information and a
detailed example see the later Section 7.24 The MobiLink System
Tables.
=====

For some unknown reason, actual *sample code* doesn't appear until
page 257... lemme know if you want that too :)

Breck


On 7 Oct 2005 07:03:47 -0700, Tony Lanzel wrote:

>We recently upgraded to ASA 9.0.2.3044 from ASA7 and I'm
>just now seeing what effect having the download
>acknowledgement turned off is doing.
>
>I have download acknowledgements turned off as recommended
>by the help docs. Back in my consolidated DB, I am
>recording sync times from my sync events and I use this
>information to tell me if my clients are successful in their
>synchronizations. For example, I have a sync begin, sync
>end, upload begin, upload end, download begin, and download
>end time being stored in a table.
>
>Here's where the problem comes into play. I have a client
>who has been failing downloads for a couple weeks now, due
>to me sending data down that doesn't fit a foreign key
>constraint. That's fine, but I had no idea it was ever
>failing! According to my stats back here, the consolidated
>side thinks it did finish because it continued to log a
>download_begin, download_end, and sync_end times and I can
>only assume it is thinking this because the download
>acknowledgement is turned off.
>
>I would like to take advantage of the download
>acknowledgement being off (and download buffering as a
>result), but at the same time, we absolutely need to know
>back here if a download fails for a client so we can either
>retry synchronization right away or look into the problem (I
>would have thought most people would want to know when an
>error occurred, so I was a little surprised that this is the
>default behavior). Is it possible for me to have the best
>of both worlds where I can still have appropriate feedback
>from the client when an error occurs and still take
>advantage of the benefits of turning download
>acknowledgement off? In our business, it's more important
>for us to ensure our synchronizations are working
>successfully than to have them work fast, so if we have to,
>we'll turn on download acknowledgements.
>
>Please let me know what options are available.
>
>Thanks!


--
SQL Anywhere Studio 9 Developer's Guide
Buy the book: http://www.amazon.com/exec/obidos/A...7/risingroad-20
bcarter@risingroad.com
RisingRoad SQL Anywhere and MobiLink Professional Services
www.risingroad.com
David Fishburn

2005-10-27, 8:20 am

Tony Lanzel wrote in news:43468043.28bd.1681692777@sybase.com
of sybase.public.sqlanywhere.mobilink:

Breck has an excellent tip and I suspect that is all you need to do.

If you do have DownloadAck turned on, then you should read:

MobiLink Administration Guide
Synchronization Events
end_synchronization connection event

Item Parameter Description
1 ml_username VARCHAR(128)
2 sync_ok INTEGER. This value is 1 for a successful synchronization
and 0 for an unsuccessful synchronization.


Obviously, the sync_ok parameter canNOT be set appropriately if
DownloadAck is false.

--
David Fishburn
Certified ASA Developer Version 8
iAnywhere Solutions - Sybase
Professional Services
Please only post to the newsgroup
Please ALWAYS include version and MORE importantly BUILD number with
EACH post (dbeng9 -v).

EBFs and Maintenance Releases
http://downloads.sybase.com/swx/sdmain.stm

Developer Community / Whitepapers
http://www.ianywhere.com/developer

CaseXpress - to report bugs
http://casexpress.sybase.com

CodeXchange - Free samples
[url]http://ianywhere.codexchange.sybase.com/servlets/ ProjectDocumentList[
/url]

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com