• No results found

Hierarchical Coordination Analysis

In document Emergent software systems (Page 127-132)

5.2 Distributed Emergent Web Platform

5.2.3 Hierarchical Coordination Analysis

This section presents the results of evaluating the hierarchical coordination learning algorithm. This coordination strategy enables the system to learn not only the composition for each of the participate machines in the system, but also to determine their role (i.e. the executing program, e.g. a web server, a web cache or a load balancer) in the system. As the system becomes able to autonomously learn more system’s aspects, the learning problems (see Chapter 3) become more prominent and challenging. This section focuses on evaluating the learning approach regarding

5.2. Distributed Emergent Web Platform 128 the i) search space growth, ii) interference effects during learning, and iii) invalid global compositions. The section also describes the scenario on which one of the feature-based approach assumption is not held, exemplifying the undesirable effects. The experiment deploys the architectural compositions in Fig. 5.9 in every par- ticipating node, and uses four machines to realise the system, one of these machines being the entry point. Note that the MimeType component in that architecture is not included in the Dispatcher interface, because it breaks the feature-based as- sumption that the worst composition for the best feature has to be best than any other composition of other features (see Chapter 4). In total, the number of unique compositions in Fig. 5.9 is 70. Therefore, considering 4 machines, the total number of global compositions is 704 = 24,010,000, which includes invalid compositions

and only one component available for the ExternalReferenceinterface. The hier- archical coordination algorithm separates the valid compositions in groups. One of these valid groups is the case where the entry point machine communicates directly with the remaining three machines, placing them in the first level of the system’s hierarchy. This is the case used to evaluate the system learning, having 70 avail- able compositions in the entry point and 42 compositions in the remaining three machines resulting a total of 70∗(423) = 5,186,160 global compositions.

Evaluating Compositions Under Different Workloads

In the experiment described in Sec. 5.2.2, the role (i.e. the executing program) of each of the machines in the system was predefined. The entry point machine was fixed as load balancer / web cache and the remaining two machines were fixed as web servers. In this experiment, however, the machine’s roles in the system is also autonomously defined. For that, the entry point machine has to learn in what situation is advantageous to handle all incoming requests locally, and when to forward the requests to be handled by other participating nodes.

The graphs show two synthetic workloads that demonstrate (in Fig. 5.14 (a)) the web server role is more advantageous than load balancer, and (in Fig. 5.14 (b)) the opposite, i.e. when forwarding requests is better than handling them locally. The workloads used in those graphs consist of requests to dynamic content, i.e. content

5.2. Distributed Emergent Web Platform 129 0 20 40 60 80 100 120 140 160 180 0 10 20 30 40 50 60 70 80 90 R esp on se Time ( ms) Time (s) (a) Web Server Load Balancer 0 100 200 300 400 500 600 700 800 900 1000 0 10 20 30 40 50 60 70 80 90 R esp on se Time (ms) Time (s) (b) Web Server Load Balancer

Figure 5.14: Performance of a web server and load balancer composition exposed to the Dynamic Workload A (a) and Dynamic Workload B (b).

that is processed and generated upon each request. Dynamic content was preferred over static content used in previous evaluation, because they clearly differentiate the need for Web Server or Load Balancer. The Dynamic Workload A (Fig. 5.14 (a)) is composed of sequential cycles of 5 simultaneous requests to dynamic content. Once the 5 simultaneous requests are handled, the client casts 5 more requests, and so on. The dynamic content in the Dynamic Workload A takes ∼87 ms to be processed. Similarly, the Dynamic Workload B (Fig. 5.14 (b)) is composed of cycles of 10 simultaneous requests to content that takes∼397 ms to be processed.

