Changeset 4914
- Timestamp:
- 11/23/10 18:22:25 (14 years ago)
- 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 46 46 /// </summary> 47 47 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"; 48 58 } 49 59 } -
branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/HeuristicLab.Hive.Contracts-3.3.csproj
r4710 r4914 77 77 </PropertyGroup> 78 78 <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> 79 82 <Reference Include="HeuristicLab.Collections-3.3"> 80 83 <HintPath>C:\Program Files\HeuristicLab 3.3\HeuristicLab.Collections-3.3.dll</HintPath> … … 136 139 <Compile Include="BusinessObjects\SlaveConfigDto.cs" /> 137 140 <Compile Include="BusinessObjects\SlaveGroupDtoList.cs" /> 138 <Compile Include="Disposable.cs" />139 141 <Compile Include="MessageContainerWithCallback.cs" /> 140 142 <Compile Include="MessageContainerWithJob.cs" /> -
branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/WcfServicePool.cs
r4755 r4914 24 24 using HeuristicLab.Common; 25 25 using HeuristicLab.Hive.Tracing; 26 using HeuristicLab.Clients.Common; 27 using HeuristicLab.Hive.Contracts.Interfaces; 26 28 27 29 namespace HeuristicLab.Hive.Contracts { 28 public class WcfServicePool<T> {30 public class WcfServicePool<T> where T : class { 29 31 private static object locker = new object(); 30 32 … … 32 34 public string HostAddress { 33 35 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; } 40 47 } 41 48 42 49 private string endpointName; 43 50 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) { 72 52 this.endpointName = endpointName; 73 53 } 74 public WcfServicePool(string hostAddress, string username, string password, string endpointName) : this(username, password,endpointName) {54 public WcfServicePool(string hostAddress, string endpointName) : this(endpointName) { 75 55 this.hostAddress = hostAddress; 76 56 } 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; 102 60 } 103 61 104 62 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); 160 68 } 161 69 } 70 catch (EndpointNotFoundException ex) { 71 OnExceptionOccured(ex); 72 } 73 return null; 162 74 } 163 75 -
branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/WcfSettings.cs
r4710 r4914 124 124 public static void DisposeWcfClient(ICommunicationObject obj) { 125 125 if (obj != null) { 126 if (obj.State != CommunicationState.Faulted && 127 obj.State != CommunicationState.Closed) { 126 if (obj.State != CommunicationState.Faulted && obj.State != CommunicationState.Closed) { 128 127 try { obj.Close(); } 129 128 catch (CommunicationObjectFaultedException) { obj.Abort(); } … … 133 132 Logger.Error(e); 134 133 } 135 } else 134 } else { 136 135 obj.Abort(); 136 } 137 137 } 138 138 } 139 140 139 } 141 140 -
branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.ExperimentManager.Views/3.3/HeuristicLab.Hive.ExperimentManager.Views-3.3.csproj
r4760 r4914 132 132 </ItemGroup> 133 133 <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>140 134 <Compile Include="ControlExtensions.cs" /> 141 135 <Compile Include="HiveJobListView.cs"> … … 170 164 <DependentUpon>HiveExperimentView.cs</DependentUpon> 171 165 </Compile> 172 <Compile Include="MenuItems\ConnectionSetupMenuItem.cs" />173 166 <Compile Include="MenuItems\ExperimentManagerMenuItem.cs" /> 174 167 <Compile Include="ProgressView.cs"> … … 179 172 </Compile> 180 173 <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>186 174 </ItemGroup> 187 175 <ItemGroup> … … 208 196 </ItemGroup> 209 197 <ItemGroup> 210 <EmbeddedResource Include="ConnectionSetupView.resx">211 <DependentUpon>ConnectionSetupView.cs</DependentUpon>212 </EmbeddedResource>213 198 <EmbeddedResource Include="HiveJobView.resx"> 214 199 <DependentUpon>HiveJobView.cs</DependentUpon> … … 223 208 <EmbeddedResource Include="ProgressView.resx"> 224 209 <DependentUpon>ProgressView.cs</DependentUpon> 225 </EmbeddedResource>226 <EmbeddedResource Include="Properties\Resources.resx">227 <Generator>ResXFileCodeGenerator</Generator>228 <LastGenOutput>Resources.Designer.cs</LastGenOutput>229 210 </EmbeddedResource> 230 211 </ItemGroup> -
branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.ExperimentManager/3.3/HeuristicLab.Hive.ExperimentManager-3.3.csproj
r4769 r4914 80 80 </PropertyGroup> 81 81 <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> 82 85 <Reference Include="HeuristicLab.Collections-3.3"> 83 86 <HintPath>C:\Program Files\HeuristicLab 3.3\HeuristicLab.Collections-3.3.dll</HintPath> … … 131 134 <Compile Include="Progress\Progress.cs" /> 132 135 <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>138 136 <Compile Include="ServiceLocator.cs" /> 139 137 </ItemGroup> … … 142 140 <SubType>Designer</SubType> 143 141 </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> 144 148 <None Include="Jobs.cd" /> 145 149 <None Include="HeuristicLab.snk" /> 146 150 <None Include="Properties\AssemblyInfo.frame" /> 147 <None Include="Properties\Settings.settings">148 <Generator>PublicSettingsSingleFileGenerator</Generator>149 <LastGenOutput>Settings.Designer.cs</LastGenOutput>150 </None>151 151 <None Include="Tools\RecreateServiceConfig.bat" /> 152 152 </ItemGroup> -
branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.ExperimentManager/3.3/HeuristicLabHiveExperimentManagerPlugin.cs
r4760 r4914 25 25 [Plugin("HeuristicLab.Hive.ExperimentManager", "3.3")] 26 26 [PluginFile("HeuristicLab.Hive.ExperimentManager-3.3.dll", PluginFileType.Assembly)] 27 [PluginDependency("HeuristicLab.Clients.Common", "3.3")] 27 28 [PluginDependency("HeuristicLab.Collections", "3.3")] 28 29 [PluginDependency("HeuristicLab.Common", "3.3")] -
branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.ExperimentManager/3.3/HiveExperiment.cs
r4810 r4914 32 32 using HeuristicLab.Hive.ExperimentManager.Jobs; 33 33 using HeuristicLab.Hive.Tracing; 34 using HeuristicLab.Clients.Common; 34 35 35 36 namespace HeuristicLab.Hive.ExperimentManager { … … 114 115 public HiveExperiment() 115 116 : base(itemName, itemDescription) { 116 this.ResourceIds = HeuristicLab.Hive.ExperimentManager.Properties.Settings.Default.ResourceIds;117 this.ResourceIds = "HEAL"; 117 118 this.log = new Log(); 118 119 InitTimer(); … … 534 535 int totalJobCount = 0; 535 536 int jobCount = 0; 537 JobResultList allResults; 538 IDictionary<Guid, SerializedJob> allSerializedJobs = new Dictionary<Guid, SerializedJob>(); 536 539 progress.Status = "Connecting to Server..."; 537 540 using (Disposable<IClientFacade> service = ServiceLocator.Instance.StreamedClientFacadePool.GetService()) { 538 541 // fetch all JobDto objects to create the full tree of tree of HiveJob objects 539 542 progress.Status = "Downloading list of jobs..."; 540 JobResultListallResults = service.Obj.GetChildJobResults(rootJobId.Value, true, true).Obj;543 allResults = service.Obj.GetChildJobResults(rootJobId.Value, true, true).Obj; 541 544 totalJobCount = allResults.Count; 542 545 543 546 // download them first 544 IDictionary<Guid, SerializedJob> allSerializedJobs = new Dictionary<Guid, SerializedJob>();545 547 foreach (JobResult jobResult in allResults) { 546 548 jobCount++; … … 549 551 progress.ProgressValue = (double)jobCount / totalJobCount; 550 552 } 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 footprint556 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(); 574 576 } 575 577 catch (Exception e) { … … 581 583 } 582 584 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) { 584 586 IEnumerable<JobResult> childResults = from result in allResults 585 587 where result.ParentJobId.HasValue && result.ParentJobId.Value == parentHiveJob.JobDto.Id … … 602 604 allSerializedJobs.Remove(jobResult.Id); // reduce memory footprint 603 605 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); 605 607 } 606 608 } -
branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.ExperimentManager/3.3/HiveExperimentManager.cs
r4769 r4914 29 29 using HeuristicLab.Hive.Contracts.ResponseObjects; 30 30 using HeuristicLab.Common; 31 using HeuristicLab.Clients.Common; 31 32 32 33 namespace HeuristicLab.Hive.ExperimentManager { -
branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.ExperimentManager/3.3/JobResultPoller.cs
r4760 r4914 27 27 using HeuristicLab.Hive.Contracts.Interfaces; 28 28 using HeuristicLab.Hive.Contracts.ResponseObjects; 29 using HeuristicLab.Clients.Common; 29 30 30 31 namespace HeuristicLab.Hive.ExperimentManager { … … 95 96 96 97 private void FetchJobResults() { 98 ResponseObject<JobResultList> response; 97 99 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()); 104 106 } 105 107 } -
branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.ExperimentManager/3.3/ServiceLocator.cs
r4760 r4914 22 22 using HeuristicLab.Hive.Contracts; 23 23 using HeuristicLab.Hive.Contracts.Interfaces; 24 using HeuristicLab.Hive.ExperimentManager.Properties;25 24 26 25 namespace HeuristicLab.Hive.ExperimentManager { … … 39 38 } 40 39 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() { } 55 41 56 42 internal WcfServicePool<IClientFacade> ClientFacadePool { 57 43 get { 58 44 if (clientFacadePool == null) { 59 clientFacadePool = new WcfServicePool<IClientFacade>( Settings.Default.HiveUsername, Settings.Default.HivePassword,"ClientHttpEndpoint");45 clientFacadePool = new WcfServicePool<IClientFacade>("ClientHttpEndpoint"); 60 46 } 61 47 return clientFacadePool; … … 66 52 get { 67 53 if (streamedClientFacadePool == null) { 68 streamedClientFacadePool = new WcfServicePool<IClientFacade>( Settings.Default.HiveUsername, Settings.Default.HivePassword,"ClientTcpStreamedEndpoint");54 streamedClientFacadePool = new WcfServicePool<IClientFacade>("ClientTcpStreamedEndpoint"); 69 55 } 70 56 return streamedClientFacadePool; -
branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.ExperimentManager/3.3/app.config
r4810 r4914 2 2 <configuration> 3 3 <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>8 4 </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 22 6 <system.serviceModel> 23 7 24 8 <bindings> 25 9 <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"/> 29 13 <security mode="TransportWithMessageCredential"> 30 14 <transport clientCredentialType="Windows" protectionLevel="EncryptAndSign"/> … … 34 18 </netTcpBinding> 35 19 <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"/> 39 23 <security mode="Message"> 40 24 <transport clientCredentialType="Windows" proxyCredentialType="None" realm=""/> … … 45 29 </bindings> 46 30 <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"> 48 32 <identity> 49 <dns value=" services.heuristiclab.com"/>33 <dns value="localhost"/> 50 34 </identity> 51 35 </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"> 53 37 <identity> 54 <certificate encodedValue="AwAAAAEAAAAUAAAA wK1+2oAmcy/mI2P2QjyiJRh0y60gAAAAAQAAACoCAAAwggImMIIBj6ADAgECAhAIkseQ2EEhgU720qJA61gqMA0GCSqGSIb3DQEBBAUAMCQxIjAgBgNVBAMTGXNlcnZpY2VzLmhldXJpc3RpY2xhYi5jb20wHhcNMTAwNTExMTExNDAyWhcNMzkxMjMxMjM1OTU5WjAkMSIwIAYDVQQDExlzZXJ2aWNlcy5oZXVyaXN0aWNsYWIuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCq26Bwmwc7k+4W30qLQ2j+FInEL5BuH6opDY6CSlrtt3xQS/anrhvpbf3QghLDVINzcHkzbPmm/SguG4F85QLB6xO+tJaOvRo0iEK5g3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7OJn9kJCImH7M/xqM8pxqY8IfgM6iBVrVj9uHqj3j2BBck+cYY8fKyh3CFifMIp6ac="/> 55 39 </identity> 56 40 </endpoint> 57 41 </client> 58 42 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 71 43 </system.serviceModel> 72 44 <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 215 215 </Compile> 216 216 <None Include="app.config" /> 217 <None Include="localhost - app.config" /> 218 <None Include="services.heuristiclab.com - app.config" /> 217 219 <None Include="HeuristicLab.snk" /> 218 220 <None Include="Properties\AssemblyInfo.frame" /> -
branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Console/3.3/app.config
r4810 r4914 26 26 </bindings> 27 27 <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"> 29 29 <identity> 30 <certificate encodedValue="AwAAAAEAAAAUAAAA wK1+2oAmcy/mI2P2QjyiJRh0y60gAAAAAQAAACoCAAAwggImMIIBj6ADAgECAhAIkseQ2EEhgU720qJA61gqMA0GCSqGSIb3DQEBBAUAMCQxIjAgBgNVBA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2EOpaNGryfEPnrA4VmxY91vV5/2BTeVSWG6F8lRKQIDAQABo0kwRzBFBgNVHQEEPjA8gBAR7kBnMRHO5gzThEqda0wWoRYwFDESMBAGA1UEAxMJbG9jYWxob3N0ghCNN5wrUcXMmE/9xwp4TYa9MAkGBSsOAwIdBQADgYEAoPwEG4QTDXhlxERNDfsZmM2IhEpV42ppz1kEah2oYKDa/ElIMVtvqLv6flVtg18ENN/mEJWiHZ3NyP3qr2Pip+sh+/2WBiSbOaukES/CM7OJn9kJCImH7M/xqM8pxqY8IfgM6iBVrVj9uHqj3j2BBck+cYY8fKyh3CFifMIp6ac="/> 31 31 </identity> 32 32 </endpoint> -
branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/SlaveCommunicator.cs
r4772 r4914 756 756 response.List = new List<CachedHivePluginInfoDto>(); 757 757 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)); 765 766 } 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; 773 769 } 774 770 } -
branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Communication/3.3/HeuristicLab.Hive.Slave.Communication-3.3.csproj
r4905 r4914 77 77 </PropertyGroup> 78 78 <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> 79 82 <Reference Include="HeuristicLab.Collections-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL" /> 80 83 <Reference Include="HeuristicLab.Common-3.3"> … … 125 128 </ItemGroup> 126 129 <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> 132 137 <None Include="HeuristicLab.snk" /> 133 138 <None Include="Properties\AssemblyInfo.frame" /> -
branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Communication/3.3/HeuristicLabHiveSlaveCommunicationPlugin.cs
r4710 r4914 26 26 [Plugin("HeuristicLab.Hive.Slave.Communication", "3.3")] 27 27 [PluginFile("HeuristicLab.Hive.Slave.Communication-3.3.dll", PluginFileType.Assembly)] 28 [PluginDependency("HeuristicLab.Clients.Common", "3.3")] 28 29 [PluginDependency("HeuristicLab.Common", "3.3")] 29 30 [PluginDependency("HeuristicLab.Core", "3.3")] -
branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Communication/3.3/ServiceLocator.cs
r4424 r4914 38 38 } 39 39 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() { } 70 41 71 42 internal WcfServicePool<SlaveFacade.ISlaveFacade> SlaveFacadePool { 72 43 get { 73 44 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); 75 46 } 76 47 return slaveFacadePool; … … 81 52 get { 82 53 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); 84 55 } 85 56 return streamedSlaveFacadePool; -
branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Communication/3.3/WcfService.cs
r4772 r4914 33 33 using HeuristicLab.PluginInfrastructure; 34 34 using HeuristicLab.Hive.Tracing; 35 using HeuristicLab.Clients.Common; 35 36 36 37 namespace HeuristicLab.Hive.Slave.Communication { … … 58 59 public NetworkEnum.WcfConnState ConnState { get; private set; } 59 60 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 70 61 public event EventHandler Connected; 71 62 public void OnConnected() { … … 85 76 /// </summary> 86 77 public void Connect(SlaveDto slaveInfo) { 87 ServiceLocator.Instance.HostAddress = ServerIp;88 78 RegisterServiceEvents(); 89 79 using (Disposable<SlaveFacade.ISlaveFacade> service = ServiceLocator.Instance.StreamedSlaveFacadePool.GetService()) { 90 80 try { 91 81 Logger.Debug("Starting the Connection Process"); 92 if (String.Empty.Equals(ServerIp)) {93 Logger.Info("No Server IP set!");94 return;95 }96 82 ConnState = NetworkEnum.WcfConnState.Connected; 97 83 ConnectedSince = DateTime.Now; -
branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Communication/3.3/app.config
r4905 r4914 30 30 </bindings> 31 31 <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"> 33 33 <identity> 34 <certificate encodedValue="AwAAAAEAAA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/0oAWHtm0s6YXVXEgXgb1AYmBkkkhkKIFJG/e/Z0KSYbJepmSJD44W3oOAVm+x1DAsZxU79HahDYgWCuHLMm1TLpwSmYOQ0kV3pGHWHhiWV7h7oGLds/eqZ2EOpaNGryfEPnrA4VmxY91vV5/2BTeVSWG6F8lRKQIDAQABo0kwRzBFBgNVHQEEPjA8gBAR7kBnMRHO5gzThEqda0wWoRYwFDESMBAGA1UEAxMJbG9jYWxob3N0ghCNN5wrUcXMmE/9xwp4TYa9MAkGBSsOAwIdBQADgYEAoPwEG4QTDXhlxERNDfsZmM2IhEpV42ppz1kEah2oYKDa/ElIMVtvqLv6flVtg18ENN/mEJWiHZ3NyP3qr2Pip+sh+/2WBiSbOaukES/CM7OJn9kJCImH7M/xqM8pxqY8IfgM6iBVrVj9uHqj3j2BBck+cYY8fKyh3CFifMIp6ac=" /> 35 35 </identity> 36 36 </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"> 38 38 <identity> 39 <dns value=" services.heuristiclab.com"/>39 <dns value="localhost"/> 40 40 </identity> 41 41 </endpoint> 42 42 </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>54 43 55 44 </system.serviceModel> -
branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Console/3.3/app.config
r4810 r4914 16 16 <bindings> 17 17 <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"> 19 19 <readerQuotas maxDepth="32" maxStringContentLength="104857600" maxArrayLength="104857600" maxBytesPerRead="104857600" maxNameTableCharCount="104857600"/> 20 20 <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 23 23 using System.Collections.Generic; 24 24 using System.IO; 25 using System.Linq; 25 26 using System.Threading; 26 27 using HeuristicLab.Common; … … 87 88 RegisterServiceEvents(); 88 89 89 RecoverSettings(); // recover server IP from the settings framework90 90 StartHeartbeats(); // Start heartbeats thread 91 91 DispatchMessageQueue(); // dispatch messages until abortRequested … … 94 94 server.Close(); 95 95 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 }103 96 } 104 97 … … 303 296 catch (Exception e) { 304 297 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 moment298 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 306 299 } 307 300 finally { … … 372 365 Logger.Debug("Fetching plugins for job " + e.Result.Obj.Id); 373 366 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); 376 369 377 370 Logger.Debug("Plugins fetched for job " + e.Result.Obj.Id); … … 390 383 engine.Queue = MessageQueue.GetInstance(); 391 384 Logger.Debug("Starting Engine for job " + e.Result.Obj.Id); 385 engines.Add(e.Result.Obj.Id, engine); 392 386 engine.Start(e.Data); 393 engines.Add(e.Result.Obj.Id, engine);394 387 SlaveStatusInfo.JobsFetched++; 395 388 Logger.Info("Increment FetchedJobs to:" + SlaveStatusInfo.JobsFetched); -
branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Core/3.3/JobStorage/JobStorageManager.cs
r4772 r4914 61 61 public static void CheckAndSubmitJobsFromDisc() { 62 62 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"); 75 70 } 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(); 81 79 } 82 80 } -
branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Core/3.3/PluginCache.cs
r4905 r4914 65 65 66 66 [MethodImpl(MethodImplOptions.Synchronized)] 67 public boolCopyPluginsForJob(List<HivePluginInfoDto> requests, Guid jobId) {67 public void CopyPluginsForJob(List<HivePluginInfoDto> requests, Guid jobId) { 68 68 String targetDir = Path.Combine(PluginRepositoryDir, jobId.ToString()); 69 69 … … 79 79 cp.Version.Major == requestedPlugin.Version.Major && 80 80 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). 82 83 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 } 93 88 } 94 89 } 95 return true;96 90 } 97 91 … … 107 101 //we MAY run in problems here - if there is a plugin twice in requests, there may be added two different versions of the plugin 108 102 foreach (PluginDescription cachedPlugin in cachedPlugins) { 109 if (info.Name .Equals(cachedPlugin.Name)) {103 if (info.Name == cachedPlugin.Name && info.Version == cachedPlugin.Version) { 110 104 Logger.Debug("Found plugin " + info.Name + ", " + info.Version); 111 105 localPlugins.Add(new HivePluginInfoDto() { Id = new Guid(), Name = info.Name, Version = info.Version, Update = true }); … … 128 122 129 123 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(); 131 125 132 126 if (pd != null) { 133 Logger.Debug("deleting old files");134 127 foreach (IPluginFile ipf in pd.Files) { 128 Logger.Debug(string.Format("deleting {0}", Path.GetFileName(ipf.Name))); 135 129 File.Delete(ipf.Name); 136 130 } 137 131 } 138 132 139 Logger.Debug("creating new files");140 133 foreach (HivePluginFile pf in updateablePlugin.PluginFiles) { 134 Logger.Debug(string.Format("writing {0}", Path.GetFileName(pf.Name))); 141 135 File.WriteAllBytes(Path.Combine(PluginRepositoryDir, Path.GetFileName(pf.Name)), pf.BinaryFile); 142 136 } 143 144 DoUpdateRun();145 137 } 138 DoUpdateRun(); 146 139 } 147 140 -
branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Core/3.3/SlaveConsoleService/SlaveConsoleCommunicator.cs
r4772 r4914 41 41 public void SetConnection(ConnectionContainer container) { 42 42 ConfigManager.Instance.SetServerIP(container); 43 WcfService.Instance.ServerIp = container.IPAdress;44 43 } 45 44 46 45 public ConnectionContainer GetCurrentConnection() { 47 return new ConnectionContainer { IPAdress = WcfService.Instance.ServerIp };46 return new ConnectionContainer(); 48 47 } 49 48 -
branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HiveWeb/Web.config
r4810 r4914 92 92 </netTcpBinding> 93 93 <wsHttpBinding> 94 <binding name="HiveServerHttpBinding"> 94 <binding name="HiveServerHttpBinding" maxReceivedMessageSize="104857600"> 95 <readerQuotas maxStringContentLength="104857600" maxArrayLength="104857600"/> 95 96 <security mode="Message"> 96 97 <transport/>
Note: See TracChangeset
for help on using the changeset viewer.