Recommended Network Video: http://www.imooc.com/video/10055
The origins of ====storm.
Storm is an open-source, distributed, streaming computing system
What is distributed? is to disassemble a task to multiple computers to perform the same task in common with many machines,
The details of this multi-machine to shield, external to provide the same interface, the same service, such a system is distributed system.
Many years ago, there was no very norm distributed system, even if it existed, was confined to the specified domain,
Of course, some people try to extract the common part, invent a universal distributed system, but there is no good result.
Later, Google published 3 papers, proposed a distributed computing model, in the distributed system has a qualitative breakthrough.
One Daniel, after reading these 3 papers, was inspired and then invented the Hadoop system.
Then, the Hadoop-based transformation system is springing up, a succession of the emergence of the.
That Hadoop is not a set of software, but a complete ecosystem.
So, when people talk about distribution, they must talk about Hadoop.
However, Hadoop is not a panacea, it can only handle the requirements for batch computing. For, non-batch calculation can not meet the requirements.
Many times, we can only collect a period of time data, and so on when the data collected to a certain size, we began to mapreduce processing.
There is such a story:
-------------------
Passers-by IS in a media company a work, his main work is very simple, is to advertise on some search engines,
As we all know, the search engine on the ad is the bidding ranking, who local tyrants who is in front of the platoon, the money can only be ranked in the back.
Company A's competitors are relatively local tyrants, so, company A's ads have been in the back, there is no good way.
Later, passers-by came up with a bad idea, is to use the program constantly to click on the competitor's ads, so that the opponent's advertising costs
A quick spending adjustment, so that company A can put ads in front of the bargain.
Search engine companies are trying to identify these malicious clicks to protect the merchant and return the charges for these malicious clicks to the merchant.
In general, if MapReduce is used, it is generally necessary to collect a period of time data and then according to these
Data to figure out which clicks are malicious, collecting the data itself is time-consuming, and then after the calculation is complete,
There is basically nothing left for the advertising costs of local tyrants merchants.
So, we hope that when the click occurs, even if the click is cheating behavior, timely can not be judged immediately,
should also be calculated as soon as possible.
-------------------
In order to solve the above needs of the story, distributed streaming computing system has been produced, the more well-known are:
• "Yahoo" S4
• "IBM" streambase
• "Amazon" Kinesis
• "Spark" streaming
• "Google" Millwheel
•"Apache" Storm (currently the most well-known and process in the industry)
What is the difference between batch computing (represented by Hadoop) and streaming computing?
###################
There are already people doing some forward-looking projects that are trying to integrate batch computing and streaming computing
Try to use the same set of APIs, that is, to solve streaming calculations, but also to take care of batch computing.
Without any changes to a piece of code, it is possible to perform both in batch and streaming computing systems.
This system is now more well-known:
"Twitter" Summing Bird
"Google" Clouddataflow
Two interfaces are already open source. Have a chance to get in touch with you later.
###################
====storm components
Storm uses a master-slave structure that manages the running state of the entire cluster using a single primary node.
This master node is called:Nimbus, which is used to maintain the state of each machine, known as:Supervisor
Why take a master-slave structure? The master-slave structure is relatively simple and does not require the main node to arbitrate.
As we can see from the previous structure,Nimbus is a single point after taking the master-slave structure.
However, we know that in the distributed domain, everyone is more disgusted with the existence of a single point in their system design ,
Because a single point fails, it is likely to affect the availability of the entire cluster.
Therefore, if a system design if there is a single point, the general situation of this single point of work is necessarily relatively light,
After the suspension, the short time will not affect the operation of the system, and generally there is no State,
After the outage, it can be restored and handled correctly after a reboot is required.
The role of Nimbus is to be only responsible for some administrative work, and it does not care about how the data between the worker transmitted,
some of its major states exist in distributed coordination Services (Zookeeper), Everything inside the memory can be lost ,
if it hangs, as long as no arithmetic node fails, then the whole operation can be processed normally.
Once the Nimbus is restarted, the transaction of the system can be handled correctly.
Supervisor 's role is to listen to Nimbus, to start and monitor the process of the actual worker that is being calculated,
If the worker has an exception, it will not be responsible for data calculation and transmission if the worker is restarted for a long time.
Real data calculations and outputs are performed by the Worker .
====storm UI
Provides a web-based UI to monitor the entire storm cluster in order to facilitate user management of the cluster, view cluster health status
It is not itself a necessary part of the cluster's operation, and its start-up stops without affecting the normal operation of Storm.
====storm Job Submission Run process
(1) Users use Storm's API to write storm topology.
(2) Use Storm's client to submit topology to Nimbus.
Nimbus will assign these topology to enough supervisor when received.
(3) After supervisor receives these Topoligy, Nimbus assigns some tasks to these supervisor.
(4) Nimvus will instruct supervisor to generate some worker for these tasks.
(5) Worker to perform these tasks to complete the calculation task.
====storm Local Mode Setup
(in Update)
Storm Getting started learning with the mind