Using XML file as a data source - concurrency problem?

Discussion in 'ASP .Net' started by Artur Sorszegi, Jul 29, 2004.

  1. Hi!

    There a lot of examples and talk about using an XML file as a datasource.
    Given a DataSet object, you can easily load data from the XML file, and
    display it in for example a DataGrid, or bind the data to other controls.
    You could even edit the data, and save it back using the DataSet objects'
    WriteXml method. But these resources fail to specify one thing, namely, if
    this causes any problems when multiple users use the application at the same
    time? I think you could use the expression concurrency problem for it, where
    two users start using the data at the same time (for example), and both make
    changes, first the first saves it, then the second. My feeling is, that this
    could overwrite changes by one user with changes of the other.

    Is this really so? Can it be prevented? In many cases, an XML file could
    server just as well as a database, but having this problem, and not even
    knowing if it works, make it not a so good solution.

    I assume, that page requests can be processed in parallel by ASP.NET (or
    else this would not be a problem).

    Anyone, any ideas?

    Thanks
     
    Artur Sorszegi, Jul 29, 2004
    #1
    1. Advertising

  2. Artur Sorszegi

    Scott Allen Guest

    Hi Artur:

    I don't have a good answer to your question, but I would suggest you
    poke around the source code for dasBlog:
    http://www.gotdotnet.com/Community/Workspaces/workspace.aspx?id=77a29128-4746-4473-b676-e4f1517a1907

    dasBlog uses an XML file as a datasource and judging by it's
    popularity on the web it is relatively scalable. I imagine with some
    careful caching techniques and synchronization one can pull it off.

    --
    Scott
    http://www.OdeToCode.com

    On Thu, 29 Jul 2004 12:44:02 +0300, "Artur Sorszegi"
    <> wrote:

    >Hi!
    >
    >There a lot of examples and talk about using an XML file as a datasource.
    >Given a DataSet object, you can easily load data from the XML file, and
    >display it in for example a DataGrid, or bind the data to other controls.
    >You could even edit the data, and save it back using the DataSet objects'
    >WriteXml method. But these resources fail to specify one thing, namely, if
    >this causes any problems when multiple users use the application at the same
    >time? I think you could use the expression concurrency problem for it, where
    >two users start using the data at the same time (for example), and both make
    >changes, first the first saves it, then the second. My feeling is, that this
    >could overwrite changes by one user with changes of the other.
    >
    >Is this really so? Can it be prevented? In many cases, an XML file could
    >server just as well as a database, but having this problem, and not even
    >knowing if it works, make it not a so good solution.
    >
    >I assume, that page requests can be processed in parallel by ASP.NET (or
    >else this would not be a problem).
    >
    >Anyone, any ideas?
    >
    >Thanks
    >
     
    Scott Allen, Jul 29, 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. Craig Deelsnyder

    Re: data concurrency

    Craig Deelsnyder, Aug 29, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    373
    Craig Deelsnyder
    Aug 29, 2003
  2. Author Tarun Tyagi
    Replies:
    0
    Views:
    722
    Author Tarun Tyagi
    Dec 29, 2004
  3. igor
    Replies:
    0
    Views:
    270
  4. Mike P

    data concurrency

    Mike P, Aug 28, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    107
    Mike P
    Aug 28, 2003
  5. Replies:
    5
    Views:
    86
    Chris Angelico
    May 14, 2014
Loading...

Share This Page