Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Services > Async WS not working well

Reply
Thread Tools

Async WS not working well

 
 
Kenny M.
Guest
Posts: n/a
 
      11-30-2004
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


--
Kenny M.
 
Reply With Quote
 
 
 
 
Dan Rogers
Guest
Posts: n/a
 
      12-01-2004
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==
>X-WBNR-Posting-Host: 200.109.117.119
>From: "=?Utf-8?B?S2VubnkgTS4=?=" <(E-Mail Removed)>
>Subject: Async WS not working well
>Date: Tue, 30 Nov 2004 14:43:05 -0800
>Lines: 28
>Message-ID: <(E-Mail Removed)>
>MIME-Version: 1.0
>Content-Type: text/plain;
> charset="Utf-8"
>Content-Transfer-Encoding: 7bit
>X-Newsreader: Microsoft CDO for Windows 2000
>Content-Class: urn:content-classes:message
>Importance: normal
>Priority: normal
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
>Newsgroups: microsoft.public.dotnet.framework.aspnet.webservic es
>NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
>Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl
>Xref: cpmsftngxa10.phx.gbl

microsoft.public.dotnet.framework.aspnet.webservic es:26908
>X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservic es
>
>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
>
>
>--
>Kenny M.
>


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Newbie: async mode dedicated versus async mode interactive!! Pink_Floyd Cisco 4 06-16-2006 12:16 AM
Async webservice call in async webpage (.Net 2.0) does not return Steven ASP .Net Web Services 0 11-30-2005 01:06 AM
Locally working XSLT fails on host with message "Sablotron error on line 1: XML parser error 4: not well-formed" Martin Plantec XML 9 10-31-2005 06:22 PM
Async Dialback on 1841 w/WIC-2AM not working nazgulero Cisco 1 10-24-2005 06:36 PM
Hi Whats considered to be a well priced and well reviewed plasma tv 42 inch and above ? Hmmmmmmm DVD Video 8 09-28-2004 09:32 AM



Advertisments