Another idea of generating files-shared file synchronization

Source: Internet
Author: User
Background

Because of the large website traffic, multiple servers are required to generate static files and then load the files on multiple hosts. All these are the top priorities. One is required for the method, and the other is for the generation process to consume too much CPU and memory operations, problems often occur. Common generation methods: 1. multiple servers, one WebService for each server, WebService generation called, and two. Socket multi-server generation. The result is that socket is better than WebService. My idea is, Shared file synchronization. (No specific applications currently)

 

Project display

As shown above, files are synchronized from win 7 to 2003, with a success rate of 100%. The test file size is 1 kb ~ 3 m, which is executed by a single thread and multiple threads respectively, and the synchronization file is stable. The details are as follows:

Type Quantity Execution time Average time/count
Single thread 1000 44888 Ms 44 ms
Multithreading 1000 168946 Ms 168 Ms



Note: The file size is 32.95kb.


Advantages and disadvantages

Advantages:

1. Fast generation.

2. stable and high success rate.

3. The shared Maintenance Cost Based on Windows is low, and there is no need to maintain or consider optimization.

Disadvantages:

1. It must be an intranet.

2. You must have shared permission and sufficient permissions to perform operations.

Conclusion

The value of Dev lies in innovation, openness, and terrible problems. What is terrible is that it cannot find the reason. It can do only a few things well in life, so that you can have a clear conscience.




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.