import { ParallelSystem } from "../parallel/ParallelSystem"; import { DistributedSystemArray } from "./DistributedSystemArray"; import { ExternalSystemRole } from "../external/ExternalSystemRole"; import { InvokeHistory } from "../slave/InvokeHistory"; import { IClientDriver } from "../../protocol/communicator/IClientDriver"; import { Invoke } from "../../protocol/invoke/Invoke"; import { XML } from "sxml"; /** * A driver for a distributed slave system. * * The {@link DistributedSystem} is an abstract class represents a **slave** system in *Distributed Processing System*, * connected with this **master** system. This {@link DistributedSystem} takes full charge of network communication * with the remote, distributed **slave** system has connected. * * This {@link DistributedSystem} has a {@link getPerformance performance index} that indicates how much the **slave** * system is fast. The {@link getPerformance performance index} is referenced and revaluated whenever those methods * are called: * * - Requesting a *parallel process* * - {@link DistributedSystemArray.sendSegmentData} * - {@link DistributedSystemArray.sendPieceData} * - Requesting a *distributed process*: {@link DistributedProcess.sendData} * * Note that, this {@link DistributedSystem} class derived from the {@link ExternalSystem} class. Thus, this * {@link DistributedSystem} can also have children {@link ExternalSystemRole} objects exclusively. However, the * children {@link ExternalSystemRole roles} objects are different with the {@link DistributedProcess}. The * domestic {@link ExternalSystemRole roles} are belonged to only a specific {@link DistributedSystem} object. * Otherwise, the {@link DistributedProcess} objects are belonged to a {@link DistributedSystemArray} object. * Furthermore, the relationship between this {@link DistributedSystem} and {@link DistributedProcess} classes are * **M: N Associative**. * * Articles | {@link DistributedProcess} | {@link ExternalSystemRole} * -------------|--------------------------------|---------------------------- * Belonged to | {@link DistributedSystemArray} | {@link DistributedSystem} * Relationship | M: N Associative | 1: N Composite * Ownership | References | Exclusive possession * * * * * * @handbook [Templates - Distributed System](https://github.com/samchon/framework/wiki/TypeScript-Templates-Distributed_System) * @author Jeongho Nam */ export declare abstract class DistributedSystem extends ParallelSystem { /** * Construct from parent {@link DistributedSystemArray}. * * @param systemArray The parent {@link DistributedSystemArray} object. */ constructor(systemArray: DistributedSystemArray); /** * Constrct from parent {@link DistributedSystemArray} and communicator. * * @param systemArray The parent {@link DistributedSystemArray} object. * @param communicator A communicator communicates with remote, the external system. */ constructor(systemArray: DistributedSystemArray, communicator: IClientDriver); /** * Factory method creating a {@link ExternalSystemRole child} object. * * In {@link distributed} module, the process class {@link DistributedProcess} is not belonged to a specific * {@link DistributedSystem} object. It only belongs to a {@link DistributedSystemArray} object and has a * **M: N Associative Relationship** between this {@link DistributedSystem} class. * * By that reason, it's the normal case that the {@link DistributedSystem} object does not have any children * {@link ExternalSystemRole} object. Thus, default {@link createChild} returns ```null```. * * However, if you want a {@link DistributedSystem} to have its own domestic {@link ExternalSystemRole} objects * without reference to the {@link DistributedProcess} objects, it is possible. Creates and returns the * domestic {@link ExternalSystemRole} object. * * @param xml {@link XML} represents the {@link ExternalSystemRole child} object. * @return A newly created {@link ExternalSystemRole} object or ```null```. */ createChild(xml: XML): ExternalSystemRole; /** * Get manager of this object. * * @return The parent {@link DistributedSystemArray} object. */ getSystemArray(): DistributedSystemArray; /** * Get manager of this object. * * @return The parent {@link DistributedSystemArray} object. */ getSystemArray>(): SystemArray; /** * @hidden */ private _Compute_average_elapsed_time; /** * @inheritdoc */ replyData(invoke: Invoke): void; /** * @hidden */ protected _Report_history(xml: XML): void; /** * @hidden */ protected _Send_back_history(invoke: Invoke, history: InvokeHistory): void; }