Object-oriented distributed development system (3)

zhaozj2021-02-12  157

Back to the first article

Assate: Object-Oriented Distributed Development System (2)

3.3 Distributed Object Distributed Object

Hereinafter, Softengine is constructed from different types of objects that can be divided into three types: local (LOCAL) objects, remote objects, virtual (Virtual) objects.

Chart 6 Local, Remote and Virtual Object

In the above figure:

Local object Local Object:

Distributed in the same

Softengine

Objects in the single system, mutual mutual as local objects. Such as: in the system

I

Object

A

with

B

Mutual local object

.

Remote Object:

Distribution is different

Softengine

Objects in the system (same group system).

Such as

:

Object

A

with

C

,as well as

B

with

C

Interaction with a remote object. For the system

Ii

middle

C

,system

I

middle

A

with

B

Remnant

.

Virtual objects Virtual Object:

Unlike local and remote objects, virtual objects do not belong to real objects, but a virtual type. The real operation is not in the virtual object itself, but the remote object is mapped locally. Such as: virtual object

A

,Yes

A

In the system

Ii

Map of mappings. Object

C

to

A

The task sent will be forwarded to the far object

A

,and

C

I don't know, it is not necessary to know. Similarly, if the object

B

Need to send tasks to

C

In the system

I

Define

C

Virtual object

.

Local and remote objects are mutual relationships. The virtual object is just a mapping, which is used to associate local and remote objects, which functions as a distribution and load balancing. The relationship between the three does not have to be concerned in the development, only in the system deployment, by configuring the publishing environment to determine or change. The following figure is an example, and the load balancing:

Chart 7 A Load Balance System

In a distributed system, there are two independent operational systems I and II. There are the same objects A1, A2, A3, A4, which are published, and the classes they are loaded are the same, but they are only different from the defined release name. If a virtual object A is again mapped to A1 - A4, different policies are configured, such as the load-robin, or a redundancy method (Hi-Available). The task sent to a is sent to the A1-A4 in different strategies.

After the application object development test is complete, the deployment policy, including: system configuration, object configuration, object publishing, etc., is defined in the configuration file of each single system. Through these configuration files, a distributed mesh system will be dynamically constructed to complete specific application functions. So the contiguous distributed system thus has the following body points:

The entire distributed system is constructed by various objects and dynamic components.

Objects can exist in any network

(LAN / WAN)

Any host.

By configuration, the object can be dynamically loaded

/

Uninstall. The entire distribution system is always in a dynamic adjustment state.

Virtual objects make local objects ignore the physical location of the real remote object.

The development and distribution process are completely separated. During the development of the object, there is no need to consider the problem of system levels.

Chart 8 A Distributed System

3.4 Data Security Data-Safety

The data information required by the application system is sent within the Softengine system in a task, and the task will be efficiently transmitted in the network, or the network of the group system. Therefore, how to ensure the security arrival of the task is a key issue. In Softengine, the technology to solve this problem is called: data security. These include four parts: secure task pool

Safety Task Pool

Task suspension

Pending

Speed

Slowdown

flow control

Flow Control

The following figure shows example:

Chart 9 DATA-Safety

Forward Task: Send Tasks

Backward Task: Running Task

Undeliverable task: Unable to send tasks

PANDING TASK: suspension task

Task Channel: Task Channel

Pending pool: suspension buffer pool

l Security task pool Safety Task pool

In the kernel of Softengine, most objects have their own task pools and task channels. Similar to the memory buffer of the file system, the task pool has a very important role in improving system performance. At the same time, in order to ensure the safety of data, the task pool needs a good design, including: Overload Protection, Hard Disk Buffering and other security mechanisms, ensure that the task will not be lost regardless of the operation status of the object. That is, when a task is successfully sent to the task pool of the target object, this means that the task is safe. So the task pool guarantees the security of the static task.

l Task suspension pending

In some special cases, the task cannot be sent immediately to the destination object (such as the image object A sent task to object C). The task that cannot be sent will be hanging in a special task pool - hanging buffer pool. By hanging buffer pools, the Softengine system remembers those tasks because those destination objects are suspended, waiting for the object to restore, or after the task exceeds the specified survival cycle, was discarded.

l Call speed delivery Slowdown

In conventional state, the object A sends tasks to the object B at the fastest speed. However, if the object B is in an invalid state, or the task is overloaded, then the first unacceptable task will be suspended, and the transmission speed of the transmission source object will also be automatically controlled by the system, slowing the frequency of the transmitted. Call: slower delivery.

The reduction transfer mechanism can effectively protect the system to lose control in a huge task stream, especially for an object in a task stream. for example:

Objects A, B, and C cooperate to complete a task, and object A will generate a large number of tasks, passing through object B, sent to C. As shown below:

Chart 10 One Sample

Assuming that the object C stops working for some reason, without a slow-speed delivery mechanism: Object B will also be sent due to a large number of tasks, and quickly "explosion". Object A will also be out of control. The task accumulated in the middle of A, B, and C will not be processed. In addition, the system's CPU, Memory overhead can be affected. Using a reduced speed transfer mechanism, the operation of the object B processing and the transmission task is controlled to some extent, and the object A is also true. The processing speed of the entire workflow will be automatically slowed. Until the object C returns to normal working status.

Therefore, when the problem cannot be estimated, the slow-rate transfer can effectively play a role in stabilizing system, avoiding a lot of data loss due to an accident.

l Traffic Control Flow Control

In a distributed system, the task will pass through the task channel, the communication channel is transmitted over the network. It is very important to ensure data security on the transmission line. Flow control mechanism is a common technique for solving the security problems of stabilization and data in the transmission. Not too many introductions here.

转载请注明原文地址:https://www.9cbs.com/read-6252.html

New Post(0)