Download - Application patterns
![Page 1: Application patterns](https://reader035.vdocument.in/reader035/viewer/2022081401/559444531a28ab06308b47a0/html5/thumbnails/1.jpg)
Application Patterns tomi vanek
February 2014
![Page 2: Application patterns](https://reader035.vdocument.in/reader035/viewer/2022081401/559444531a28ab06308b47a0/html5/thumbnails/2.jpg)
Copyright © 2014 Accenture All rights reserved. 2
• User Interaction
• Services
• Persistence – scaling, locking, cache
• Real-time processing
• High Volume Batch Processing
Agenda
![Page 3: Application patterns](https://reader035.vdocument.in/reader035/viewer/2022081401/559444531a28ab06308b47a0/html5/thumbnails/3.jpg)
User Interaction
![Page 4: Application patterns](https://reader035.vdocument.in/reader035/viewer/2022081401/559444531a28ab06308b47a0/html5/thumbnails/4.jpg)
Copyright © 2014 Accenture All rights reserved. 4
MVP
MVC / MVP / MV-VM
Model
View Controller Action
Model
View Presenter Action
Model
View
View-Model Action
MVC
MV-VM
![Page 5: Application patterns](https://reader035.vdocument.in/reader035/viewer/2022081401/559444531a28ab06308b47a0/html5/thumbnails/5.jpg)
Copyright © 2014 Accenture All rights reserved. 5
Model-View-Controller (MVC)
![Page 6: Application patterns](https://reader035.vdocument.in/reader035/viewer/2022081401/559444531a28ab06308b47a0/html5/thumbnails/6.jpg)
Copyright © 2014 Accenture All rights reserved. 6
MVC Variant: Page Flow
![Page 7: Application patterns](https://reader035.vdocument.in/reader035/viewer/2022081401/559444531a28ab06308b47a0/html5/thumbnails/7.jpg)
Copyright © 2014 Accenture All rights reserved. 7
Page flow with asynchronous
commit of order
Simple synchronous MVC
implementation
MVC: Page Flow Example
![Page 8: Application patterns](https://reader035.vdocument.in/reader035/viewer/2022081401/559444531a28ab06308b47a0/html5/thumbnails/8.jpg)
Copyright © 2014 Accenture All rights reserved. 8
In-Memory Server Session State
![Page 9: Application patterns](https://reader035.vdocument.in/reader035/viewer/2022081401/559444531a28ab06308b47a0/html5/thumbnails/9.jpg)
Copyright © 2014 Accenture All rights reserved. 9
Persistent Session State
![Page 10: Application patterns](https://reader035.vdocument.in/reader035/viewer/2022081401/559444531a28ab06308b47a0/html5/thumbnails/10.jpg)
Copyright © 2014 Accenture All rights reserved. 10
Serialized Session State in View
![Page 11: Application patterns](https://reader035.vdocument.in/reader035/viewer/2022081401/559444531a28ab06308b47a0/html5/thumbnails/11.jpg)
Copyright © 2014 Accenture All rights reserved. 11
Client Session State in Local Storage
![Page 12: Application patterns](https://reader035.vdocument.in/reader035/viewer/2022081401/559444531a28ab06308b47a0/html5/thumbnails/12.jpg)
Services
![Page 13: Application patterns](https://reader035.vdocument.in/reader035/viewer/2022081401/559444531a28ab06308b47a0/html5/thumbnails/13.jpg)
Copyright © 2014 Accenture All rights reserved. 13
Method invocation / Resource manipulation
• Services: – Strongly typed interface
contract.
– Broad range of aspects are standardized.
– Implemented in integration infrastructure and technologies.
– Service discoverability and lifetime management.
• But: – Limits in scalability.
– Expensive extensibility.
• Resources:
– Simple data exploration.
– Simple extensibility.
– Simple data consumer
code.
• But:
– Limited schema
definition.
– No standards for
complex functionalities /
scenarios.
![Page 14: Application patterns](https://reader035.vdocument.in/reader035/viewer/2022081401/559444531a28ab06308b47a0/html5/thumbnails/14.jpg)
Copyright © 2014 Accenture All rights reserved. 14
Business Layer Remote Procedure Call
Presentation
Presentation Layer
Business Tier Data Tier
External
Business Module
Resources Data Layer Business Layer
External
System
Repository
Integration Gateway
Service
Service
Relational Database
![Page 15: Application patterns](https://reader035.vdocument.in/reader035/viewer/2022081401/559444531a28ab06308b47a0/html5/thumbnails/15.jpg)
Copyright © 2014 Accenture All rights reserved. 15
Compact Business Layer with Active Records
Application Tier
Dynamic
Presentation Module
Presentation Layer Resources Domain Layer
Presentation
Data Tier
External
External
System
Integration Gateway
Relational Database
![Page 16: Application patterns](https://reader035.vdocument.in/reader035/viewer/2022081401/559444531a28ab06308b47a0/html5/thumbnails/16.jpg)
Copyright © 2014 Accenture All rights reserved. 16
REST / WS Business Layer
Presentati
on
Business Tier Data Tier
External
Business Module
Resources Data Layer Business Layer Presentation Layer
External
System
Repository
Integration Gateway
Service
Service
Relational Database C
on
troller
![Page 17: Application patterns](https://reader035.vdocument.in/reader035/viewer/2022081401/559444531a28ab06308b47a0/html5/thumbnails/17.jpg)
Copyright © 2014 Accenture All rights reserved. 17
Asynchronous Business Layer
Presentation
Business Tier Data Tier
External
Business Module
Resources Data Layer Business Layer Presentation Layer
External
System
Repository Relational Database
Integration Gateway
Queue
Queue
Service
Queue
Queue
Service
![Page 18: Application patterns](https://reader035.vdocument.in/reader035/viewer/2022081401/559444531a28ab06308b47a0/html5/thumbnails/18.jpg)
Copyright © 2014 Accenture All rights reserved. 18
Push Notification Business Layer
Presentation
Business Tier
Business Module
Resources Data Layer Business Layer Presentation Layer
Subject Register
Service
![Page 19: Application patterns](https://reader035.vdocument.in/reader035/viewer/2022081401/559444531a28ab06308b47a0/html5/thumbnails/19.jpg)
Copyright © 2014 Accenture All rights reserved. 19
Data synchronization
![Page 20: Application patterns](https://reader035.vdocument.in/reader035/viewer/2022081401/559444531a28ab06308b47a0/html5/thumbnails/20.jpg)
Persistence - Scaling
![Page 21: Application patterns](https://reader035.vdocument.in/reader035/viewer/2022081401/559444531a28ab06308b47a0/html5/thumbnails/21.jpg)
Copyright © 2014 Accenture All rights reserved. 21
Database Scaling: Master – Slave
Internet
Load Balancer
Load Balancer
Slaves
Web Servers
Master
Write Read
Replicate
![Page 22: Application patterns](https://reader035.vdocument.in/reader035/viewer/2022081401/559444531a28ab06308b47a0/html5/thumbnails/22.jpg)
Copyright © 2014 Accenture All rights reserved. 22
Database Scaling: Active - Passive
Internet
Load Balancer
Passive
Web Servers
Failed
Active Instance
Passive to Active
Instance
Replicate
Read / Write
![Page 23: Application patterns](https://reader035.vdocument.in/reader035/viewer/2022081401/559444531a28ab06308b47a0/html5/thumbnails/23.jpg)
Copyright © 2014 Accenture All rights reserved. 23
Database Scaling: Cluster
Internet
Load Balancer
Virtual Database
Cluster
Controller
Virtual Database
Cluster
Controller
![Page 24: Application patterns](https://reader035.vdocument.in/reader035/viewer/2022081401/559444531a28ab06308b47a0/html5/thumbnails/24.jpg)
Copyright © 2014 Accenture All rights reserved. 24
Database Scaling
Load Balancer
Shard Resolver
Web Servers
Product 1 .. n
Product n+1 .. o
Product o+1 .. p
![Page 25: Application patterns](https://reader035.vdocument.in/reader035/viewer/2022081401/559444531a28ab06308b47a0/html5/thumbnails/25.jpg)
Locking
![Page 26: Application patterns](https://reader035.vdocument.in/reader035/viewer/2022081401/559444531a28ab06308b47a0/html5/thumbnails/26.jpg)
Copyright © 2014 Accenture All rights reserved. 26
Optimistic Locking
![Page 27: Application patterns](https://reader035.vdocument.in/reader035/viewer/2022081401/559444531a28ab06308b47a0/html5/thumbnails/27.jpg)
Copyright © 2014 Accenture All rights reserved. 27
Pessimistic Locking
![Page 28: Application patterns](https://reader035.vdocument.in/reader035/viewer/2022081401/559444531a28ab06308b47a0/html5/thumbnails/28.jpg)
Cache
![Page 29: Application patterns](https://reader035.vdocument.in/reader035/viewer/2022081401/559444531a28ab06308b47a0/html5/thumbnails/29.jpg)
Copyright © 2014 Accenture All rights reserved. 29
Read-through / Write-through Cache
![Page 30: Application patterns](https://reader035.vdocument.in/reader035/viewer/2022081401/559444531a28ab06308b47a0/html5/thumbnails/30.jpg)
Copyright © 2014 Accenture All rights reserved. 30
Pre-fetch
![Page 31: Application patterns](https://reader035.vdocument.in/reader035/viewer/2022081401/559444531a28ab06308b47a0/html5/thumbnails/31.jpg)
Copyright © 2014 Accenture All rights reserved. 31
Publisher
![Page 32: Application patterns](https://reader035.vdocument.in/reader035/viewer/2022081401/559444531a28ab06308b47a0/html5/thumbnails/32.jpg)
Real-time processing Integration Patterns
![Page 33: Application patterns](https://reader035.vdocument.in/reader035/viewer/2022081401/559444531a28ab06308b47a0/html5/thumbnails/33.jpg)
Copyright © 2014 Accenture All rights reserved. 33
Reference model
![Page 34: Application patterns](https://reader035.vdocument.in/reader035/viewer/2022081401/559444531a28ab06308b47a0/html5/thumbnails/34.jpg)
34
Messaging Idioms
• Channels
• Message Construction
• Rooting
• Transformation
Messaging Design Patterns
• Pipes and Filters
• Claim Check
• Scatter-Gather
Integration Application Architecture Design Patterns
![Page 35: Application patterns](https://reader035.vdocument.in/reader035/viewer/2022081401/559444531a28ab06308b47a0/html5/thumbnails/35.jpg)
Copyright © 2014 Accenture All rights reserved. 35
Pipes and filters
![Page 36: Application patterns](https://reader035.vdocument.in/reader035/viewer/2022081401/559444531a28ab06308b47a0/html5/thumbnails/36.jpg)
Copyright © 2014 Accenture All rights reserved. 36
Pipeline
![Page 37: Application patterns](https://reader035.vdocument.in/reader035/viewer/2022081401/559444531a28ab06308b47a0/html5/thumbnails/37.jpg)
Copyright © 2014 Accenture All rights reserved. 37
Claim-check
![Page 38: Application patterns](https://reader035.vdocument.in/reader035/viewer/2022081401/559444531a28ab06308b47a0/html5/thumbnails/38.jpg)
Copyright © 2014 Accenture All rights reserved. 38
Claim-check for secure communication
![Page 39: Application patterns](https://reader035.vdocument.in/reader035/viewer/2022081401/559444531a28ab06308b47a0/html5/thumbnails/39.jpg)
Copyright © 2014 Accenture All rights reserved. 39
Scatter-Gather with Publish-Subscribe Input Channel
![Page 40: Application patterns](https://reader035.vdocument.in/reader035/viewer/2022081401/559444531a28ab06308b47a0/html5/thumbnails/40.jpg)
Copyright © 2014 Accenture All rights reserved. 40
Scatter-Gather with Recipient List
![Page 41: Application patterns](https://reader035.vdocument.in/reader035/viewer/2022081401/559444531a28ab06308b47a0/html5/thumbnails/41.jpg)
Scale-Out Batch High Volume Batch Processing
![Page 42: Application patterns](https://reader035.vdocument.in/reader035/viewer/2022081401/559444531a28ab06308b47a0/html5/thumbnails/42.jpg)
Copyright © 2014 Accenture All rights reserved. 42
Batch Application Elements
Job
Launcher Job Step
Reader
Processor
Writer
Job Repository
![Page 43: Application patterns](https://reader035.vdocument.in/reader035/viewer/2022081401/559444531a28ab06308b47a0/html5/thumbnails/43.jpg)
Copyright © 2014 Accenture All rights reserved. 43
Batch reference model
![Page 44: Application patterns](https://reader035.vdocument.in/reader035/viewer/2022081401/559444531a28ab06308b47a0/html5/thumbnails/44.jpg)
Copyright © 2014 Accenture All rights reserved. 44
Scaling
![Page 45: Application patterns](https://reader035.vdocument.in/reader035/viewer/2022081401/559444531a28ab06308b47a0/html5/thumbnails/45.jpg)
Copyright © 2014 Accenture All rights reserved. 45
Job with Parallel Steps
![Page 46: Application patterns](https://reader035.vdocument.in/reader035/viewer/2022081401/559444531a28ab06308b47a0/html5/thumbnails/46.jpg)
Copyright © 2014 Accenture All rights reserved. 46
Step with parallel threads
![Page 47: Application patterns](https://reader035.vdocument.in/reader035/viewer/2022081401/559444531a28ab06308b47a0/html5/thumbnails/47.jpg)
Copyright © 2014 Accenture All rights reserved. 47
Partitioning
![Page 48: Application patterns](https://reader035.vdocument.in/reader035/viewer/2022081401/559444531a28ab06308b47a0/html5/thumbnails/48.jpg)
Copyright © 2014 Accenture All rights reserved. 48
Remote chunking
![Page 49: Application patterns](https://reader035.vdocument.in/reader035/viewer/2022081401/559444531a28ab06308b47a0/html5/thumbnails/49.jpg)
Discussion