Java implementation of file synchronization system based on rsync synchronization algorithm (i)--Project Introduction __c language

Source: Internet
Author: User
Tags error handling rsync
main functions of the project:

File synchronization with a Java-like Rsync project: A has an incomplete file file_half,b has a full file file_total,a to B send incomplete file of the checksum code information, b using the full file analysis after the return of the difference data block, A after receiving the difference data block and the incomplete file file_half to reorganize to form the complete file file_total_copy.

Advantages:

When synchronizing the file content is only the difference file, you can reduce the transmission of data, reduce synchronization time (mainly reduce network transmission time), when the difference block relative to file size is very small, the advantage is particularly prominent. The added advantage is to support the breakpoint transfer and see the Difference section (which is a bit like SVN).


Main principle:

1. Split the incomplete file a into the same size data block at the Alpha end.

2. Two kinds of checksum for each data block (scrolling checksum MD4)

3. Officers transferred Guevara test results are sent to the beta end with full file B

4.β searches for a block of all the size s of File B to find a block of data with the same weak checksum and strong parity code as a piece of file a. This work can be done quickly with the help of scrolling checksums.

5.β generates the differential file block and related information and sends it to α,α to regenerate the full file B ' with the difference block and related information.

the difficulties encountered by the project:

1. Large amount of data, difficult to test and debug.

2. The byte-level data needs to be manipulated.

3. Analyze the algorithm design and optimization of the difference data block.

4. What kind of data to design, how to design.

5. Error handling.

6. How to use the datagram to control the client and the service side of the program running and communication.

7. The network environment is complex.

project progress and need to improve the problem:

1. Core synchronization on a single machine (using 127.0.0.1 loopback test) has been implemented.

2. Only one operation is supported temporarily, and the user experience is poor.

3. The client and server are less able to interact when the program is running.

main technology of the project:

Java language, JavaFX interface, rsync algorithm reference


Project Test Interface:

Project Core sequence diagram:

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.