Wudang arts and cache proxy 1)

Source: Internet
Author: User
Wudang arts and cache proxy... original

For sequeners and related content, see: http://blog.joycode.com/peon/articles/16504.aspx

In Wudang Mountains, Zhang Sanfeng's old road started Wudang school and received seven Disciples: Song yuanqiao, Yu Linzhou, Yu daiyan, Zhang Songxi, Zhang cuishan, Yin liting, and Mo shenggu, known as Wudang Qixia. 7di
Zi Zhong, Song yuanqiao is the manager of the road, and is well-developed and easy-to-understand. At the same time, he has a lot of research on similar fortune telling. Yu Lianzhou has the strongest martial arts skill, and Taijiquan is very powerful. Yin liting is good at jianshu, and other disciples have their own strengths.

Zhang Sanfeng closed his doors all the year round and studied Wuxue. The seven disciples received some disciples. Song qingshu, son of Song yuanqiao, was the best among the Third Generation disciples of Wudang.

According to the rules of Wudang, each disciple (client) can ask for advice from the Seven Masters (server), write the difficulties in practice on paper (request), and send them to the residence of masters, then the response is answered by the various masters ).
 
This relationship is the most direct server-client relationship.

However, there are some problems. Wu Dang Qixia lives in different places, and some places are difficult and dangerous. Not all disciples can arrive. In this way, Song yuanqiao is called the proxy
Server), every disciple only needs to know the residence of Song qingshu (set the proxy address), write the problem on the paper, write the name of the master who wants to ask for advice, and then hand it over to Song qingshu, you can. Song qingshu transfers the paper
Give the answer to one of the seven disciples and give the answer to each disciple.
 
For Song qingshu, the disciples sent his paper to him and handed it over to the masters. In this relationship, Song qingshu is equivalent to master.
(Server), disciples are apprentices (client), and then song qingshu asks Qi Xia. In this relationship, Song qingshu is the client and Qi Xia is the server, it is called generation
(Proxy), Song qingshu is equivalent to a proxy server.

In this proxy relationship, each disciple needs to know the address (set proxy address) of Song qingshu. This relationship is called explicit proxy, and proxy can be set for IE and mediaplayer.

After a while, various disciples thought that this method had avoided a lot of trouble, but it was very slow. Song qingshu is also bored with this kind of errands. He found that most people are asking a few questions.
(80% of access is concentrated on 20% of content), so Song qingshu records the answers to these questions in his IBM notebook (cache ), song qingshu will not
You need to ask Qi Xia again and directly find the answer and reply it to each disciple, so that each disciple can get a much faster response, wudang Qixia also has more time to do other things (reducing the burden on the server ). Song
Qingshu's head is flexible. He also wroteProgram, Count the frequency of questions asked, keep a record of new hot questions at any time, and eliminate no longer popular questions (cache replacementAlgorithm).

After a while, Song yuanqiao secretly told Song qingshu that he was going to take him as the heir to the head, so that he could perform well. Song qingshu changed his work style. Instead of asking his disciples to give him his paper, he ran.
Collect the paper and hand it to Wudang Qixia. Many new disciples only know that they have written the paper at the door and will naturally be guided by Wudang Qixia. Everyone forgot the things that song qingshu did, But Zhang Sanfeng said to Song qingshu
He was very appreciative. He was the heir to the armed forces.

This relationship is called implicit proxy. The customer does not realize the existence of the proxy server or need to set the address of the proxy server. However, both client requests and server responses go through the proxy server, the proxy server is transparent to customers ).

Sequel: http://blog.joycode.com/peon/archive/2004/03/21/16756.aspx
From: http://blog.joycode.com/peon/archive/2004/03/08/15171.aspx

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.