Dcframework dynamic distributed computing framework (01) -- infrastructure

Source: Internet
Author: User

The dcframwork framework consists of four core dll: dcframework. dll, dcframework. master. dll, dcframework. Worker. dll, and dcframework. Client. dll.

We can see that the other three DLL libraries depend on the most basic dcframework. dll. These three DLL libraries do not depend on each other except dcframework. dll.

Dcframework. DLL provides basic and common type definitions required by the DCF framework, such as distributed task dctask and distributed computing node workernode, the Service Interface idcservice that the DC master publishes to the client, the dynamic registration/Cancellation service interface iworkerregistryservice that is released to the distributed computing node, and the iworkerservice interface that the DC worker calls back to the DC master. The definitions of these types are shown in:

 

Dcframework. master. DLL is the core assembly used by the DC master node. It contains three main classes: The dcmaster class is used to manage all registered DC woker nodes, it is also responsible for distributing distributed tasks to a DC woker node. dcservice is the service that the DC master node publishes to the client, while workerregistryservice is the service that the DC master node publishes to the DC woker node. The class diagram is as follows:

 

Dcframework. worker. DLL is the core assembly used by DC worker node. Its main types are defined as dcappdomain, which is used to encapsulate appdomain so that distributed computing tasks can run in another independent appdomain; dcjobworker is a "worker" who truly executes distributed computing tasks. It can execute tasks in the target dcappdomain or the locally created dcappdomain. Dcappdomainmanager is used to manage all non-temporary dcappdomain objects and is responsible for dispatching and calling distributed tasks. The temporary and non-temporary dcappdomain objects will be detailed in subsequent articles.

 

Dcframework. Client. dll is an assembly for the customer. With dcframework. Client. dll, the customer can conveniently use the deployed DCF framework instance to execute their own distributed tasks. Dcframework. client. the most core class in the DLL is dcjobdispatcher. As mentioned above, dcjobdispatcher automatically remoting connects to the DC master node, encapsulates the distributed computing task as a dctask, and submits the dctask to the DC master. All this is done automatically by dcjobdispatcher in the background. All you need to do is submit the task and wait for the returned result. The class diagram is as follows:

This article only gives a brief introduction to the basic structure of dcframework. The implementation of dcframework is much more complicated than the above descriptions. In the subsequent articles, we will go deep into each part in detail.

Finally, a complete demo source code using dcframework is provided, including master, worker, and client. You can run it first.DynamicThe results of distributed computing will be explained in detail in the next article.

Welcome to the discussion. Thank you.

Go to: dcframework dynamic distributed computing framework (00) -- sequence

 

 

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.