Async WS not working well

Discussion in 'ASP .Net Web Services' started by Kenny M., Nov 30, 2004.

  1. Kenny M.

    Kenny M. Guest

    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.
    Kenny M., Nov 30, 2004
    #1
    1. Advertising

  2. Kenny M.

    Dan Rogers Guest

    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=?=" <>
    >Subject: Async WS not working well
    >Date: Tue, 30 Nov 2004 14:43:05 -0800
    >Lines: 28
    >Message-ID: <>
    >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.webservices
    >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.webservices:26908
    >X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservices
    >
    >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.
    >
    Dan Rogers, Dec 1, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Michael McGarry

    PyQt not working well on Mac OS X

    Michael McGarry, Dec 14, 2005, in forum: Python
    Replies:
    2
    Views:
    342
    Dan Sommers
    Dec 14, 2005
  2. Replies:
    6
    Views:
    400
  3. Norm
    Replies:
    7
    Views:
    448
  4. Matthias Sommer
    Replies:
    0
    Views:
    320
    Matthias Sommer
    May 28, 2008
  5. Steven
    Replies:
    0
    Views:
    358
    Steven
    Nov 30, 2005
Loading...

Share This Page