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 50Meta Object ProtocolMeta Object 1Meta Object 2Meta layerElement 1 Element 2Base layerFigure 3.13: Example usage of Reflection patternistered interceptorsInvoked Component– contains business logicPreaction Interceptor– this interceptor is invoked before “Invoked Component”is invokedPostaction Interceptor– this interceptor is invoked just after action invokedby Client is accomplished but before Client gets answerRelationships– Client invokes Interceptor Manager, which invokes preactioninterceptors. Then, the manager executes an action on the componentand invokes postaction interceptors when the action is finished (see figure3.14).PreActionInterceptorPostActionInterceptorClientInterceptor ManagerInvoked ComponentFigure 3.14: Example usage of Interceptor pattern10. Half–sync/half–asyncOverview– supports control over synchronous and asynchronous operationsin concurrent systems without reducing performance of the system.ElementsSynchronous Service Layer– contains high–level elements executing syn-

Chapter 3. Architectural Patterns 51chronous logic of the systemSynchronous Service– represents logic of the system executed in a synchronousmannerAsynchronous Service Layer– contain low–level elements executing asynchronouslogic of the systemAsynchronous Service– represents logic of the system executed in an asynchronousmannerQueueing Layer– contains element mediating between Synchronous andAsynchronous layersQueue– a mediating element from Queueing LayerExternal Event Source– generates event processed by services from AsynchronousLayerRelationships– - Services from each layer can cooperate with other servicesfrom the same layer. They can also invoke Queue that serves as a messagestore. External Data Source can invoke only services from AsynchronousLayer (see figure 3.15 ).Sync Service 1 Sync Service 2 Sync Service 3 Synchronous Service LayerQueueQueueing LayerAsync Service 1Asynchronous Service LayerExternal Event SourceFigure 3.15: Example usage of Half–Sync Half–Async pattern11. Shared RepositoryOverview– provides solution for problem of passing large amount of databetween elements of a system. The pattern reduces additional overhead andperformance drop.ElementsRepository – is a core element of the pattern. It is meant to store, maintain

Chapter 3. <strong>Architectural</strong> <strong>Pattern</strong>s 50Meta Object Pro<strong>to</strong>colMeta Object 1Meta Object 2Meta layerElement 1 Element 2Base layerFigure 3.13: Example usage <strong>of</strong> Reflection patternistered intercep<strong>to</strong>rsInvoked Component– contains business logicPreaction Intercep<strong>to</strong>r– this intercep<strong>to</strong>r is invoked before “Invoked Component”is invokedPostaction Intercep<strong>to</strong>r– this intercep<strong>to</strong>r is invoked just after action invokedby Client is accomplished but before Client gets answerRelationships– Client invokes Intercep<strong>to</strong>r Manager, which invokes preactionintercep<strong>to</strong>rs. Then, the manager executes an action on the componentand invokes postaction intercep<strong>to</strong>rs when the action is finished (see figure3.14).PreActionIntercep<strong>to</strong>rPostActionIntercep<strong>to</strong>rClientIntercep<strong>to</strong>r ManagerInvoked ComponentFigure 3.14: Example usage <strong>of</strong> Intercep<strong>to</strong>r pattern10. Half–sync/half–asyncOverview– supports control over synchronous and asynchronous operationsin concurrent systems without reducing performance <strong>of</strong> the system.ElementsSynchronous <strong>Service</strong> Layer– contains high–level elements executing syn-

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

Saved successfully!

Ooh no, something went wrong!