network programming

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • waleed

    #1

    network programming

    i have to come up with the best solution for using files
    in a LAN. The problem is like this:
    In a client-server application is it more feasible to let
    the client(s) edit a file on the server or let the
    client(s) download the file first and then upload the
    file again to the server after its done with changes.
    the application is running on a LAN. i need the solution
    for C# because its used for implementing both client and
    the server.

  • Ignacio Machin

    #2
    Re: network programming

    Hi,

    It depend of the file's size and very important the concurrency , if you
    copy the file locally and then when you finish with it you copy it back to
    the server ,what happen if two clients do the same? one overwrite other's
    changes.

    A more controlled environment is if the file is kept in the same place and
    the clients try to modify it, one will have to lock it when writting
    preventing others to make changes to it. this solution is more robust but is
    not very scalable, as only one client can write to the file at the same time

    the best solution would be if there is a server side instance, like a web
    service, that is the one making modification on the file and all the clients
    use it instead of accesing directly to the file.


    Hope this help,

    --
    Ignacio Machin,
    ignacio.machin AT dot.state.fl.us
    Florida Department Of Transportation

    "waleed" <waleedriaz@yah oo.com> wrote in message
    news:0b1b01c37c 35$a4a259c0$a30 1280a@phx.gbl.. .[color=blue]
    > i have to come up with the best solution for using files
    > in a LAN. The problem is like this:
    > In a client-server application is it more feasible to let
    > the client(s) edit a file on the server or let the
    > client(s) download the file first and then upload the
    > file again to the server after its done with changes.
    > the application is running on a LAN. i need the solution
    > for C# because its used for implementing both client and
    > the server.
    >[/color]


    Comment

    • waleed riaz

      #3
      Re: network programming



      well thats what i thought of earlier. but even if we use a web service
      it would still be accessing the same file, and giving access to one user
      and locking it for others? how would a web service make any difference?

      *** Sent via Developersdex http://www.developersdex.com ***
      Don't just participate in USENET...get rewarded for it!

      Comment

      Working...