This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Peer manager limit

Hi,

I store some application data using FDS and I don't want peer manager to occupy all the space allocated to FDS (so I don't have enough space to store my application data when there are many peers stored by the peer manager as the time goes). I was thinking about limiting number of peers stored - when pm_peer_count() exceeds say 20 I delete peer with lowest rank. Is there better solution?

Martin

Parents
  • I think that is the right way to go, when the amount of peers exceeds a predefined value, delete the peer with the lowest rank.

    Regarding the ranking, there are different ways of doing it (depending on when you call pm_peer_rank_highest(..) ). If you call this function every time a peer connects, it will have an increasingly higher rank when the number of re-connections increases.

    If anything is unclear, please ask.

    Best regards,

    Simon.

Reply
  • I think that is the right way to go, when the amount of peers exceeds a predefined value, delete the peer with the lowest rank.

    Regarding the ranking, there are different ways of doing it (depending on when you call pm_peer_rank_highest(..) ). If you call this function every time a peer connects, it will have an increasingly higher rank when the number of re-connections increases.

    If anything is unclear, please ask.

    Best regards,

    Simon.

Children
No Data
Related