Logotipo IST
Bandeira Portuguesa Bandeira Inglesa    



Downloads Manager


It is presented in this section to download the policy-indexed debt. This concept can be summarized by the following statement:

The server with the fastest response, deliver more bytes.

To ensure this condition, the structure of the proxy was based on architectural pattern thread-pool. There are some threads that are started that lies dormant. At one point, will be assigned tasks that have to run in parallel on the device. At the end of the task, run the threads will enter into a mutual exclusion zone where they will report the outcome.

arqGeral

Figure 1: Thread-Pool

As you can see at the bottom of the diagram shown in Figure 1 is the mutual exclusion zone. It is in the blocks marked with the green border that makes the choice of multiple chunks of data that are scheduled to stream video file.

The Figure 2 presents an example of downloading a file with 8843861 bytes which is replicated on three servers.

arqGeral

Figure 2: Available Data

Then there was the video display in two different devices without the mutual influences created by the messages exchanged (check time tags marked in each message in Figure 3). As can be seen in Figure 3, the results are similar for both cases.

arqGeral arqGeral

Figure 3: Indexing the debt (individual)

It was decided to now make the video display simultaneously on both devices. As shown in Figure 4, there was made an allocation of resources ​​available by the servers being the bottleneck, the primarily factor responsible for this.

arqGeral arqGeral

Figure 4: Indexing the debt (competitors)