Migration of a Chosen Architectural Pattern to Service Oriented ...

Migration of a Chosen Architectural Pattern to Service Oriented ... Migration of a Chosen Architectural Pattern to Service Oriented ...

12.07.2015 Views

Chapter 3. Architectural Patterns 54Relationships – Client is a container for logic and Client Broker. Logic ofthe client can invoke the client broker but broker cannot invoke the logic.Supplier is a server proving requires operations. A supplier contains SupplierLogic and Supplier Broker. In opposite to Client, Broker invokes Logicand Logic cannot invoke Broker. The connection between Client and Supplieris bidirectional because an asynchronous connection is assumed. Theconnection can be also unidirectional, what removes connection from Supplierto Client (see figure 3.19).Client SupplierClient Logic Client Broker Supplier Broker Supplier LogicFigure 3.19: Example usage of Explicit Invocation pattern15. Peer —to —PeerOverview– the whole pattern consists of only one type of elements: peer.The pattern creates a network build with peers. The number of peers is notspecified because peers can join and leave the network dynamicallyElementsPeer – the whole network consists of only one type of element–Peer. Peer isa server and a client in the same time. This means that each “peer” requestsand consumes services. To start up each peer has to find at least one otherpeer to create a network. This problem can be solved by introducing fewdedicated public peers that are known to other peers.Relationships – there is no limitations in connections between peers (seefigure 3.20).16. C2Overview – this patter is another possible solution for system interactingwith users.ElementsComponent – contains logic of the systemConnector – forwards messages from one Component to another. Connectionsbetween Components and Connectors are asynchronous. Connectorshave to be aware of all the Components “above” and “below” them.Relationships–All requests are asynchronous so the components have toknow only components above in hierarchy to return the result. All requests

Chapter 3. Architectural Patterns 55Peer 4Peer 1Peer 3Peer 2Figure 3.20: Example usage of Peer–to–Peer patternto lower components are forwarded by connecting layers and componentsdo not care which exactly sub–agent will execute it. Connectors must knowcomponents in order to return result of asynchronous operations.17. Active RepositoryOverview– this pattern is a variation of Shared Repository that providesa notification mechanism to Repository. Client elements do not have toinvoke Repository to check if there is something meant for them. Instead,Repository can notify all registered ClientsElementsRepository – is a core element of the pattern. It is meant to store, maintaindata and provide it to clients.Client – uses repository to store data in it and to obtain data from it.Relationships – all the client elements are aware of the repository andcan perform operations on it. Since Repository can notify Clients, all theconnections between Clients and Repository are bidirectional18. Remote Procedure CallOverview – The pattern assumes that all the remote procedures shouldbe treated, as they were local. User should not know that a procedure is executedsomewhere in the network. The procedures are mainly provider–dependentand can change over the years, therefore the description of the elements andrelationships bellow refer to just an example implementation of the patternElementsClient– is a frontend of the application. This element allows user to perform

Chapter 3. <strong>Architectural</strong> <strong>Pattern</strong>s 54Relationships – Client is a container for logic and Client Broker. Logic <strong>of</strong>the client can invoke the client broker but broker cannot invoke the logic.Supplier is a server proving requires operations. A supplier contains SupplierLogic and Supplier Broker. In opposite <strong>to</strong> Client, Broker invokes Logicand Logic cannot invoke Broker. The connection between Client and Supplieris bidirectional because an asynchronous connection is assumed. Theconnection can be also unidirectional, what removes connection from Supplier<strong>to</strong> Client (see figure 3.19).Client SupplierClient Logic Client Broker Supplier Broker Supplier LogicFigure 3.19: Example usage <strong>of</strong> Explicit Invocation pattern15. Peer —<strong>to</strong> —PeerOverview– the whole pattern consists <strong>of</strong> only one type <strong>of</strong> elements: peer.The pattern creates a network build with peers. The number <strong>of</strong> peers is notspecified because peers can join and leave the network dynamicallyElementsPeer – the whole network consists <strong>of</strong> only one type <strong>of</strong> element–Peer. Peer isa server and a client in the same time. This means that each “peer” requestsand consumes services. To start up each peer has <strong>to</strong> find at least one otherpeer <strong>to</strong> create a network. This problem can be solved by introducing fewdedicated public peers that are known <strong>to</strong> other peers.Relationships – there is no limitations in connections between peers (seefigure 3.20).16. C2Overview – this patter is another possible solution for system interactingwith users.ElementsComponent – contains logic <strong>of</strong> the systemConnec<strong>to</strong>r – forwards messages from one Component <strong>to</strong> another. Connectionsbetween Components and Connec<strong>to</strong>rs are asynchronous. Connec<strong>to</strong>rshave <strong>to</strong> be aware <strong>of</strong> all the Components “above” and “below” them.Relationships–All requests are asynchronous so the components have <strong>to</strong>know only components above in hierarchy <strong>to</strong> return the result. All requests

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!