Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / December 2004

Tip: Looking for answers? Try searching our database.

Async WS not working well

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Kenny M. - 30 Nov 2004 22:43 GMT
Hi

I'm receiving Data from 20 clients around the city and updating my SQLServer
DB
via an Async WS

I'm using DialUp 56kb on each client

The process:

1. I create a text file
2. I wrote the data to the Text File (Serial and amount)
3. I read the Text File
4. put the content into a string Var
5. Pass the string var into the Async WS method
6. Delete the file
again

The Problem:
Records are being duplicated on the DB

When I switch to the Sync WS everything is fine!

Any sug about this behavior

Signature

Kenny M.

Dan Rogers - 01 Dec 2004 00:14 GMT
Hi Kenny,

Where are the duplicates coming from?  Is the same request being made by
the same client, over and over (replay issue)? or are the duplicates coming
from different clients coming up with the same data (concurrency control
issue)?

How are you createing an Asynchronous method?  Asynchronous is a
much-misunderstood term that often means both "called with no client side
wait" and "fire and forget".  The automatic proxies allow the first
approach to be done by calling BeginXXMethod on the client side.  Another
way to make this happen is to make the method a one-way method by
attributing the void method on the server side as one-way.  Which is it in
your case?

In either case, it is the designers responsibility to make sure that a
multi-user, multi-location client-server system is immune to replay issues
(some call these inadvertent attacks).  Typically, each request is
accompanied by a serial number that is unique to each caller or is globally
unique.  The server side takes the responsibility for ignoring requests
that have already been made (and optionally returning the original response
- strongly recommended).

For concurrency related issues, the server/clients protocol must include
elements that allow you to distinguish overlapping requests to update or
add the same item, and rejecting all but the first one.  Alternately, the
protocol should provide a voluntary locking mechanism that lets a caller
request permission to update/add something, perform the add, and then
release the lock.  Locks typically have a time limit so they can
auto-expire.

None of these come for free when you say "one-way" - you have to plan on
some means for providing these abilities/checks/preventions when you build
a multi-client/multi-location distributed system.

I hope this helps

Dan Rogers
Microsoft Corporation
--------------------
>Thread-Topic: Async WS not working well
>thread-index: AcTXLfSTN9Op+BoNSJ+VpfbELUa1sA==
[quoted text clipped - 17 lines]
>Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl
>Xref: cpmsftngxa10.phx.gbl
microsoft.public.dotnet.framework.aspnet.webservices:26908
>X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservices
>
[quoted text clipped - 22 lines]
>
>Any sug about this behavior

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.