This presentation, given on the Software Architecture course at the University of Brunel, discusses the interplay between architecture and design. How the designer and architect are really different roles and ones that often have competing goals.
57. If speed is going to be a problem…. Then evolutionary design alone may not work
58. We need to seed the design with clever architectural decisions to ensure we get the speed we need
59. We use patterns and frameworks that increase speed But often at the expense of a clear programming model. i.e. these patterns can obfuscate the implementation.
60. How it fits together: A project timeline Set-up Architecture Design: Push patterns and reuse etc Amend Architecture
64. Load balancing is great way to get horizontal scalability without affecting the programming model much!!
65. But it is limited by the time taken for a single request i.e. it allows us to handle more load, but does not allow us to reduce the time taken to execute single process
66. What if we want to make a single (possibly long running) processes faster? Lets look at an example
67. Sum the numbers between 1 and 10,000,000 int total for (n =1 to 10,000,000){ total+=n } A service has a hard limit on how fast it can execute this, defined by it ’s clock speed. Load balancing won ’t speed this up.
73. But we can also scale out. i.e. lots of normal hardware linked together
74. Scaling Out is Cost Effective Scaling out is much more cost effective per teraflop than scaling up.
75. But it adds complexity to the programming model
76. Key Point: Role of an Architect is to construct and application that performs - that often means a distributed system Distributed Systems can be much harder to manage than those that run on a single machine Why?
82. We can ’t ignore ‘wire’ time. We need to make sure programmers think about it.
83. The complexity of shared memory has been moved from the hardware domain to the software domain. Simple problems like accessing other objects are now more time consuming
84. But lets step back a little and look at why we need to distribute processing
85. Sum the numbers between 1 and 10,000,000 int total for (n =1 to 10,000,000){ total+=n } A service has a hard limit on how fast it can execute this
86.
87.
88. Parallel execution on a grid Server Grid node Grid node Grid node Grid node Send code + data Receive result Code + data (1) Code + data (2) Code + data (3) Code + data (4) Processing time is 4 x synchronous case (assuming processing time >> wire time)
89. Grid computing solves the processing problem. i.e. we can do complex computations very quickly by doing them in parallel.
93. ...but on the grid... Start DB Format Present Loop n times Grid Runner Asynchronous Synchronous Grid Callback Grid
94. Note how this muddles the design A simple loop has become a set of distributed invocations and asynchronous call backs.
95. Grids allow us to process computations quickly through parallelism. But this leads to the problem getting fast enough access to the data we want to operate on
96.
97. Why is the database a bottleneck? Server Grid node Grid node Grid node Grid node Send code Receive result Database Get data
98.
99. We can scale up by using memory not disk Memory access is much faster than disk access.
100.
101. But Single Machine Data Stores Don ’t Scale, even if they are in memory Server Grid node Grid node Grid node Grid node Send code Receive result In Memory Database Get data BOTTLENECK
102. What we need is a distributed data source? Welcome to the world of distributed caching
103. Distributed Caching Solves This Problem by Splitting The Data Over All Servers 1/5 data 1/5 data 1/5 data 1/5 data 1/5 data Client Client Client Client This is parallel processing for data access. Data requests are split across multiple machines.
104. Now we have removed the data bottleneck Server Grid node Grid node Grid node Grid node (1) Send code (2) Receive result Data Fabric 1/6 1/6 1/6 1/6 1/6 1/6
105. This gives us access to a fast shared memory across multiple machines
106. We are now massively parallel With lightning fast data access.
107. But we can get faster than this. How?? Server Grid node Grid node Grid node Grid node (1) Send code (2) Receive result Data Fabric 1/6 1/6 1/6 1/6 1/6 1/6
108. Superimpose compute and data fabrics into one entity Data Fabric 1/6 1/6 1/6 1/6 1/6 1/6 Server (1) Send code (2) Receive result
Your design is always tested Encapsulate different concerns so that changes can be independent of one another
The subtle point here is that you must direct the applications progress through others. This
In an agile team we use stand-ups as a good opportunity to establish vision. e.g. broad patterns such as layered separation or finer grained patterns/components such as a centralised workflow engine.