The results in the graph show that as the average time to handle dynamic content increases, forwarding requests to be processed in parallel by other machines becomes more advantageous. As the processing time decreases, there is no benefit for the system to forward requests. That is why the dynamic content was chosen to realise the experiment. The static content workload maintain very low processing time (i.e. only disk access time), making it less noticeable when to choose one composition over the other. As the processing time increases, it is more advantageous to spend time forwarding the requests, whilst saving time in splitting the processing time among three servers, than processing all requests in one machine. This result is well-known in distributed systems field, but is not evident for the Learning module, which executes with no prior information about the workload or the target system.

5.2. Distributed Emergent Web Platform 130

Learning Coordination Analysis

This section shows the hierarchical coordination approach and the feature-based learning algorithm locating optimal distributed compositions. For the Dynamic Work- load A, the learning system falls in the local case scenario explored in Sec. 5.1, where the results demonstrate that using either the brute-force and featured-based ap- proach the system is able to learn the optimal compositions locally. Therefore, this section focuses on the learning system when exposed to the Dynamic Workload B.

0 200 400 600 800 1000 0 30 60 90 120 150 180 210 240 270 300 330 360 390 420 450 480 R e spo nse Time (ms) Time (s) Learning Web Server Load Balancer

WORST CASE LEARNING EXPLORATION IN ALL NODES (360s)

Figure 5.15: Performance convergence (60s) of the hierarchical coordination when exposed to the Dynamic Workload B. The number of valid global compositions is 5,186,160. The brute-force learning would theoretically converge in 1.6 years.

As shown in Fig. 5.14 (b), when the system is exposed to Dynamic Workload B the best performing composition is a distributed composition, which has the entry point node to forward requests to the remaining servers. Fig. 5.15 shows the learning system undergoing through the process of locating the optimal composition in the distributed environment. The ‘Web Server’ and ‘Load Balancer’ line represents the performance of the best and worst fixed composition (no learning, nor adaptation happening) for the workload. The ‘Learning’ line (the orange line in the graph), on the other hand, is the performance of the entry point node running the learning system throughout the entire experiment. The system starts exploring using the feature-based algorithm in the entry point machine. Considering the architectural compositions in the entry point (represented in Fig. 5.9) the feature-based system first tests two compositions for the RequestHandler interface, and then tests six

5.2. Distributed Emergent Web Platform 131 compositions for theHTTPHandlerinterface, converging to a LoadBalancercompo- nent at that level. From that part of the exploration phase onwards, the system has already converged to the optimal performance, given that the 42 web server compositions running on the remaining servers have similar response time, and thus they do not affect the system’s performance even during their exploration phase.

The system (from the 80 sec time forward) continues its exploration phase com- paring the two different component variants for theDispatcherinterface, and decid- ing for the best between the two available ones. The Dynamic Workload B requests dynamic content with high variation (each request to a different content) making the CBS and RoundRobin to forward requests evenly among the remaining servers, which results in them having similar performance. After locating the optimal com- position in the entry point node, the system then triggers learning in the remaining servers concurrently. Since the remaining servers are in the first level of the archi- tecture (according to the exploration group of the experiment), the learning system executing in the remaining nodes works just as in the local scenario, locating the best performing composition among the 42 web server composition. Due to the experimented workload, the web server compositions have very similar performance and again they do not affect the global system performance.

This experiment show that the system converges in 60 seconds, but the explo- ration phase, considering the learning executing in the remaining 3 web servers, may last (in the worst case scenario) for 360 seconds. That is 180 seconds running the exploration phase in the entry point node, and 180 seconds concurrently running the exploration phase in the remaining servers, resulting in a total of 360 seconds. Therefore, the hierarchical coordination is able to explore larger search spaces in less time by locating the optimal feature before zooming in on the search to locate the optimal composition. Furthermore, by diving the exploration phase in groups, the system avoids invalid global and interference effects in learning. The latter is avoided by executing the learning process in each level of the hierarchy in different times. In this case particularly, the learning starts in the entry point machine before triggering learning in the web servers which are in subsequent level.

5.3. Additional Learning Aspects 132

In document Emergent software systems (Page 127-132)