Big Binary Transactional Model

I am creating a binary editor for some very large binaries. One of the requirements for the software is that the editor cannot modify the source file, so the target file must be an edited copy of the original.

I want to create an editor in such a way that the file is copied only once (this will be a 20-minute process). I know that I can lock the file during editing, but if the user quits the program, they will have to go through the entire 20-minute copying process again if I cannot find a way to determine that they are still in their initial editing session.

Is there any simple process that you can think of, through which I can let the user "register" the copied file in some way as an editable file, and when they are filled with all their changes, "complete" the file?

Ideally, such a process will allow me to determine if the edited file or transaction information between editing sessions has been changed (faking or finalizing will result in another copy if the file is edited again).

+3
source share
4 answers
  • Create and save a record (db?) Of sessions in a centralized location.
  • , , IP-, , , . , .
  • , .
  • , , . , , , .

?

+1

, , . , . .

, , .

, .

, . - , . , , , , .

, blob, , . , , , - . , , .

, . , , . , , , . ( , .)

, (.. ), , . , .

+1

, ? (, pid). pid - pid, . pid, . pid , ; , , ( ). pid 0, .

: , ?

, "diff" . , "" , . , , .

, , , , . , , . 20 , . diff, .

+1

Since you are thinking about transactions and file system activity, it may be helpful to consider Transactional NTFS. This does not answer your question, but may give you a new idea of ​​the possibilities. Since your question is tagged for C # and Windows, you can look at the .NET shell, for example here: http://offroadcoder.com/CategoryView,category,Transactions.aspx . Scott Kluppel shows how to do transactional NTFS using the familiar .NET TransactionScope idiom. I quickly checked what Scott did and, like what I saw.

+1
source

Source: https://habr.com/ru/post/1785494/


All Articles