Samchon Framework for CPP  1.0.0
samchon::templates::parallel::ParallelServer Class Reference

#include <ParallelServer.hpp>

Collaboration diagram for samchon::templates::parallel::ParallelServer:

Public Member Functions

 ParallelServer (external::base::ExternalSystemArrayBase *systemArray)
 
- Public Member Functions inherited from samchon::templates::parallel::ParallelSystem
virtual ~ParallelSystem ()
 
virtual void construct (std::shared_ptr< library::XML > xml) override
 Construct data of the Entity from an XML object. More...
 
auto getPerformance () const -> double
 
void setPerformance (double val)
 
void enforcePerformance (double val)
 
virtual auto toXML () const -> std::shared_ptr< library::XML > override
 Get an XML object represents the EntityGroup. More...
 
- Public Member Functions inherited from samchon::templates::external::ExternalSystem
 ExternalSystem ()
 
 ExternalSystem (base::ExternalSystemArrayBase *systemArray)
 
 ExternalSystem (base::ExternalSystemArrayBase *systemArray, std::shared_ptr< protocol::ClientDriver > driver)
 
virtual ~ExternalSystem ()=default
 
virtual auto key () const -> std::string
 
auto getName () const -> std::string
 
void close ()
 
virtual void sendData (std::shared_ptr< protocol::Invoke > invoke) override
 
virtual void replyData (std::shared_ptr< protocol::Invoke > invoke) override
 
virtual auto CHILD_TAG () const -> std::string override
 A tag name of children. More...
 
- Public Member Functions inherited from samchon::protocol::EntityGroup< Container, T, Key >
auto find (const typename child_type::key_type &key) -> typename container_type::iterator
 Get iterator to element. More...
 
auto find (const typename child_type::key_type &key) const -> typename container_type::const_iterator
 Get const iterator to element. More...
 
auto has (const typename child_type::key_type &key) const -> bool
 Indicates whether a container has an object having the specified identifier. More...
 
auto count (const typename child_type::key_type &key) const -> size_t
 Count elements with a specific key. More...
 
auto get (const typename child_type::key_type &key) -> typename container_type::value_type &
 Access the element by specified identifier(key). More...
 
auto get (const typename child_type::key_type &key) const -> const typename container_type::value_type &
 Access the const element by specified identifier(key). More...
 
- Public Member Functions inherited from samchon::protocol::IProtocol
virtual void replyData (std::shared_ptr< Invoke >)=0
 
virtual void sendData (std::shared_ptr< Invoke >)=0
 
- Public Member Functions inherited from samchon::templates::external::ExternalServer
 ExternalServer (base::ExternalSystemArrayBase *systemArray)
 
virtual void connect ()
 

Additional Inherited Members

- Protected Member Functions inherited from samchon::protocol::EntityGroup< Container, T, Key >
virtual auto createChild (std::shared_ptr< library::XML >) -> child_type *=0
 Factory method of a child Entity. More...
 
- Protected Member Functions inherited from samchon::templates::external::ExternalServer
virtual auto createServerConnector () -> protocol::ServerConnector *
 
- Protected Attributes inherited from samchon::templates::external::ExternalSystem
std::string name
 

Detailed Description

A driver for parallel slave server.

The ParallelServer is an abstract class, derived from the ParallelSystem class, connecting to remote, parallel slave server. Extends this ParallelServer class and overrides the createServerConnector() method following which protocol the slave server uses.

[Inherited] ParallelSystem}

A driver for a parallel slave system.

The ParallelSystem is an abstract class represents a slave system in Parallel Processing System, connected with this master system. This ParallelSystem takes full charge of network communication with the remote, parallel slave system has connected.

When a parallel process is requested (by ParallelSystemArray.sendSegementData or ParallelSystemArray.sendPieceData), the number of pieces to be allocated to a ParallelSystem is turn on its performance index. Higher performance index, then more pieces are requested. The performance index is revaluated whenever a parallel process has completed, basic on the execution time and number of pieces. You can sugguest or enforce the performance index with setPerformance or enforcePerformance.

Bridge & Proxy Pattern

This class ParallelSystem is derived from the ExternalSystem class. Thus, you can take advantage of the Bridge & Proxy Pattern in this ParallelSystem class. If a process to request is not the parallel process (to be distrubted to all slaves), but the exclusive process handled in a system, then it may better to utilizing the Bridge & Proxy Pattern:

The ExternalSystem class can be a bridge for logical proxy. In framework within user, which external system is connected with this system, it's not important. Only interested in user's perspective is which can be done.

By using the logical proxy, user dont't need to know which role is belonged to which system. Just access to a role directly from ExternalSystemArray.getRole. Sends and receives Invoke message via the role.

Class Diagram

Templates - Parallel System

Author
Jeongho Nam http://samchon.org

Definition at line 23 of file ParallelServer.hpp.

Constructor & Destructor Documentation

samchon::templates::parallel::ParallelServer::ParallelServer ( external::base::ExternalSystemArrayBase *  systemArray)
inline

Construct from parent ParallelSystemArray.

Parameters
systemArrayThe parent ParallelSystemArray object.

Definition at line 33 of file ParallelServer.hpp.


The documentation for this class was generated from the following file: