Samchon Framework for CPP
1.0.0
|
A network driver for a distributed client. More...
#include <DistributedClient.hpp>
Public Member Functions | |
DistributedClient () | |
Default Constructor. More... | |
![]() | |
DistributedSystem () | |
Default Constructor. More... | |
virtual void | construct (std::shared_ptr< library::XML >) override |
Construct data of the Entity from an XML object. More... | |
virtual void | sendData (std::shared_ptr< Invoke >) override |
Sends message to a related system. More... | |
virtual void | replyData (std::shared_ptr< Invoke >) override |
Handling replied message from an external system. More... | |
virtual auto | toXML () const -> std::shared_ptr< library::XML > override |
Get an XML object represents the EntityGroup. More... | |
![]() | |
ExternalSystem () | |
Default Constructor. More... | |
virtual auto | key () const -> std::string override |
Get a key that can identify the Entity uniquely. More... | |
virtual auto | TAG () const -> std::string override |
A tag name when represented by XML. More... | |
virtual auto | CHILD_TAG () const -> std::string override |
A tag name of children. More... | |
![]() | |
EntityGroup () | |
Default Constructor. More... | |
auto | has (const std::string &key) const -> bool |
Indicates whether a container has an object having the specified identifier. More... | |
auto | get (const std::string &key) -> value_type & |
Access the element by specified identifier(key). More... | |
auto | get (const std::string &key) const -> const value_type & |
Access the const element by specified identifier(key). More... | |
![]() | |
Entity () | |
Default Constructor. More... | |
![]() | |
IEntityGroup () | |
Default Constructor. More... | |
![]() | |
IClient () | |
Default Constructor. More... | |
virtual void | listen () |
Listens message from a related system. More... | |
![]() | |
IProtocol () | |
Default Constructor. More... | |
![]() | |
ExternalClient () | |
Default Constructor. More... | |
virtual void | start () override |
Start interaction. More... | |
Additional Inherited Members | |
![]() | |
virtual auto | createChild (std::shared_ptr< library::XML >) -> ExternalSystemRole *override |
Factory method of a child Entity. More... | |
![]() | |
virtual auto | BUFFER_SIZE () const -> size_t |
Buffer size of network I/O. More... | |
virtual void | _replyData (std::shared_ptr< Invoke >) |
A method for pre-processing replied Invoke message. More... | |
![]() | |
size_t | inProgress |
A number of processes running on the distributed system. More... | |
size_t | processed |
A number of processed have runned. More... | |
double | avgElapsedTime |
Average of elapsed time. More... | |
double | performance |
A performance index. More... | |
DSRoleHistoryList * | roleHistoryList |
A list of history log for role allocations. More... | |
DSInvokeHistoryArray * | invokeHistoryArray |
A list of history log for reported Invoke messages. More... | |
![]() | |
std::string | name |
A name can identify an external system. More... | |
std::string | ip |
An ip address of an external system. More... | |
int | port |
A port number of an external system. More... | |
![]() | |
Socket * | socket |
Socket for network I/O. More... | |
std::mutex * | sendMtx |
A mutex for sending message. More... | |
A network driver for a distributed client.
DistributedClient is an DistributedSystem specialized in client driver.
DistributedSystem class is an ExternalSystem having role as DistributedSystemRole objects with performance index and history log allocation of DistributedSystemRole objects and have requsted Invoke message to related external system.
The greatest difference between DistributedSystem and ExternalSystem is, unlike the ExternalSystem class which having is ExternalSystemRole objects exclusively, DistributedSystem does not monopoly a DistributedSystemRole. The DistributedSystemRole can allocatedto multiple DistributedSystem.
DistributedSystem and DistributedSystemRole classes have performance index and history log archiving what they've requested to the related distributed system. Allocating DistributedSystemRole objects to DistributedSyste will be determined those performance index and history log for optimize distribution of elasped time about each Invoke message processing.
ExternalSystem is a boundary class interacting with an external system by network communication. Also, ExternalSystem is an abstract class that a network role, which one is server and which one is client, is not determined yet.
The ExternalSystem has ExternalSystemRole(s) groupped methods, handling Invoke message interacting with the external system, by subject or unit of a moudle. The ExternalSystemRole is categorized in a 'control'.
The ExternalSystem class takes a role of interaction with external system in network level. However, within a framework of Samchon Framework, a boundary class like the ExternalSystem is not such important. You can find some evidence in a relationship between ExternalSystemArray, ExternalSystem and ExternalSystemRole.
Of course, the ExternalSystemRole is belonged to an ExternalSystem. However, if you access an ExternalSystemRole from an ExternalSystemArray directly, not passing by a belonged ExternalSystem, and send an Invoke message even you're not knowing which ExternalSystem is related in, it's called "Proxy pattern".
Like the explanation of "Proxy pattern", you can utilize an ExternalSystemRole as a proxy of an ExternalSystem. With the pattern, you can only concentrate on ExternalSystemRole itself, what to do with Invoke message, irrespective of the ExternalSystemRole is belonged to which ExternalSystem.
Definition at line 22 of file DistributedClient.hpp.
samchon::protocol::master::DistributedClient::DistributedClient | ( | ) |
Default Constructor.