Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/29/16 15:28:47 (8 years ago)
Author:
thasling
Message:

#2615:
finally fixed bug concerning message send to the wrong peers
also made communicationRate and messageCacheCapacity as paramters
integration in P2PMigrationAnalyzer still TBD

Location:
branches/thasling/DistributedGA/DistributedGA.Core
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/thasling/DistributedGA/DistributedGA.Core

    • Property svn:ignore
      •  

        old new  
        11bin
        22obj
         3DistributedGA.Core.csproj.user
  • branches/thasling/DistributedGA/DistributedGA.Core/Implementation/WcfPeerListManager.cs

    r13947 r13956  
    2424    private IContactService heartbeatClient;
    2525
    26     public void Init(PeerInfo source, string contactServerUrl) {
     26    private int communicationRate; //how many peers are contacted by this peer in percent
     27
     28    public void Init(PeerInfo source, string contactServerUrl, int communicationRate) {
    2729      serverString = contactServerUrl;
     30      this.communicationRate = communicationRate;
    2831      myself = source;
    2932      //Init ChannelFactory and Clients
     
    6972    private List<PeerInfo> ChoosePeersForMessaging(List<PeerInfo> allPeers) {
    7073      //communicate with 10% of the network
    71       int noOfPeers = allPeers.Count / 10;
     74      int noOfPeers = allPeers.Count / (100 /communicationRate);
    7275      List<int> indexList = GetRandomItemIndexes(noOfPeers, 0, allPeers.Count - 1);
    7376      List<PeerInfo> res = new List<PeerInfo>();
Note: See TracChangeset for help on using the changeset viewer.