Distributed Computing multi-host deployment and Configuration

Source: Internet
Author: User

In the distributed computing getting started demo, the distributed computing sayhello, distributed computing complete demo,
For worker workers and cuts, the deployment and configuration of parkserver on multiple computers:
Place implementation classes on each computer, and use the fourinone. jar and config. xml files. The ip configurations of parkserver must be consistent (domain names can also be used)
Assume there are three computers: 192.0.0.1, 192.0.0.2, and 192.0.0.3:

Deployed on 192.0.0.1: parkserver class bytecode file, fourinone. jar, config. xml
The SERVERS of the PARK section of config is configured:
<SERVERS> 192.0.0.1: 1888, localhost: 1889 </SERVERS>
The second is to back up the parkserver. You can leave it empty.

Deployed on 192.0.0.2: worker implements class bytecode files, fourinone. jar, config. xml
The SERVERS configuration in the PARK section of config specifies the ip port 192.0.0.1: 1888 of the preceding parkserver)
You can specify the WORKER machine ip192.0.0.2 and port number on the WORKER's SERVERS.
You can also specify the worker machine ip port in the waitWorking method.

Deployed on 192.0.0.3: ctor implements class bytecode files, fourinone. jar, config. xml
The SERVERS configuration in the PARK section of config specifies the ip port 192.0.0.1: 1888 of the preceding parkserver)
Ctor is an embedded class that does not need to specify its own ip port.

Startup sequence:
1. parkserver
2. Multiple workers
3. ctor

NOTE: For the convenience of local demonstration, the default configuration of the demo is localhost. Change the environment of multiple hosts to the actual ip address to avoid connection problems.

Configuration principles:

650) this. width = 650; "border =" 0 "alt =" "src =" http://img1.51cto.com/attachment/201207/151201680.png "/>

As you can see, because the worker needs to register parkserver with the employee), you need to configure the specified ip port to inform parkserver. because both the foreman and the worker need to know the parkserver address, therefore, the ip port of the parkserver must be configured to be consistent. Because the foreman obtains the worker ip address through the park and then interacts directly with the worker, the worker does not need to know the foreman ip address, and the foreman itself is not a service program, therefore, you do not need to configure your own ip port for start-up.

Email: Fourinone@yeah.net
QQ: 241116021
Development Kit and guide:
Http://www.skycn.com/soft/68321.html

This article is from the "fourinone distributed computing" blog, please be sure to keep this source http://3503265.blog.51cto.com/3493265/936317

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.