← Back to team overview

p2psp team mailing list archive

Re: Next (minor) improvements

 

2014-02-16 0:19 GMT+01:00 Juan Álvaro Muñoz Naranjo <juanalvaro83@xxxxxxxxx>
:

>
>
>
> >I think that we could assign a reward to the peers in the list based on
> >the
> >order they deliver their chunks. For example, if there are 10 peers, we
> >assign a reward to the first peer 10 that sends a chunk to us, 9 for
> >the
> >second one, and so on. Next, we simply sort the list of peers using
> >these
> >(cumulative) rewards.
>
> We need to prove (and make sure first) that this solution will actually
> reward those peers with lower latency with some reasoning. It seems so :)
>
> >If we want to avoid having to sort the list (which need not be too
> >expensive if we think that the list is sorted whenever a chunk is
> >received
> >from the splitter and when the team grows, the frequency with which one
> >receives a chunk from the splitter decreases linearly with the size of
> >the
> >team) could simply sort the list in the order in which they arrive the
> >chunk.
>
> Another option: instead of sorting the whole list upon each splitter chunk
> we can just update the sender's position after any chunk arrival (not from
> the splitter). This place update affects only one peer each time, and the
> update consist only of moving the peer upwards until it is in the correct
> position.
>
>
>
Well, I think that this procedure could also speed up the current
implementation of the peer. Now, peers send the chunks that have received
from the splitter following the order of the list of peers that, mainly, is
the list that was received from the splitter. Each time a peer receives a
chunk, the peer sends the last received chunk from the splitter to the next
peer in the list (congestion avoiding mode) and when a new chunk has been
received from the splitter, the peer sends the previous chunk to the rest
of peers of the list, if any (burst mode).

A peer X must also tracks which peers has not send a chunk to X. This is
performed by using a counter for each peer Y that is incremented if the
peer X sends a chunk to Y and decremented if Y sends to X. Therefore, after
receiving a new block from the splitter (at the end of the burst mode), X
must check all the counters of all the peers in the list, which has a O(N)
complexity being N the size of the team.

Let's suppose that X sends the last received chunk from the splitter to Y
only if Y has sent a chunk to X. This procedure should prioritize those
peers that first send data. Next, in the burst mode, X sends the previous
block received from the splitter and increments the counter of those peers
that have not send a chunk. Obviously, we still need the counters, but now
we only need to check the counters of those peers that could have a
negative balance between sent and received chunks.

Best regards,
Vicente.

-- 
Vicente González Ruiz
Depto de Informática
Escuela Técnica Superior de Ingeniería
Universidad de Almería

Carretera Sacramento S/N
04120, La Cañada de San Urbano
Almería, España

e-mail: vruiz@xxxxxx
http://www.ual.es/~vruiz
tel: +34 950 015711
fax: +34 950 015486

References