Free cookie consent management tool by TermsFeed Policy Generator

Changeset 4914


Ignore:
Timestamp:
11/23/10 18:22:25 (13 years ago)
Author:
cneumuel
Message:

#1260

  • implemented single sign on with services
  • fixed plugin-deployment
  • removed hive-specific userConfig sections
  • minor bugfixes
Location:
branches/HeuristicLab.Hive/sources/HeuristicLab.Hive
Files:
3 added
11 deleted
26 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/ApplicationConstants.cs

    r4424 r4914  
    4646    /// </summary>
    4747    public static int MAX_JOB_TRANSFER_COUNT = 6;
     48
     49    /// <summary>
     50    /// Default user for slave
     51    /// </summary>
     52    public static string SLAVE_USERNAME = "hiveslave";
     53
     54    /// <summary>
     55    /// Default password for slave
     56    /// </summary>
     57    public static string SLAVE_PASSWORD = "hiveslave";
    4858  }
    4959}
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/HeuristicLab.Hive.Contracts-3.3.csproj

    r4710 r4914  
    7777  </PropertyGroup>
    7878  <ItemGroup>
     79    <Reference Include="HeuristicLab.Clients.Common-3.3">
     80      <HintPath>..\..\..\..\..\..\..\..\Program Files\HeuristicLab 3.3\HeuristicLab.Clients.Common-3.3.dll</HintPath>
     81    </Reference>
    7982    <Reference Include="HeuristicLab.Collections-3.3">
    8083      <HintPath>C:\Program Files\HeuristicLab 3.3\HeuristicLab.Collections-3.3.dll</HintPath>
     
    136139    <Compile Include="BusinessObjects\SlaveConfigDto.cs" />
    137140    <Compile Include="BusinessObjects\SlaveGroupDtoList.cs" />
    138     <Compile Include="Disposable.cs" />
    139141    <Compile Include="MessageContainerWithCallback.cs" />
    140142    <Compile Include="MessageContainerWithJob.cs" />
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/WcfServicePool.cs

    r4755 r4914  
    2424using HeuristicLab.Common;
    2525using HeuristicLab.Hive.Tracing;
     26using HeuristicLab.Clients.Common;
     27using HeuristicLab.Hive.Contracts.Interfaces;
    2628
    2729namespace HeuristicLab.Hive.Contracts {
    28   public class WcfServicePool<T> {
     30  public class WcfServicePool<T> where T : class {
    2931    private static object locker = new object();
    3032
     
    3234    public string HostAddress {
    3335      get { return hostAddress; }
    34       set {
    35         if (hostAddress != value) {
    36           hostAddress = value;
    37           this.factory = null;
    38         }
    39       }
     36      set { hostAddress = value; }
     37    }
     38    private string userName;
     39    public string UserName {
     40      get { return userName; }
     41      set { userName = value; }
     42    }
     43    private string password;
     44    public string Password {
     45      get { return password; }
     46      set { hostAddress = value; }
    4047    }
    4148
    4249    private string endpointName;
    4350
    44     private string username;
    45     public string Username {
    46       get { return username; }
    47       set {
    48         if(username != value) {
    49           username = value;
    50           this.factory = null;
    51         }
    52       }
    53     }
    54 
    55     private string password;
    56     public string Password {
    57       set {
    58         if (password != value) {
    59           password = value;
    60           this.factory = null;
    61         }
    62       }
    63     }
    64 
    65     private ChannelFactory<T> factory = null;
    66     private Disposable<T> disposableService = null;
    67     private int requestCount = 0;
    68 
    69     public WcfServicePool(string username, string password, string endpointName) {
    70       this.username = username;
    71       this.password = password;
     51    public WcfServicePool(string endpointName) {
    7252      this.endpointName = endpointName;
    7353    }
    74     public WcfServicePool(string hostAddress, string username, string password, string endpointName) : this(username, password, endpointName) {
     54    public WcfServicePool(string hostAddress, string endpointName) : this(endpointName) {
    7555      this.hostAddress = hostAddress;
    7656    }
    77 
    78     private T CreateFacade(string endpointName) {
    79       lock (locker) {
    80         try {
    81           return CreateChannel(endpointName);
    82         }
    83         catch (EndpointNotFoundException ex) {
    84           OnExceptionOccured(ex);
    85         }
    86         return default(T);
    87       }
    88     }
    89 
    90     protected virtual T CreateChannel(string endpointName) {
    91       if (factory == null) {
    92         factory = new ChannelFactory<T>(endpointName);
    93         if (!string.IsNullOrEmpty(hostAddress)) {
    94           WcfSettings.SetEndpointAddress(factory.Endpoint, hostAddress);
    95         }
    96 
    97         factory.Credentials.UserName.UserName = username;
    98         factory.Credentials.UserName.Password = password;
    99       }
    100      
    101       return factory.CreateChannel();
     57    public WcfServicePool(string endpointName, string userName, string password) : this(endpointName) {
     58      this.userName = userName;
     59      this.password = password;
    10260    }
    10361
    10462    public Disposable<T> GetService() {
    105       lock (locker) {
    106         requestCount++;
    107         Logger.Debug("Request for ServiceProxy (count: " + requestCount + ")");
    108         if (disposableService != null) {
    109           if (GetServiceState() == CommunicationState.Faulted) {
    110             DisposeService();
    111           }
    112         }
    113         if (disposableService == null) {
    114           disposableService = new Disposable<T>(CreateFacade(this.endpointName));
    115           RegisterServiceEvents();
    116         }       
    117         return disposableService;
    118       }
    119     }
    120 
    121     private void RegisterServiceEvents() {
    122       disposableService.OnDisposing += new EventHandler(disposableService_OnDisposing);
    123       ((ICommunicationObject)disposableService.Obj).Faulted += new EventHandler(WcfServicePool_Faulted);
    124     }
    125 
    126     private void DeregisterServiceEvents() {
    127       disposableService.OnDisposing -= new EventHandler(disposableService_OnDisposing);
    128       ((ICommunicationObject)disposableService.Obj).Faulted -= new EventHandler(WcfServicePool_Faulted);
    129     }
    130 
    131     private CommunicationState GetServiceState() {
    132       return ((ICommunicationObject)disposableService.Obj).State;
    133     }
    134 
    135     void WcfServicePool_Faulted(object sender, EventArgs e) {
    136       OnExceptionOccured(new CommunicationException(e.ToString()));
    137     }
    138 
    139     private void disposableService_OnDisposing(object sender, EventArgs e) {
    140       DisposeService();
    141     }
    142 
    143     public void DisposeService() {
    144       lock (locker) {
    145         requestCount--;
    146         Logger.Debug("Disposing ServiceProxy (count: " + requestCount + ")");
    147         if (requestCount == 0) {
    148           try {
    149             DeregisterServiceEvents();
    150             WcfSettings.DisposeWcfClient((ICommunicationObject)disposableService.Obj);
    151           }
    152           catch (Exception e) {
    153             OnExceptionOccured(e);
    154           }
    155           finally {
    156             disposableService = null;
    157           }
    158         } else if (requestCount < 0) {
    159           throw new WcfServicePoolException("requestCount cannot be less than 0.");
     63      try {
     64        if (!string.IsNullOrEmpty(userName) && !string.IsNullOrEmpty(password)) {
     65          return ClientFactory.CreateClient<T>(endpointName, hostAddress, userName, password);
     66        } else {
     67          return ClientFactory.CreateClient<T>(endpointName, hostAddress);
    16068        }
    16169      }
     70      catch (EndpointNotFoundException ex) {
     71        OnExceptionOccured(ex);
     72      }
     73      return null;
    16274    }
    16375
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/WcfSettings.cs

    r4710 r4914  
    124124    public static void DisposeWcfClient(ICommunicationObject obj) {
    125125      if (obj != null) {
    126         if (obj.State != CommunicationState.Faulted &&
    127             obj.State != CommunicationState.Closed) {
     126        if (obj.State != CommunicationState.Faulted && obj.State != CommunicationState.Closed) {
    128127          try { obj.Close(); }
    129128          catch (CommunicationObjectFaultedException) { obj.Abort(); }
     
    133132            Logger.Error(e);
    134133          }
    135         } else
     134        } else {
    136135          obj.Abort();
     136        }
    137137      }
    138138    }
    139 
    140139  }
    141140
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.ExperimentManager.Views/3.3/HeuristicLab.Hive.ExperimentManager.Views-3.3.csproj

    r4760 r4914  
    132132  </ItemGroup>
    133133  <ItemGroup>
    134     <Compile Include="ConnectionSetupView.cs">
    135       <SubType>Form</SubType>
    136     </Compile>
    137     <Compile Include="ConnectionSetupView.Designer.cs">
    138       <DependentUpon>ConnectionSetupView.cs</DependentUpon>
    139     </Compile>
    140134    <Compile Include="ControlExtensions.cs" />
    141135    <Compile Include="HiveJobListView.cs">
     
    170164      <DependentUpon>HiveExperimentView.cs</DependentUpon>
    171165    </Compile>
    172     <Compile Include="MenuItems\ConnectionSetupMenuItem.cs" />
    173166    <Compile Include="MenuItems\ExperimentManagerMenuItem.cs" />
    174167    <Compile Include="ProgressView.cs">
     
    179172    </Compile>
    180173    <Compile Include="Properties\AssemblyInfo.cs" />
    181     <Compile Include="Properties\Resources.Designer.cs">
    182       <AutoGen>True</AutoGen>
    183       <DesignTime>True</DesignTime>
    184       <DependentUpon>Resources.resx</DependentUpon>
    185     </Compile>
    186174  </ItemGroup>
    187175  <ItemGroup>
     
    208196  </ItemGroup>
    209197  <ItemGroup>
    210     <EmbeddedResource Include="ConnectionSetupView.resx">
    211       <DependentUpon>ConnectionSetupView.cs</DependentUpon>
    212     </EmbeddedResource>
    213198    <EmbeddedResource Include="HiveJobView.resx">
    214199      <DependentUpon>HiveJobView.cs</DependentUpon>
     
    223208    <EmbeddedResource Include="ProgressView.resx">
    224209      <DependentUpon>ProgressView.cs</DependentUpon>
    225     </EmbeddedResource>
    226     <EmbeddedResource Include="Properties\Resources.resx">
    227       <Generator>ResXFileCodeGenerator</Generator>
    228       <LastGenOutput>Resources.Designer.cs</LastGenOutput>
    229210    </EmbeddedResource>
    230211  </ItemGroup>
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.ExperimentManager/3.3/HeuristicLab.Hive.ExperimentManager-3.3.csproj

    r4769 r4914  
    8080  </PropertyGroup>
    8181  <ItemGroup>
     82    <Reference Include="HeuristicLab.Clients.Common-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
     83      <HintPath>..\..\..\..\..\..\..\..\Program Files\HeuristicLab 3.3\HeuristicLab.Clients.Common-3.3.dll</HintPath>
     84    </Reference>
    8285    <Reference Include="HeuristicLab.Collections-3.3">
    8386      <HintPath>C:\Program Files\HeuristicLab 3.3\HeuristicLab.Collections-3.3.dll</HintPath>
     
    131134    <Compile Include="Progress\Progress.cs" />
    132135    <Compile Include="Properties\AssemblyInfo.cs" />
    133     <Compile Include="Properties\Settings.Designer.cs">
    134       <AutoGen>True</AutoGen>
    135       <DesignTimeSharedInput>True</DesignTimeSharedInput>
    136       <DependentUpon>Settings.settings</DependentUpon>
    137     </Compile>
    138136    <Compile Include="ServiceLocator.cs" />
    139137  </ItemGroup>
     
    142140      <SubType>Designer</SubType>
    143141    </None>
     142    <None Include="localhost - app.config">
     143      <SubType>Designer</SubType>
     144    </None>
     145    <None Include="services.heuristiclab.com - app.config">
     146      <SubType>Designer</SubType>
     147    </None>
    144148    <None Include="Jobs.cd" />
    145149    <None Include="HeuristicLab.snk" />
    146150    <None Include="Properties\AssemblyInfo.frame" />
    147     <None Include="Properties\Settings.settings">
    148       <Generator>PublicSettingsSingleFileGenerator</Generator>
    149       <LastGenOutput>Settings.Designer.cs</LastGenOutput>
    150     </None>
    151151    <None Include="Tools\RecreateServiceConfig.bat" />
    152152  </ItemGroup>
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.ExperimentManager/3.3/HeuristicLabHiveExperimentManagerPlugin.cs

    r4760 r4914  
    2525  [Plugin("HeuristicLab.Hive.ExperimentManager", "3.3")]
    2626  [PluginFile("HeuristicLab.Hive.ExperimentManager-3.3.dll", PluginFileType.Assembly)]
     27  [PluginDependency("HeuristicLab.Clients.Common", "3.3")]
    2728  [PluginDependency("HeuristicLab.Collections", "3.3")]
    2829  [PluginDependency("HeuristicLab.Common", "3.3")]
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.ExperimentManager/3.3/HiveExperiment.cs

    r4810 r4914  
    3232using HeuristicLab.Hive.ExperimentManager.Jobs;
    3333using HeuristicLab.Hive.Tracing;
     34using HeuristicLab.Clients.Common;
    3435
    3536namespace HeuristicLab.Hive.ExperimentManager {
     
    114115    public HiveExperiment()
    115116      : base(itemName, itemDescription) {
    116       this.ResourceIds = HeuristicLab.Hive.ExperimentManager.Properties.Settings.Default.ResourceIds;
     117      this.ResourceIds = "HEAL";
    117118      this.log = new Log();
    118119      InitTimer();
     
    534535        int totalJobCount = 0;
    535536        int jobCount = 0;
     537        JobResultList allResults;
     538        IDictionary<Guid, SerializedJob> allSerializedJobs = new Dictionary<Guid, SerializedJob>();
    536539        progress.Status = "Connecting to Server...";
    537540        using (Disposable<IClientFacade> service = ServiceLocator.Instance.StreamedClientFacadePool.GetService()) {
    538541          // fetch all JobDto objects to create the full tree of tree of HiveJob objects
    539542          progress.Status = "Downloading list of jobs...";
    540           JobResultList allResults = service.Obj.GetChildJobResults(rootJobId.Value, true, true).Obj;
     543          allResults = service.Obj.GetChildJobResults(rootJobId.Value, true, true).Obj;
    541544          totalJobCount = allResults.Count;
    542545
    543546          // download them first
    544           IDictionary<Guid, SerializedJob> allSerializedJobs = new Dictionary<Guid, SerializedJob>();
    545547          foreach (JobResult jobResult in allResults) {
    546548            jobCount++;
     
    549551            progress.ProgressValue = (double)jobCount / totalJobCount;
    550552          }
    551 
    552           jobCount = 1;
    553           progress.Status = string.Format("Deserializing {0} of {1} jobs... ({2} kb)", jobCount, totalJobCount, allSerializedJobs[this.rootJobId.Value].SerializedJobData.Count() / 1024);
    554           this.HiveJob = new HiveJob(allSerializedJobs[this.rootJobId.Value], false);
    555           allSerializedJobs.Remove(this.rootJobId.Value); // reduce memory footprint
    556           progress.ProgressValue = (double)jobCount / totalJobCount;
    557 
    558           if (this.HiveJob.JobDto.DateFinished.HasValue) {
    559             this.ExecutionTime = this.HiveJob.JobDto.DateFinished.Value - this.HiveJob.JobDto.DateCreated.Value;
    560             this.lastUpdateTime = this.HiveJob.JobDto.DateFinished.Value;
    561             this.ExecutionState = Core.ExecutionState.Stopped;
    562             OnStopped();
    563           } else {
    564             this.ExecutionTime = DateTime.Now - this.HiveJob.JobDto.DateCreated.Value;
    565             this.lastUpdateTime = DateTime.Now;
    566             this.ExecutionState = Core.ExecutionState.Started;
    567             OnStarted();
    568           }
    569 
    570           // build child-job tree
    571           LoadChildResults(service.Obj, this.HiveJob, allResults, allSerializedJobs, progress, totalJobCount, ref jobCount);
    572           StartResultPolling();
    573         }
     553        }
     554
     555        jobCount = 1;
     556        progress.Status = string.Format("Deserializing {0} of {1} jobs... ({2} kb)", jobCount, totalJobCount, allSerializedJobs[this.rootJobId.Value].SerializedJobData.Count() / 1024);
     557        this.HiveJob = new HiveJob(allSerializedJobs[this.rootJobId.Value], false);
     558        allSerializedJobs.Remove(this.rootJobId.Value); // reduce memory footprint
     559        progress.ProgressValue = (double)jobCount / totalJobCount;
     560
     561        if (this.HiveJob.JobDto.DateFinished.HasValue) {
     562          this.ExecutionTime = this.HiveJob.JobDto.DateFinished.Value - this.HiveJob.JobDto.DateCreated.Value;
     563          this.lastUpdateTime = this.HiveJob.JobDto.DateFinished.Value;
     564          this.ExecutionState = Core.ExecutionState.Stopped;
     565          OnStopped();
     566        } else {
     567          this.ExecutionTime = DateTime.Now - this.HiveJob.JobDto.DateCreated.Value;
     568          this.lastUpdateTime = DateTime.Now;
     569          this.ExecutionState = Core.ExecutionState.Started;
     570          OnStarted();
     571        }
     572
     573        // build child-job tree
     574        LoadChildResults(this.HiveJob, allResults, allSerializedJobs, progress, totalJobCount, ref jobCount);
     575        StartResultPolling();
    574576      }
    575577      catch (Exception e) {
     
    581583    }
    582584
    583     private void LoadChildResults(IClientFacade service, HiveJob parentHiveJob, JobResultList allResults, IDictionary<Guid, SerializedJob> allSerializedJobs, IProgress progress, int totalJobCount, ref int jobCount) {
     585    private void LoadChildResults(HiveJob parentHiveJob, JobResultList allResults, IDictionary<Guid, SerializedJob> allSerializedJobs, IProgress progress, int totalJobCount, ref int jobCount) {
    584586      IEnumerable<JobResult> childResults = from result in allResults
    585587                                            where result.ParentJobId.HasValue && result.ParentJobId.Value == parentHiveJob.JobDto.Id
     
    602604        allSerializedJobs.Remove(jobResult.Id); // reduce memory footprint
    603605        if (jobCount % 10 == 0) GC.Collect(); // this is needed or otherwise HL takes over the system when the number of jobs is high
    604         LoadChildResults(service, childHiveJob, allResults, allSerializedJobs, progress, totalJobCount, ref jobCount);
     606        LoadChildResults(childHiveJob, allResults, allSerializedJobs, progress, totalJobCount, ref jobCount);
    605607      }
    606608    }
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.ExperimentManager/3.3/HiveExperimentManager.cs

    r4769 r4914  
    2929using HeuristicLab.Hive.Contracts.ResponseObjects;
    3030using HeuristicLab.Common;
     31using HeuristicLab.Clients.Common;
    3132
    3233namespace HeuristicLab.Hive.ExperimentManager {
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.ExperimentManager/3.3/JobResultPoller.cs

    r4760 r4914  
    2727using HeuristicLab.Hive.Contracts.Interfaces;
    2828using HeuristicLab.Hive.Contracts.ResponseObjects;
     29using HeuristicLab.Clients.Common;
    2930
    3031namespace HeuristicLab.Hive.ExperimentManager {
     
    9596
    9697    private void FetchJobResults() {
     98      ResponseObject<JobResultList> response;
    9799      using (Disposable<IClientFacade> service = ServiceLocator.Instance.StreamedClientFacadePool.GetService()) {
    98         ResponseObject<JobResultList> response = service.Obj.GetChildJobResults(hiveJob.JobDto.Id, true, true);
    99         if (response.StatusMessage == ResponseStatus.Ok) {
    100           OnJobResultsReceived(response.Obj);
    101         } else {
    102           throw new JobResultPollingException(response.StatusMessage.ToString());
    103         }
     100        response = service.Obj.GetChildJobResults(hiveJob.JobDto.Id, true, true);
     101      }
     102      if (response.StatusMessage == ResponseStatus.Ok) {
     103        OnJobResultsReceived(response.Obj);
     104      } else {
     105        throw new JobResultPollingException(response.StatusMessage.ToString());
    104106      }
    105107    }
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.ExperimentManager/3.3/ServiceLocator.cs

    r4760 r4914  
    2222using HeuristicLab.Hive.Contracts;
    2323using HeuristicLab.Hive.Contracts.Interfaces;
    24 using HeuristicLab.Hive.ExperimentManager.Properties;
    2524
    2625namespace HeuristicLab.Hive.ExperimentManager {
     
    3938    }
    4039
    41     public ServiceLocator() {
    42       Settings.Default.SettingChanging += new System.Configuration.SettingChangingEventHandler(Default_SettingChanging);
    43     }
    44 
    45     internal void Default_SettingChanging(object sender, System.Configuration.SettingChangingEventArgs e) {
    46       if (clientFacadePool != null) {
    47         clientFacadePool.Username = Settings.Default.HiveUsername;
    48         clientFacadePool.Password = Settings.Default.HivePassword;
    49       }
    50       if (streamedClientFacadePool != null) {
    51         streamedClientFacadePool.Username = Settings.Default.HiveUsername;
    52         streamedClientFacadePool.Password = Settings.Default.HivePassword;
    53       }
    54     }
     40    public ServiceLocator() {  }
    5541
    5642    internal WcfServicePool<IClientFacade> ClientFacadePool {
    5743      get {
    5844        if (clientFacadePool == null) {
    59           clientFacadePool = new WcfServicePool<IClientFacade>(Settings.Default.HiveUsername, Settings.Default.HivePassword, "ClientHttpEndpoint");
     45          clientFacadePool = new WcfServicePool<IClientFacade>("ClientHttpEndpoint");
    6046        }
    6147        return clientFacadePool;
     
    6652      get {
    6753        if (streamedClientFacadePool == null) {
    68           streamedClientFacadePool = new WcfServicePool<IClientFacade>(Settings.Default.HiveUsername, Settings.Default.HivePassword, "ClientTcpStreamedEndpoint");
     54          streamedClientFacadePool = new WcfServicePool<IClientFacade>("ClientTcpStreamedEndpoint");
    6955        }
    7056        return streamedClientFacadePool;
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.ExperimentManager/3.3/app.config

    r4810 r4914  
    22<configuration>
    33  <configSections>
    4     <sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    5       <section name="HeuristicLab.Hive.ExperimentManager.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
    6       <section name="HeuristicLab.Hive.Experiment.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false"/>
    7     </sectionGroup>
    84  </configSections>
    9   <userSettings>
    10     <HeuristicLab.Hive.ExperimentManager.Properties.Settings>
    11       <setting name="ResourceIds" serializeAs="String">
    12         <value>HEAL</value>
    13       </setting>
    14       <setting name="HiveUsername" serializeAs="String">
    15         <value>cneumuel</value>
    16       </setting>
    17       <setting name="HivePassword" serializeAs="String">
    18         <value />
    19       </setting>
    20     </HeuristicLab.Hive.ExperimentManager.Properties.Settings>
    21   </userSettings>
     5
    226  <system.serviceModel>
    237
    248    <bindings>
    259      <netTcpBinding>
    26         <binding name="ClientTcpStreamedEndpoint" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" transactionFlow="false" transferMode="Streamed" transactionProtocol="OleTransactions" hostNameComparisonMode="StrongWildcard" listenBacklog="10" maxBufferPoolSize="524288" maxBufferSize="65536" maxConnections="10" maxReceivedMessageSize="104857600">
    27           <readerQuotas maxDepth="32" maxStringContentLength="104857600" maxArrayLength="104857600" maxBytesPerRead="4096" maxNameTableCharCount="16384"/>
    28           <reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false"/>
     10        <binding name="ClientTcpStreamedEndpoint" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:30:00" sendTimeout="00:30:00" transactionFlow="false" transferMode="Streamed" transactionProtocol="OleTransactions" hostNameComparisonMode="StrongWildcard" listenBacklog="10" maxBufferPoolSize="524288" maxBufferSize="65536" maxConnections="10" maxReceivedMessageSize="104857600">
     11          <readerQuotas maxDepth="32" maxStringContentLength="104857600" maxArrayLength="104857600" maxBytesPerRead="104857600" maxNameTableCharCount="104857600"/>
     12          <reliableSession ordered="true" inactivityTimeout="00:30:00" enabled="false"/>
    2913          <security mode="TransportWithMessageCredential">
    3014            <transport clientCredentialType="Windows" protectionLevel="EncryptAndSign"/>
     
    3418      </netTcpBinding>
    3519      <wsHttpBinding>
    36         <binding name="ClientHttpEndpoint" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false">
    37           <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384"/>
    38           <reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false"/>
     20        <binding name="ClientHttpEndpoint" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:30:00" sendTimeout="00:30:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" maxReceivedMessageSize="104857600" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false">
     21          <readerQuotas maxDepth="32" maxStringContentLength="104857600" maxArrayLength="104857600" maxBytesPerRead="104857600" maxNameTableCharCount="104857600"/>
     22          <reliableSession ordered="true" inactivityTimeout="00:30:00" enabled="false"/>
    3923          <security mode="Message">
    4024            <transport clientCredentialType="Windows" proxyCredentialType="None" realm=""/>
     
    4529    </bindings>
    4630    <client>
    47       <endpoint address="net.tcp://services.heuristiclab.com:8000/Hive-3.3/ClientService.svc" behaviorConfiguration="ClientServiceBehaviour" binding="netTcpBinding" bindingConfiguration="ClientTcpStreamedEndpoint" contract="HeuristicLab.Hive.Contracts.Interfaces.IClientFacade" name="ClientTcpStreamedEndpoint">
     31      <endpoint address="net.tcp://localhost:9001/Hive/ClientService.svc" binding="netTcpBinding" bindingConfiguration="ClientTcpStreamedEndpoint" contract="HeuristicLab.Hive.Contracts.Interfaces.IClientFacade" name="ClientTcpStreamedEndpoint">
    4832        <identity>
    49           <dns value="services.heuristiclab.com"/>
     33          <dns value="localhost"/>
    5034        </identity>
    5135      </endpoint>
    52       <endpoint address="http://services.heuristiclab.com/Hive-3.3/ClientService.svc" binding="wsHttpBinding" behaviorConfiguration="ClientServiceBehaviour" bindingConfiguration="ClientHttpEndpoint" contract="HeuristicLab.Hive.Contracts.Interfaces.IClientFacade" name="ClientHttpEndpoint">
     36      <endpoint address="http://localhost:9000/Hive/ClientService.svc" binding="wsHttpBinding" bindingConfiguration="ClientHttpEndpoint" contract="HeuristicLab.Hive.Contracts.Interfaces.IClientFacade" name="ClientHttpEndpoint">
    5337        <identity>
    54           <certificate encodedValue="AwAAAAEAAAAUAAAAwK1+2oAmcy/mI2P2QjyiJRh0y60gAAAAAQAAACoCAAAwggImMIIBj6ADAgECAhAIkseQ2EEhgU720qJA61gqMA0GCSqGSIb3DQEBBAUAMCQxIjAgBgNVBAMTGXNlcnZpY2VzLmhldXJpc3RpY2xhYi5jb20wHhcNMTAwNTExMTExNDAyWhcNMzkxMjMxMjM1OTU5WjAkMSIwIAYDVQQDExlzZXJ2aWNlcy5oZXVyaXN0aWNsYWIuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCq26Bwmwc7k+4W30qLQ2j+FInEL5BuH6opDY6CSlrtt3xQS/anrhvpbf3QghLDVINzcHkzbPmm/SguG4F85QLB6xO+tJaOvRo0iEK5g3c307vMIru7FJwk/OhplEQ5J1hbDgL3zOJlrWlgtqRVxCtVdF3XroI9BctOt1NkeKv9ewIDAQABo1kwVzBVBgNVHQEETjBMgBCjbgdYd4j5JgUuJ1Wo/GxroSYwJDEiMCAGA1UEAxMZc2VydmljZXMuaGV1cmlzdGljbGFiLmNvbYIQCJLHkNhBIYFO9tKiQOtYKjANBgkqhkiG9w0BAQQFAAOBgQAb/2xk2uQad68shSPl/uixWgvFI8WkxOTBopOLaLtDxwCeZ3mWVHdV9VnixHtThubnEBXAhYOCQSIXWtQuXFWO+gH3YyjTRJY5kTmXyuvBRTn3/so5SrQ7Rdlm9hf6E5YVX3tCjAy7ybUyaDUkQfmH5vmvgvpMzRfsJ1qhnUpJiQ=="/>
     38          <certificate encodedValue="AwAAAAEAAAAUAAAAfEKvcVixnJay+q4hCPFuO0JL5TQgAAAAAQAAAPIBAAAwggHuMIIBW6ADAgECAhCNN5wrUcXMmE/9xwp4TYa9MAkGBSsOAwIdBQAwFDESMBAGA1UEAxMJbG9jYWxob3N0MB4XDTEwMTAxOTEwNTMxNVoXDTM5MTIzMTIzNTk1OVowFDESMBAGA1UEAxMJbG9jYWxob3N0MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDXwC5TGcAffd/0oAWHtm0s6YXVXEgXgb1AYmBkkkhkKIFJG/e/Z0KSYbJepmSJD44W3oOAVm+x1DAsZxU79HahDYgWCuHLMm1TLpwSmYOQ0kV3pGHWHhiWV7h7oGLds/eqZ2EOpaNGryfEPnrA4VmxY91vV5/2BTeVSWG6F8lRKQIDAQABo0kwRzBFBgNVHQEEPjA8gBAR7kBnMRHO5gzThEqda0wWoRYwFDESMBAGA1UEAxMJbG9jYWxob3N0ghCNN5wrUcXMmE/9xwp4TYa9MAkGBSsOAwIdBQADgYEAoPwEG4QTDXhlxERNDfsZmM2IhEpV42ppz1kEah2oYKDa/ElIMVtvqLv6flVtg18ENN/mEJWiHZ3NyP3qr2Pip+sh+/2WBiSbOaukES/CM7OJn9kJCImH7M/xqM8pxqY8IfgM6iBVrVj9uHqj3j2BBck+cYY8fKyh3CFifMIp6ac="/>
    5539        </identity>
    5640      </endpoint>
    5741    </client>
    5842
    59     <behaviors>
    60       <endpointBehaviors>
    61         <behavior name="ClientServiceBehaviour">
    62           <clientCredentials>
    63             <serviceCertificate>
    64               <authentication certificateValidationMode="None"/>
    65             </serviceCertificate>
    66           </clientCredentials>
    67         </behavior>
    68       </endpointBehaviors>
    69     </behaviors>
    70 
    7143  </system.serviceModel>
    7244<startup><supportedRuntime version="v2.0.50727"/></startup></configuration>
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Console/3.3/HeuristicLab.Hive.Server.Console-3.3.csproj

    r4710 r4914  
    215215    </Compile>
    216216    <None Include="app.config" />
     217    <None Include="localhost - app.config" />
     218    <None Include="services.heuristiclab.com - app.config" />
    217219    <None Include="HeuristicLab.snk" />
    218220    <None Include="Properties\AssemblyInfo.frame" />
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Console/3.3/app.config

    r4810 r4914  
    2626    </bindings>
    2727    <client>
    28       <endpoint address="http://services.heuristiclab.com/Hive-3.3/ServerConsoleService.svc" behaviorConfiguration="ServerConsoleBehaviour" binding="wsHttpBinding" bindingConfiguration="ServerConsoleHttpEndpoint" contract="HeuristicLab.Hive.Contracts.Interfaces.IServerConsoleFacade" name="ServerConsoleHttpEndpoint">
     28      <endpoint address="http://localhost:9000/Hive/ServerConsoleService.svc" behaviorConfiguration="ServerConsoleBehaviour" binding="wsHttpBinding" bindingConfiguration="ServerConsoleHttpEndpoint" contract="HeuristicLab.Hive.Contracts.Interfaces.IServerConsoleFacade" name="ServerConsoleHttpEndpoint">
    2929        <identity>
    30           <certificate encodedValue="AwAAAAEAAAAUAAAAwK1+2oAmcy/mI2P2QjyiJRh0y60gAAAAAQAAACoCAAAwggImMIIBj6ADAgECAhAIkseQ2EEhgU720qJA61gqMA0GCSqGSIb3DQEBBAUAMCQxIjAgBgNVBAMTGXNlcnZpY2VzLmhldXJpc3RpY2xhYi5jb20wHhcNMTAwNTExMTExNDAyWhcNMzkxMjMxMjM1OTU5WjAkMSIwIAYDVQQDExlzZXJ2aWNlcy5oZXVyaXN0aWNsYWIuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCq26Bwmwc7k+4W30qLQ2j+FInEL5BuH6opDY6CSlrtt3xQS/anrhvpbf3QghLDVINzcHkzbPmm/SguG4F85QLB6xO+tJaOvRo0iEK5g3c307vMIru7FJwk/OhplEQ5J1hbDgL3zOJlrWlgtqRVxCtVdF3XroI9BctOt1NkeKv9ewIDAQABo1kwVzBVBgNVHQEETjBMgBCjbgdYd4j5JgUuJ1Wo/GxroSYwJDEiMCAGA1UEAxMZc2VydmljZXMuaGV1cmlzdGljbGFiLmNvbYIQCJLHkNhBIYFO9tKiQOtYKjANBgkqhkiG9w0BAQQFAAOBgQAb/2xk2uQad68shSPl/uixWgvFI8WkxOTBopOLaLtDxwCeZ3mWVHdV9VnixHtThubnEBXAhYOCQSIXWtQuXFWO+gH3YyjTRJY5kTmXyuvBRTn3/so5SrQ7Rdlm9hf6E5YVX3tCjAy7ybUyaDUkQfmH5vmvgvpMzRfsJ1qhnUpJiQ=="/>
     30          <certificate encodedValue="AwAAAAEAAAAUAAAAfEKvcVixnJay+q4hCPFuO0JL5TQgAAAAAQAAAPIBAAAwggHuMIIBW6ADAgECAhCNN5wrUcXMmE/9xwp4TYa9MAkGBSsOAwIdBQAwFDESMBAGA1UEAxMJbG9jYWxob3N0MB4XDTEwMTAxOTEwNTMxNVoXDTM5MTIzMTIzNTk1OVowFDESMBAGA1UEAxMJbG9jYWxob3N0MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDXwC5TGcAffd/0oAWHtm0s6YXVXEgXgb1AYmBkkkhkKIFJG/e/Z0KSYbJepmSJD44W3oOAVm+x1DAsZxU79HahDYgWCuHLMm1TLpwSmYOQ0kV3pGHWHhiWV7h7oGLds/eqZ2EOpaNGryfEPnrA4VmxY91vV5/2BTeVSWG6F8lRKQIDAQABo0kwRzBFBgNVHQEEPjA8gBAR7kBnMRHO5gzThEqda0wWoRYwFDESMBAGA1UEAxMJbG9jYWxob3N0ghCNN5wrUcXMmE/9xwp4TYa9MAkGBSsOAwIdBQADgYEAoPwEG4QTDXhlxERNDfsZmM2IhEpV42ppz1kEah2oYKDa/ElIMVtvqLv6flVtg18ENN/mEJWiHZ3NyP3qr2Pip+sh+/2WBiSbOaukES/CM7OJn9kJCImH7M/xqM8pxqY8IfgM6iBVrVj9uHqj3j2BBck+cYY8fKyh3CFifMIp6ac="/>
    3131        </identity>
    3232      </endpoint>
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/SlaveCommunicator.cs

    r4772 r4914  
    756756      response.List = new List<CachedHivePluginInfoDto>();
    757757      foreach (HivePluginInfoDto pluginInfo in pluginList) {
    758         if (pluginInfo.Update) {
    759           //check if there is a newer version   
    760 
    761           IPluginDescription ipd = GetAvailablePlugins().Where(pd => pd.Name == pluginInfo.Name && pd.Version.Major == pluginInfo.Version.Major && pd.Version.Minor == pluginInfo.Version.Minor && pd.Version.Revision > pluginInfo.Version.Revision).SingleOrDefault();
    762           if (ipd != null) {
    763             response.List.Add(ConvertPluginDescriptorToDto(ipd));
    764           }
     758        IPluginDescription ipd = GetAvailablePlugins().Where(pd =>
     759          pd.Name == pluginInfo.Name &&
     760          pd.Version.Major == pluginInfo.Version.Major &&
     761          pd.Version.Minor == pluginInfo.Version.Minor &&
     762          pd.Version.Revision >= pluginInfo.Version.Revision &&
     763          pd.Version.MinorRevision >= pluginInfo.Version.MinorRevision).SingleOrDefault();
     764        if (ipd != null) {
     765          response.List.Add(ConvertPluginDescriptorToDto(ipd));
    765766        } else {
    766           IPluginDescription ipd = GetAvailablePlugins().Where(pd => pd.Name == pluginInfo.Name && pd.Version.Major == pluginInfo.Version.Major && pd.Version.Minor == pluginInfo.Version.Minor && pd.Version.Revision >= pluginInfo.Version.Revision).SingleOrDefault();
    767           if (ipd != null) {
    768             response.List.Add(ConvertPluginDescriptorToDto(ipd));
    769           } else {
    770             response.StatusMessage = ResponseStatus.GetPlugins_PluginsNotAvailable;
    771             return response;
    772           }
     767          response.StatusMessage = ResponseStatus.GetPlugins_PluginsNotAvailable;
     768          return response;
    773769        }
    774770      }
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Communication/3.3/HeuristicLab.Hive.Slave.Communication-3.3.csproj

    r4905 r4914  
    7777  </PropertyGroup>
    7878  <ItemGroup>
     79    <Reference Include="HeuristicLab.Clients.Common-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
     80      <HintPath>..\..\..\..\..\..\..\..\Program Files\HeuristicLab 3.3\HeuristicLab.Clients.Common-3.3.dll</HintPath>
     81    </Reference>
    7982    <Reference Include="HeuristicLab.Collections-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL" />
    8083    <Reference Include="HeuristicLab.Common-3.3">
     
    125128  </ItemGroup>
    126129  <ItemGroup>
    127     <None Include="app-services.heuristiclab.com.config" />
    128     <None Include="app-localhost.config">
    129       <SubType>Designer</SubType>
    130     </None>
    131     <None Include="app.config" />
     130    <None Include="services.heuristiclab.com - app.config" />
     131    <None Include="localhost - app.config">
     132      <SubType>Designer</SubType>
     133    </None>
     134    <None Include="app.config">
     135      <SubType>Designer</SubType>
     136    </None>
    132137    <None Include="HeuristicLab.snk" />
    133138    <None Include="Properties\AssemblyInfo.frame" />
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Communication/3.3/HeuristicLabHiveSlaveCommunicationPlugin.cs

    r4710 r4914  
    2626  [Plugin("HeuristicLab.Hive.Slave.Communication", "3.3")]
    2727  [PluginFile("HeuristicLab.Hive.Slave.Communication-3.3.dll", PluginFileType.Assembly)]
     28  [PluginDependency("HeuristicLab.Clients.Common", "3.3")]
    2829  [PluginDependency("HeuristicLab.Common", "3.3")]
    2930  [PluginDependency("HeuristicLab.Core", "3.3")]
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Communication/3.3/ServiceLocator.cs

    r4424 r4914  
    3838    }
    3939
    40     private string hostAddress;
    41     internal string HostAddress {
    42       get {
    43         return hostAddress;
    44       }
    45       set {
    46         if (hostAddress != value) {
    47           hostAddress = value;
    48           if (slaveFacadePool != null)
    49             slaveFacadePool.HostAddress = value;
    50           if (streamedSlaveFacadePool != null)
    51             streamedSlaveFacadePool.HostAddress = value;
    52         }
    53       }
    54     }
    55 
    56     public ServiceLocator() {
    57       Settings.Default.SettingChanging += new System.Configuration.SettingChangingEventHandler(Default_SettingChanging);
    58     }
    59 
    60     void Default_SettingChanging(object sender, System.Configuration.SettingChangingEventArgs e) {
    61       if (slaveFacadePool != null) {
    62         slaveFacadePool.Username = Settings.Default.HiveUsername;
    63         slaveFacadePool.Password = Settings.Default.HivePassword;
    64       }
    65       if (streamedSlaveFacadePool != null) {
    66         streamedSlaveFacadePool.Username = Settings.Default.HiveUsername;
    67         streamedSlaveFacadePool.Password = Settings.Default.HivePassword;
    68       }
    69     }
     40    public ServiceLocator() { }
    7041
    7142    internal WcfServicePool<SlaveFacade.ISlaveFacade> SlaveFacadePool {
    7243      get {
    7344        if (slaveFacadePool == null) {
    74           slaveFacadePool = new WcfServicePool<SlaveFacade.ISlaveFacade>(HostAddress, Settings.Default.HiveUsername, Settings.Default.HivePassword, "SlaveHttpEndpoint");
     45          slaveFacadePool = new WcfServicePool<SlaveFacade.ISlaveFacade>("SlaveHttpEndpoint", ApplicationConstants.SLAVE_USERNAME, ApplicationConstants.SLAVE_PASSWORD);
    7546        }
    7647        return slaveFacadePool;
     
    8152      get {
    8253        if (streamedSlaveFacadePool == null) {
    83           streamedSlaveFacadePool = new WcfServicePool<SlaveFacade.ISlaveFacade>(HostAddress, Settings.Default.HiveUsername, Settings.Default.HivePassword, "SlaveTcpStreamedEndpoint");
     54          streamedSlaveFacadePool = new WcfServicePool<SlaveFacade.ISlaveFacade>("SlaveTcpStreamedEndpoint", ApplicationConstants.SLAVE_USERNAME, ApplicationConstants.SLAVE_PASSWORD);
    8455        }
    8556        return streamedSlaveFacadePool;
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Communication/3.3/WcfService.cs

    r4772 r4914  
    3333using HeuristicLab.PluginInfrastructure;
    3434using HeuristicLab.Hive.Tracing;
     35using HeuristicLab.Clients.Common;
    3536
    3637namespace HeuristicLab.Hive.Slave.Communication {
     
    5859    public NetworkEnum.WcfConnState ConnState { get; private set; }
    5960
    60     private string serverIp;
    61     public string ServerIp {
    62       get { return serverIp; }
    63       set {
    64         if (serverIp != value) {
    65           serverIp = value;
    66         }
    67       }
    68     }
    69 
    7061    public event EventHandler Connected;
    7162    public void OnConnected() {
     
    8576    /// </summary>
    8677    public void Connect(SlaveDto slaveInfo) {
    87       ServiceLocator.Instance.HostAddress = ServerIp;
    8878      RegisterServiceEvents();
    8979      using (Disposable<SlaveFacade.ISlaveFacade> service = ServiceLocator.Instance.StreamedSlaveFacadePool.GetService()) {
    9080        try {
    9181          Logger.Debug("Starting the Connection Process");
    92           if (String.Empty.Equals(ServerIp)) {
    93             Logger.Info("No Server IP set!");
    94             return;
    95           }
    9682          ConnState = NetworkEnum.WcfConnState.Connected;
    9783          ConnectedSince = DateTime.Now;
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Communication/3.3/app.config

    r4905 r4914  
    3030    </bindings>
    3131    <client>
    32       <endpoint address="http://services.heuristiclab.com/Hive-3.3/SlaveService.svc" binding="wsHttpBinding" behaviorConfiguration="SlaveServiceBehaviour" bindingConfiguration="SlaveHttpEndpoint" contract="SlaveFacade.ISlaveFacade" name="SlaveHttpEndpoint">
     32      <endpoint address="http://localhost:9000/Hive/SlaveService.svc" binding="wsHttpBinding" bindingConfiguration="SlaveHttpEndpoint" contract="SlaveFacade.ISlaveFacade" name="SlaveHttpEndpoint">
    3333        <identity>
    34           <certificate encodedValue="AwAAAAEAAAAUAAAAwK1+2oAmcy/mI2P2QjyiJRh0y60gAAAAAQAAACoCAAAwggImMIIBj6ADAgECAhAIkseQ2EEhgU720qJA61gqMA0GCSqGSIb3DQEBBAUAMCQxIjAgBgNVBAMTGXNlcnZpY2VzLmhldXJpc3RpY2xhYi5jb20wHhcNMTAwNTExMTExNDAyWhcNMzkxMjMxMjM1OTU5WjAkMSIwIAYDVQQDExlzZXJ2aWNlcy5oZXVyaXN0aWNsYWIuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCq26Bwmwc7k+4W30qLQ2j+FInEL5BuH6opDY6CSlrtt3xQS/anrhvpbf3QghLDVINzcHkzbPmm/SguG4F85QLB6xO+tJaOvRo0iEK5g3c307vMIru7FJwk/OhplEQ5J1hbDgL3zOJlrWlgtqRVxCtVdF3XroI9BctOt1NkeKv9ewIDAQABo1kwVzBVBgNVHQEETjBMgBCjbgdYd4j5JgUuJ1Wo/GxroSYwJDEiMCAGA1UEAxMZc2VydmljZXMuaGV1cmlzdGljbGFiLmNvbYIQCJLHkNhBIYFO9tKiQOtYKjANBgkqhkiG9w0BAQQFAAOBgQAb/2xk2uQad68shSPl/uixWgvFI8WkxOTBopOLaLtDxwCeZ3mWVHdV9VnixHtThubnEBXAhYOCQSIXWtQuXFWO+gH3YyjTRJY5kTmXyuvBRTn3/so5SrQ7Rdlm9hf6E5YVX3tCjAy7ybUyaDUkQfmH5vmvgvpMzRfsJ1qhnUpJiQ=="/>
     34          <certificate encodedValue="AwAAAAEAAAAUAAAAfEKvcVixnJay+q4hCPFuO0JL5TQgAAAAAQAAAPIBAAAwggHuMIIBW6ADAgECAhCNN5wrUcXMmE/9xwp4TYa9MAkGBSsOAwIdBQAwFDESMBAGA1UEAxMJbG9jYWxob3N0MB4XDTEwMTAxOTEwNTMxNVoXDTM5MTIzMTIzNTk1OVowFDESMBAGA1UEAxMJbG9jYWxob3N0MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDXwC5TGcAffd/0oAWHtm0s6YXVXEgXgb1AYmBkkkhkKIFJG/e/Z0KSYbJepmSJD44W3oOAVm+x1DAsZxU79HahDYgWCuHLMm1TLpwSmYOQ0kV3pGHWHhiWV7h7oGLds/eqZ2EOpaNGryfEPnrA4VmxY91vV5/2BTeVSWG6F8lRKQIDAQABo0kwRzBFBgNVHQEEPjA8gBAR7kBnMRHO5gzThEqda0wWoRYwFDESMBAGA1UEAxMJbG9jYWxob3N0ghCNN5wrUcXMmE/9xwp4TYa9MAkGBSsOAwIdBQADgYEAoPwEG4QTDXhlxERNDfsZmM2IhEpV42ppz1kEah2oYKDa/ElIMVtvqLv6flVtg18ENN/mEJWiHZ3NyP3qr2Pip+sh+/2WBiSbOaukES/CM7OJn9kJCImH7M/xqM8pxqY8IfgM6iBVrVj9uHqj3j2BBck+cYY8fKyh3CFifMIp6ac=" />
    3535        </identity>
    3636      </endpoint>
    37       <endpoint address="net.tcp://services.heuristiclab.com:8000/Hive-3.3/SlaveService.svc" behaviorConfiguration="SlaveServiceBehaviour" binding="netTcpBinding" bindingConfiguration="SlaveTcpStreamedEndpoint" contract="SlaveFacade.ISlaveFacade" name="SlaveTcpStreamedEndpoint">
     37      <endpoint address="net.tcp://localhost:9001/Hive/SlaveService.svc" binding="netTcpBinding" bindingConfiguration="SlaveTcpStreamedEndpoint" contract="SlaveFacade.ISlaveFacade" name="SlaveTcpStreamedEndpoint">
    3838        <identity>
    39           <dns value="services.heuristiclab.com"/>
     39          <dns value="localhost"/>
    4040        </identity>
    4141      </endpoint>
    4242    </client>
    43     <behaviors>
    44       <endpointBehaviors>
    45         <behavior name="SlaveServiceBehaviour">
    46           <clientCredentials>
    47             <serviceCertificate>
    48               <authentication certificateValidationMode="None"/>
    49             </serviceCertificate>
    50           </clientCredentials>
    51         </behavior>
    52       </endpointBehaviors>
    53     </behaviors>
    5443   
    5544  </system.serviceModel>
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Console/3.3/app.config

    r4810 r4914  
    1616    <bindings>
    1717      <netTcpBinding>
    18         <binding name="SlaveConsoleTcpEndpoint" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" transactionFlow="false" transferMode="Buffered" transactionProtocol="OleTransactions" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" maxBufferSize="65536" maxReceivedMessageSize="65536">
     18        <binding name="SlaveConsoleTcpEndpoint" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" transactionFlow="false" transferMode="Buffered" transactionProtocol="OleTransactions" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" maxBufferSize="65536" maxReceivedMessageSize="104857600">
    1919          <readerQuotas maxDepth="32" maxStringContentLength="104857600" maxArrayLength="104857600" maxBytesPerRead="104857600" maxNameTableCharCount="104857600"/>
    2020          <reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false"/>
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Core/3.3/Core.cs

    r4810 r4914  
    2323using System.Collections.Generic;
    2424using System.IO;
     25using System.Linq;
    2526using System.Threading;
    2627using HeuristicLab.Common;
     
    8788      RegisterServiceEvents();
    8889
    89       RecoverSettings(); // recover server IP from the settings framework
    9090      StartHeartbeats(); // Start heartbeats thread
    9191      DispatchMessageQueue(); // dispatch messages until abortRequested
     
    9494      server.Close();
    9595      Logger.Info("Program shutdown");
    96     }
    97 
    98     private void RecoverSettings() {
    99       ConnectionContainer cc = ConfigManager.Instance.GetServerIP();
    100       if (cc.IPAdress != String.Empty) {
    101         wcfService.ServerIp = cc.IPAdress;
    102       }
    10396    }
    10497
     
    303296        catch (Exception e) {
    304297          Logger.Info("Transmitting to server failed. Storing the finished job with id: " + jId + " to hdd (" + e.ToString() + ")");
    305           JobStorageManager.PersistObjectToDisc(wcfService.ServerIp, 0, jId, sJob); // [chn] Port is not unique anymore (since we need two ports for http and net.tcp-streaming). also the port is now specified only in app.config. use port 0 for the moment
     298          JobStorageManager.PersistObjectToDisc("0", 0, jId, sJob); // [chn] Port is not unique anymore (since we need two ports for http and net.tcp-streaming). also the port is now specified only in app.config. use port 0 for the moment. also serverIp is not used anymore
    306299        }
    307300        finally {
     
    372365        Logger.Debug("Fetching plugins for job " + e.Result.Obj.Id);
    373366        try {
    374           PluginCache.Instance.PreparePlugins(e.Result.Obj.PluginsNeeded);
    375           PluginCache.Instance.CopyPluginsForJob(e.Result.Obj.PluginsNeeded, e.Result.Obj.Id);
     367          PluginCache.Instance.PreparePlugins(e.Result.Obj.PluginsNeeded.OrderBy(x => x.Name).ToList());
     368          PluginCache.Instance.CopyPluginsForJob(e.Result.Obj.PluginsNeeded.OrderBy(x => x.Name).ToList(), e.Result.Obj.Id);
    376369
    377370          Logger.Debug("Plugins fetched for job " + e.Result.Obj.Id);
     
    390383              engine.Queue = MessageQueue.GetInstance();
    391384              Logger.Debug("Starting Engine for job " + e.Result.Obj.Id);
     385              engines.Add(e.Result.Obj.Id, engine);
    392386              engine.Start(e.Data);
    393               engines.Add(e.Result.Obj.Id, engine);
    394387              SlaveStatusInfo.JobsFetched++;
    395388              Logger.Info("Increment FetchedJobs to:" + SlaveStatusInfo.JobsFetched);
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Core/3.3/JobStorage/JobStorageManager.cs

    r4772 r4914  
    6161    public static void CheckAndSubmitJobsFromDisc() {
    6262      for (int index = storedJobsList.Count; index > 0; index--) {
    63         if (storedJobsList[index - 1].ServerIP == WcfService.Instance.ServerIp) {
    64           String filename = storedJobsList[index - 1].ServerIP + "." + storedJobsList[index - 1].ServerPort + "." + storedJobsList[index - 1].JobID.ToString();
    65           Logger.Info("Sending stored job " + storedJobsList[index - 1].JobID + " to the server");
    66           try {
    67             byte[] job = File.ReadAllBytes(path + filename + ".dat");
    68             if (WcfService.Instance.IsJobStillNeeded(storedJobsList[index - 1].JobID).StatusMessage == ResponseStatus.Ok) {
    69               ResponseResultReceived res = WcfService.Instance.StoreFinishedJobResultsSync(ConfigManager.Instance.GetClientInfo().Id, storedJobsList[index - 1].JobID, job, TimeSpan.Zero, null, true); // unfortunately we do not have the correct ExecutionTime since we would need to unzip the job for that
    70               Logger.Info("Sending of job " + storedJobsList[index - 1].JobID + " done");
    71             }
    72             SlaveStatusInfo.JobsProcessed++;
    73             storedJobsList.Remove(storedJobsList[index - 1]);
    74             File.Delete(path + filename + ".dat");
     63        String filename = storedJobsList[index - 1].ServerIP + "." + storedJobsList[index - 1].ServerPort + "." + storedJobsList[index - 1].JobID.ToString();
     64        Logger.Info("Sending stored job " + storedJobsList[index - 1].JobID + " to the server");
     65        try {
     66          byte[] job = File.ReadAllBytes(path + filename + ".dat");
     67          if (WcfService.Instance.IsJobStillNeeded(storedJobsList[index - 1].JobID).StatusMessage == ResponseStatus.Ok) {
     68            ResponseResultReceived res = WcfService.Instance.StoreFinishedJobResultsSync(ConfigManager.Instance.GetClientInfo().Id, storedJobsList[index - 1].JobID, job, TimeSpan.Zero, null, true); // unfortunately we do not have the correct ExecutionTime since we would need to unzip the job for that
     69            Logger.Info("Sending of job " + storedJobsList[index - 1].JobID + " done");
    7570          }
    76           catch (Exception e) {
    77             Logger.Error("Job not on hdd but on list - deleting job from list ", e);
    78             storedJobsList.Remove(storedJobsList[index - 1]);
    79             StoreJobList();
    80           }
     71          SlaveStatusInfo.JobsProcessed++;
     72          storedJobsList.Remove(storedJobsList[index - 1]);
     73          File.Delete(path + filename + ".dat");
     74        }
     75        catch (Exception e) {
     76          Logger.Error("Job not on hdd but on list - deleting job from list ", e);
     77          storedJobsList.Remove(storedJobsList[index - 1]);
     78          StoreJobList();
    8179        }
    8280      }
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Core/3.3/PluginCache.cs

    r4905 r4914  
    6565
    6666    [MethodImpl(MethodImplOptions.Synchronized)]
    67     public bool CopyPluginsForJob(List<HivePluginInfoDto> requests, Guid jobId) {
     67    public void CopyPluginsForJob(List<HivePluginInfoDto> requests, Guid jobId) {
    6868      String targetDir = Path.Combine(PluginRepositoryDir, jobId.ToString());
    6969
     
    7979          cp.Version.Major == requestedPlugin.Version.Major &&
    8080          cp.Version.Minor == requestedPlugin.Version.Minor &&
    81           cp.Version.Revision >= requestedPlugin.Version.Revision).
     81          cp.Version.Revision == requestedPlugin.Version.Revision &&
     82          cp.Version.MinorRevision >= requestedPlugin.Version.MinorRevision).
    8283          SingleOrDefault();
    83         if (pd == null) {
    84           return false;
    85         }
    86 
    87         foreach (IPluginFile ipf in pd.Files) {
    88           string x = targetDir + ipf.Name.Split('\\').Last();
    89           string y = Path.Combine(targetDir, Path.GetFileName(ipf.Name));
    90 
    91           //File.Copy(ipf.Name, targetDir + ipf.Name.Split('\\').Last());
    92           File.Copy(ipf.Name, Path.Combine(targetDir, Path.GetFileName(ipf.Name)));
     84        if (pd != null) {
     85          foreach (IPluginFile ipf in pd.Files) {
     86            File.Copy(ipf.Name, Path.Combine(targetDir, Path.GetFileName(ipf.Name)));
     87          }
    9388        }
    9489      }
    95       return true;
    9690    }
    9791
     
    107101        //we MAY run in problems here - if there is a plugin twice in requests, there may be added two different versions of the plugin
    108102        foreach (PluginDescription cachedPlugin in cachedPlugins) {
    109           if (info.Name.Equals(cachedPlugin.Name)) {
     103          if (info.Name == cachedPlugin.Name && info.Version == cachedPlugin.Version) {
    110104            Logger.Debug("Found plugin " + info.Name + ", " + info.Version);
    111105            localPlugins.Add(new HivePluginInfoDto() { Id = new Guid(), Name = info.Name, Version = info.Version, Update = true });
     
    128122
    129123      foreach (CachedHivePluginInfoDto updateablePlugin in updateablePlugins) {
    130         PluginDescription pd = cachedPlugins.Where(cachedPlugin => cachedPlugin.Name.Equals(updateablePlugin.Name)).SingleOrDefault();
     124        PluginDescription pd = cachedPlugins.Where(cachedPlugin => cachedPlugin.Name == updateablePlugin.Name && cachedPlugin.Version == updateablePlugin.Version).SingleOrDefault();
    131125
    132126        if (pd != null) {
    133           Logger.Debug("deleting old files");
    134127          foreach (IPluginFile ipf in pd.Files) {
     128            Logger.Debug(string.Format("deleting {0}", Path.GetFileName(ipf.Name)));
    135129            File.Delete(ipf.Name);
    136130          }
    137131        }
    138132
    139         Logger.Debug("creating new files");
    140133        foreach (HivePluginFile pf in updateablePlugin.PluginFiles) {
     134          Logger.Debug(string.Format("writing {0}", Path.GetFileName(pf.Name)));
    141135          File.WriteAllBytes(Path.Combine(PluginRepositoryDir, Path.GetFileName(pf.Name)), pf.BinaryFile);
    142136        }
    143 
    144         DoUpdateRun();
    145137      }
     138      DoUpdateRun();
    146139    }
    147140
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Core/3.3/SlaveConsoleService/SlaveConsoleCommunicator.cs

    r4772 r4914  
    4141    public void SetConnection(ConnectionContainer container) {
    4242      ConfigManager.Instance.SetServerIP(container);
    43       WcfService.Instance.ServerIp = container.IPAdress;
    4443    }
    4544
    4645    public ConnectionContainer GetCurrentConnection() {
    47       return new ConnectionContainer { IPAdress = WcfService.Instance.ServerIp };
     46      return new ConnectionContainer();
    4847    }
    4948
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HiveWeb/Web.config

    r4810 r4914  
    9292      </netTcpBinding>
    9393      <wsHttpBinding>
    94         <binding name="HiveServerHttpBinding">
     94        <binding name="HiveServerHttpBinding" maxReceivedMessageSize="104857600">
     95          <readerQuotas maxStringContentLength="104857600" maxArrayLength="104857600"/>
    9596          <security mode="Message">
    9697            <transport/>
Note: See TracChangeset for help on using the changeset viewer.