|
-
Jan 15th, 2009, 10:50 PM
#1
Thread Starter
Junior Member
replication
scenario:
-folder x resides on server a, server b ,server c
-x contains same set of files in a,b,c
whenever any file gets modified in a, it should get also modified in b and c as well
similarly b->a,c and c->a,b
my idea of implementaion is
-when ever any file is modified on a server, compare timestamps and force copy the modified in the other two
How should i go for implementing it?
1)how to check if a file is modified
2)how often this check should be done and how this should be implemented
should a service be running to perform thi check
i want to do this using .NET
Let me know your thoughts and suggestions
-
Jan 16th, 2009, 01:44 AM
#2
Re: replication
You may try using the FileSystemWatcher class. Here is a sample.
-
Jan 16th, 2009, 05:29 AM
#3
Re: replication
Use FSW and to make it more robust, use an MSMQ or BizTalk or something reliable for message queueing. The problem with FSW is that it is not entirely reliable if you attempt to start copying the file over immediately, especially if a large file is still being written to disk or if another process has a lock on it.
-
Jan 24th, 2009, 07:20 AM
#4
Thread Starter
Junior Member
Re: replication
@dee u
good article. i have follwed the steps in the article you mentioned but i have the following error
"Cross-thread operation not valid: Control 'txt_folderactivity' accessed from a thread other than the thread it was created on"
any thoughts?
-
Jan 24th, 2009, 10:35 AM
#5
Re: replication
The error is very straightforward. You are trying to access the textbox from a thread other than the UI thread. I'm going to guess this has to do with the FSW being triggered. Take a look at this tutorial for accessing controls across threads.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|