Changeset 4305
- Timestamp:
- 08/24/10 18:37:04 (14 years ago)
- Location:
- branches/3.3-HiveMigration/sources/HeuristicLab.Hive
- Files:
-
- 22 added
- 4 deleted
- 27 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Calendar/3.3/Properties/AssemblyInfo.cs
r4302 r4305 58 58 // [assembly: AssemblyVersion("1.0.*")] 59 59 [assembly: AssemblyVersion("3.3.0.0")] 60 [assembly: AssemblyFileVersion("3.3.0.4 296")]60 [assembly: AssemblyFileVersion("3.3.0.4302")] -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive 3.3.sln
r4302 r4305 78 78 EndProject 79 79 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Hive.Experiment-3.3", "HeuristicLab.Hive.Experiment\3.3\HeuristicLab.Hive.Experiment-3.3.csproj", "{A84C0A25-13D0-40A6-924F-53556D9691DC}" 80 ProjectSection(ProjectDependencies) = postProject 81 {898B31CF-81DC-453B-AEB3-BDF83197A7EE} = {898B31CF-81DC-453B-AEB3-BDF83197A7EE} 82 EndProjectSection 80 83 EndProject 81 84 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Hive.Experiment.Views-3.3", "HeuristicLab.Hive.Experiment.Views\3.3\HeuristicLab.Hive.Experiment.Views-3.3.csproj", "{4F15BEA2-F494-4584-A0E5-6BA85377B313}" -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/Interfaces/ISlaveCommunicator.cs
r4289 r4305 40 40 /// </summary> 41 41 [OperationContract] 42 Response Login( Guid slaveId);42 Response Login(SlaveDto slave); 43 43 44 44 [OperationContract] -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/WcfSettings.cs
r4302 r4305 15 15 public const string ServerConsoleServiceName = "ServerConsoleService"; 16 16 public const string ClientServiceName = "ClientService"; 17 public const string ClientStreamedServiceName = "ClientServiceStreamed"; 17 18 18 19 public const int DefaultPort = 9000; … … 57 58 } 58 59 59 /// <summary>60 /// Defines the used certificate for authentification located in a certification store.61 /// </summary>62 /// <param name="svchost">A service for which this certificate is applicable.</param>63 public static void SetServiceCertificate(ServiceHost svchost) {64 #if USE_MSG_BINDING65 svchost.Credentials.ServiceCertificate.SetCertificate(66 StoreLocation.LocalMachine,67 StoreName.My,68 X509FindType.FindBySubjectName,69 SERVERCERT);70 #endif71 }60 // /// <summary> 61 // /// Defines the used certificate for authentification located in a certification store. 62 // /// </summary> 63 // /// <param name="svchost">A service for which this certificate is applicable.</param> 64 // public static void SetServiceCertificate(ServiceHost svchost) { 65 //#if USE_MSG_BINDING 66 // svchost.Credentials.ServiceCertificate.SetCertificate( 67 // StoreLocation.LocalMachine, 68 // StoreName.My, 69 // X509FindType.FindBySubjectName, 70 // SERVERCERT); 71 //#endif 72 // } 72 73 73 74 /// <summary> … … 77 78 /// <returns></returns> 78 79 public static IPAddress GetActiveIP() { 79 //return IPAddress.Parse("127.0.0.1");80 80 return System.Net.NetworkInformation.IPGlobalProperties.GetIPGlobalProperties().GetActiveTcpConnections()[0].LocalEndPoint.Address; 81 //IPAddress[] addresses;82 //addresses = Dns.GetHostAddresses(Dns.GetHostName());83 //int index = 0;84 //if (System.Environment.OSVersion.Version.Major >= 6) {85 // for (index = addresses.Length - 1; index >= 0; index--)86 // if (addresses[index].AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork)87 // break;88 //}89 //return addresses[index];90 81 } 91 82 … … 106 97 endpoint.Address = builder.ToEndpointAddress(); 107 98 } 99 108 100 } 109 101 -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment.Views/3.3/HiveExperimentView.Designer.cs
r4173 r4305 64 64 this.executionTimeTextBox = new System.Windows.Forms.TextBox(); 65 65 this.pauseButton = new System.Windows.Forms.Button(); 66 this.Server UrlLabel = new System.Windows.Forms.Label();66 this.ServerIpLabel = new System.Windows.Forms.Label(); 67 67 this.resourceIdsLabel = new System.Windows.Forms.Label(); 68 this.server UrlTextBox = new System.Windows.Forms.TextBox();68 this.serverIpTextBox = new System.Windows.Forms.TextBox(); 69 69 this.resourceIdsTextBox = new System.Windows.Forms.TextBox(); 70 70 this.disconnectButton = new System.Windows.Forms.Button(); … … 304 304 // ServerUrlLabel 305 305 // 306 this.Server UrlLabel.AutoSize = true;307 this.Server UrlLabel.Location = new System.Drawing.Point(1, 53);308 this.Server UrlLabel.Name = "ServerUrlLabel";309 this.Server UrlLabel.Size = new System.Drawing.Size(51, 13);310 this.Server UrlLabel.TabIndex = 11;311 this.Server UrlLabel.Text = "ServerUrl";306 this.ServerIpLabel.AutoSize = true; 307 this.ServerIpLabel.Location = new System.Drawing.Point(1, 53); 308 this.ServerIpLabel.Name = "ServerIpLabel"; 309 this.ServerIpLabel.Size = new System.Drawing.Size(51, 13); 310 this.ServerIpLabel.TabIndex = 11; 311 this.ServerIpLabel.Text = "ServerIp"; 312 312 // 313 313 // resourceIdsLabel … … 322 322 // serverUrlTextBox 323 323 // 324 this.server UrlTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)325 | System.Windows.Forms.AnchorStyles.Right))); 326 this.server UrlTextBox.Location = new System.Drawing.Point(72, 50);327 this.server UrlTextBox.Name = "serverUrlTextBox";328 this.server UrlTextBox.Size = new System.Drawing.Size(663, 20);329 this.server UrlTextBox.TabIndex = 13;330 this.server UrlTextBox.Validating += new System.ComponentModel.CancelEventHandler(this.serverUrlTextBox_Validating);331 this.server UrlTextBox.Validated += new System.EventHandler(this.serverUrlTextBox_Validated);324 this.serverIpTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 325 | System.Windows.Forms.AnchorStyles.Right))); 326 this.serverIpTextBox.Location = new System.Drawing.Point(72, 50); 327 this.serverIpTextBox.Name = "serverIpTextBox"; 328 this.serverIpTextBox.Size = new System.Drawing.Size(663, 20); 329 this.serverIpTextBox.TabIndex = 13; 330 this.serverIpTextBox.Validating += new System.ComponentModel.CancelEventHandler(this.serverUrlTextBox_Validating); 331 this.serverIpTextBox.Validated += new System.EventHandler(this.serverUrlTextBox_Validated); 332 332 // 333 333 // resourceIdsTextBox … … 372 372 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 373 373 this.Controls.Add(this.resourceIdsTextBox); 374 this.Controls.Add(this.server UrlTextBox);374 this.Controls.Add(this.serverIpTextBox); 375 375 this.Controls.Add(this.resourceIdsLabel); 376 376 this.Controls.Add(this.tabControl); … … 379 379 this.Controls.Add(this.executionTimeTextBox); 380 380 this.Controls.Add(this.executionTimeLabel); 381 this.Controls.Add(this.Server UrlLabel);381 this.Controls.Add(this.ServerIpLabel); 382 382 this.Controls.Add(this.pauseButton); 383 383 this.Controls.Add(this.stopButton); … … 390 390 this.Controls.SetChildIndex(this.stopButton, 0); 391 391 this.Controls.SetChildIndex(this.pauseButton, 0); 392 this.Controls.SetChildIndex(this.Server UrlLabel, 0);392 this.Controls.SetChildIndex(this.ServerIpLabel, 0); 393 393 this.Controls.SetChildIndex(this.executionTimeLabel, 0); 394 394 this.Controls.SetChildIndex(this.executionTimeTextBox, 0); … … 397 397 this.Controls.SetChildIndex(this.tabControl, 0); 398 398 this.Controls.SetChildIndex(this.resourceIdsLabel, 0); 399 this.Controls.SetChildIndex(this.server UrlTextBox, 0);399 this.Controls.SetChildIndex(this.serverIpTextBox, 0); 400 400 this.Controls.SetChildIndex(this.resourceIdsTextBox, 0); 401 401 this.Controls.SetChildIndex(this.nameLabel, 0); … … 424 424 private System.Windows.Forms.Button pauseButton; 425 425 private System.Windows.Forms.TabPage hiveStatusTabPage; 426 private System.Windows.Forms.Label Server UrlLabel;426 private System.Windows.Forms.Label ServerIpLabel; 427 427 private System.Windows.Forms.Label resourceIdsLabel; 428 private System.Windows.Forms.TextBox server UrlTextBox;428 private System.Windows.Forms.TextBox serverIpTextBox; 429 429 private System.Windows.Forms.TextBox resourceIdsTextBox; 430 430 private System.Windows.Forms.Button viewExperimentButton; -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment.Views/3.3/HiveExperimentView.cs
r4170 r4305 29 29 using HeuristicLab.Optimization; 30 30 using HeuristicLab.Optimization.Views; 31 using HeuristicLab.Hive.Experiment.Properties; 31 32 32 33 namespace HeuristicLab.Hive.Experiment.Views { … … 82 83 executionTimeTextBox.Text = Content.ExecutionTime.ToString(); 83 84 resourceIdsTextBox.Text = Content.ResourceIds; 84 server UrlTextBox.Text = Content.ServerUrl;85 serverIpTextBox.Text = Settings.Default.HiveServerIp; 85 86 experimentNamedItemView.Content = Content.Experiment; 86 87 logView.Content = Content.Log; … … 193 194 194 195 private void serverUrlTextBox_Validating(object sender, System.ComponentModel.CancelEventArgs e) { 195 if (string.IsNullOrEmpty(server UrlTextBox.Text)) {196 if (string.IsNullOrEmpty(serverIpTextBox.Text)) { 196 197 e.Cancel = true; 197 errorProvider.SetError(server UrlTextBox, "ServerUrl cannot be empty");198 server UrlTextBox.SelectAll();198 errorProvider.SetError(serverIpTextBox, "ServerUrl cannot be empty"); 199 serverIpTextBox.SelectAll(); 199 200 return; 200 201 } 201 Content.ServerUrl = serverUrlTextBox.Text;202 Settings.Default.HiveServerIp = serverIpTextBox.Text; 202 203 } 203 204 204 205 private void serverUrlTextBox_Validated(object sender, EventArgs e) { 205 errorProvider.SetError(server UrlTextBox, string.Empty);206 errorProvider.SetError(serverIpTextBox, string.Empty); 206 207 } 207 208 -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment/3.3/HeuristicLab.Hive.Experiment-3.3.csproj
r4296 r4305 85 85 <Reference Include="System.Core" /> 86 86 <Reference Include="System.Drawing" /> 87 <Reference Include="System.Runtime.Serialization" /> 87 88 <Reference Include="System.ServiceModel" /> 88 89 <Reference Include="System.Xml.Linq" /> … … 104 105 </Compile> 105 106 <Compile Include="ServiceLocator.cs" /> 106 <Compile Include="Settings.cs" />107 107 </ItemGroup> 108 108 <ItemGroup> … … 113 113 <None Include="Properties\AssemblyInfo.frame" /> 114 114 <None Include="Properties\Settings.settings"> 115 <Generator> SettingsSingleFileGenerator</Generator>115 <Generator>PublicSettingsSingleFileGenerator</Generator> 116 116 <LastGenOutput>Settings.Designer.cs</LastGenOutput> 117 117 </None> 118 <None Include="Tools\RecreateServiceConfig.bat" /> 118 119 </ItemGroup> 119 120 <ItemGroup> … … 130 131 <Name>HeuristicLab.Hive.JobBase-3.3</Name> 131 132 </ProjectReference> 133 </ItemGroup> 134 <ItemGroup> 135 <WCFMetadata Include="Service References\" /> 132 136 </ItemGroup> 133 137 <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment/3.3/HiveExperiment.cs
r4302 r4305 43 43 using System.ServiceModel; 44 44 using HeuristicLab.Hive.Contracts.ResponseObjects; 45 using HeuristicLab.Hive.Experiment.Properties; 45 46 46 47 namespace HeuristicLab.Hive.Experiment { … … 90 91 } 91 92 } 92 93 93 94 #region Storable Properties 94 95 [Storable] … … 114 115 public JobItemList JobItems { 115 116 get { return jobItems; } 116 }117 118 119 [Storable]120 private string serverUrl;121 public string ServerUrl {122 get { return serverUrl; }123 set {124 if (serverUrl != value) {125 serverUrl = value;126 OnServerUrlChanged();127 }128 }129 117 } 130 118 … … 191 179 public HiveExperiment() 192 180 : base(itemName, itemDescription) { 193 this.ServerUrl = HeuristicLab.Hive.Experiment.Properties.Settings.Default.HiveServerUrl;194 181 this.ResourceIds = HeuristicLab.Hive.Experiment.Properties.Settings.Default.ResourceIds; 195 182 this.log = new Log(); … … 205 192 HiveExperiment clone = (HiveExperiment)base.Clone(cloner); 206 193 clone.resourceIds = this.resourceIds; 207 clone.serverUrl = this.serverUrl;208 194 clone.experiment = (HeuristicLab.Optimization.Experiment)cloner.Clone(experiment); 209 195 clone.executionState = this.executionState; … … 279 265 280 266 Thread t = new Thread(() => { 281 IClientFacade clientFacade = GetClientFacade();267 IClientFacade clientFacade = CreateStreamedClientFacade(); 282 268 283 269 try { … … 307 293 LogMessage(jobItem.JobDto.Id, "Job sent to Hive"); 308 294 } 309 } catch (Exception e) { 295 } 296 catch (Exception e) { 310 297 LogMessage("Error: Starting HiveExperiment failed: " + e.Message); 311 298 this.ExecutionState = Core.ExecutionState.Stopped; … … 468 455 private void FetchAndUpdateJob(Guid jobId) { 469 456 LogMessage(jobId, "FetchAndUpdateJob started"); 470 IClientFacade clientFacade = GetClientFacade();457 IClientFacade clientFacade = CreateStreamedClientFacade(); 471 458 IOptimizer originalOptimizer; 472 459 lock (pendingOptimizersByJobId) { … … 490 477 491 478 public void AbortJob(Guid jobId) { 492 IClientFacade clientFacade = GetClientFacade();479 IClientFacade clientFacade = CreateClientFacade(); 493 480 Response response = clientFacade.AbortJob(jobId); 494 481 LogMessage(jobId, "Aborting Job: " + response.StatusMessage); … … 554 541 try { 555 542 do { 556 IClientFacade clientFacade = GetClientFacade();543 IClientFacade clientFacade = CreateStreamedClientFacade(); 557 544 IEnumerable<Guid> jobIdsToQuery = from job in JobItems 558 545 where job.State != JobState.Finished && … … 571 558 throw new Exception(response.StatusMessage.ToString()); 572 559 } 573 } catch (Exception e) { 560 } 561 catch (Exception e) { 574 562 LogMessage("Polling results failed: " + e.Message); 575 563 } … … 582 570 } 583 571 } while (!this.stopResultsPollingPending); 584 } catch (ThreadInterruptedException exception) { 572 } 573 catch (ThreadInterruptedException exception) { 585 574 // thread has been interuppted 586 } finally { 575 } 576 finally { 587 577 this.IsPollingResults = false; 588 578 } … … 601 591 public void RequestSnapshot(Guid jobId) { 602 592 Thread t = new Thread(() => { 603 IClientFacade clientFacade = GetClientFacade();593 IClientFacade clientFacade = CreateStreamedClientFacade(); 604 594 ResponseObject<SerializedJob> response; 605 595 int retryCount = 0; … … 876 866 877 867 #region Helper Functions 878 private IClientFacade GetClientFacade() {868 private IClientFacade CreateClientFacade() { 879 869 IClientFacade clientFacade = null; 880 870 do { 881 871 try { 882 clientFacade = ServiceLocator.CreateClientFacade(ServerUrl); 872 clientFacade = ServiceLocator.CreateClientFacade(string.Format("http://{0}:{1}/{2}", Settings.Default.HiveServerIp, Settings.Default.HiveServerPort, WcfSettings.ClientServiceName)); 873 883 874 } catch (EndpointNotFoundException exception) { 884 875 LogMessage("Could not connect to Server: " + exception.Message + ". Will try again in " + (resultPollingIntervalMs / 1000) + " sec."); … … 889 880 } 890 881 882 private IClientFacade CreateStreamedClientFacade() { 883 IClientFacade clientFacade = null; 884 do { 885 try { 886 clientFacade = ServiceLocator.CreateStreamedClientFacade(string.Format("http://{0}:{1}/{2}", Settings.Default.HiveServerIp, Settings.Default.HiveServerPort, WcfSettings.ClientStreamedServiceName)); 887 888 } catch (EndpointNotFoundException exception) { 889 LogMessage("Could not connect to Server: " + exception.Message + ". Will try again in " + (resultPollingIntervalMs / 1000) + " sec."); 890 Thread.Sleep(resultPollingIntervalMs); 891 } 892 } while (clientFacade == null && this.ExecutionState != Core.ExecutionState.Stopped); 893 return clientFacade; 894 } 891 895 892 896 private void AddRange(IDictionary<IOptimizer, IOptimizer> optimizers, IDictionary<IOptimizer, IOptimizer> childs) { -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment/3.3/Properties/Settings.Designer.cs
r4116 r4305 14 14 [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 15 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")] 16 internalsealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {16 public sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 17 18 18 private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); … … 21 21 get { 22 22 return defaultInstance; 23 }24 }25 26 [global::System.Configuration.UserScopedSettingAttribute()]27 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]28 [global::System.Configuration.DefaultSettingValueAttribute("net.tcp://10.42.1.153:9000/ExecutionEngine/ExecutionEngineFacade")]29 public string HiveServerUrl {30 get {31 return ((string)(this["HiveServerUrl"]));32 }33 set {34 this["HiveServerUrl"] = value;35 23 } 36 24 } … … 47 35 } 48 36 } 37 38 [global::System.Configuration.UserScopedSettingAttribute()] 39 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 40 [global::System.Configuration.DefaultSettingValueAttribute("localhost")] 41 public string HiveServerIp { 42 get { 43 return ((string)(this["HiveServerIp"])); 44 } 45 set { 46 this["HiveServerIp"] = value; 47 } 48 } 49 50 [global::System.Configuration.UserScopedSettingAttribute()] 51 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 52 [global::System.Configuration.DefaultSettingValueAttribute("cneumueller")] 53 public string HiveUsername { 54 get { 55 return ((string)(this["HiveUsername"])); 56 } 57 set { 58 this["HiveUsername"] = value; 59 } 60 } 61 62 [global::System.Configuration.UserScopedSettingAttribute()] 63 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 64 [global::System.Configuration.DefaultSettingValueAttribute("cneumueller")] 65 public string HivePassword { 66 get { 67 return ((string)(this["HivePassword"])); 68 } 69 set { 70 this["HivePassword"] = value; 71 } 72 } 73 74 [global::System.Configuration.UserScopedSettingAttribute()] 75 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 76 [global::System.Configuration.DefaultSettingValueAttribute("9000")] 77 public string HiveServerPort { 78 get { 79 return ((string)(this["HiveServerPort"])); 80 } 81 set { 82 this["HiveServerPort"] = value; 83 } 84 } 49 85 } 50 86 } -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment/3.3/Properties/Settings.settings
r4116 r4305 3 3 <Profiles /> 4 4 <Settings> 5 <Setting Name="HiveServerUrl" Type="System.String" Scope="User">6 <Value Profile="(Default)">net.tcp://10.42.1.153:9000/ExecutionEngine/ExecutionEngineFacade</Value>7 </Setting>8 5 <Setting Name="ResourceIds" Type="System.String" Scope="User"> 9 6 <Value Profile="(Default)">MyGroup</Value> 10 7 </Setting> 8 <Setting Name="HiveServerIp" Type="System.String" Scope="User"> 9 <Value Profile="(Default)">localhost</Value> 10 </Setting> 11 <Setting Name="HiveUsername" Type="System.String" Scope="User"> 12 <Value Profile="(Default)">cneumueller</Value> 13 </Setting> 14 <Setting Name="HivePassword" Type="System.String" Scope="User"> 15 <Value Profile="(Default)">cneumueller</Value> 16 </Setting> 17 <Setting Name="HiveServerPort" Type="System.String" Scope="User"> 18 <Value Profile="(Default)">9000</Value> 19 </Setting> 11 20 </Settings> 12 21 </SettingsFile> -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment/3.3/ServiceLocator.cs
r4302 r4305 27 27 using System.ServiceModel; 28 28 using HeuristicLab.Hive.Contracts; 29 using HeuristicLab.Hive.Experiment.Properties; 29 30 30 31 namespace HeuristicLab.Hive.Experiment { 31 32 internal class ServiceLocator { 32 33 internal static IClientFacade CreateClientFacade(string url) { 33 ChannelFactory<IClientFacade> factory = new ChannelFactory<IClientFacade>( 34 WcfSettings.GetStreamedBinding(), 35 new EndpointAddress(url)); 36 return factory.CreateChannel(); 34 ChannelFactory<IClientFacade> factory = new ChannelFactory<IClientFacade>("ClientHttpEndpoint"); 35 WcfSettings.SetEndpointAddress(factory.Endpoint, url); 36 37 factory.Credentials.UserName.UserName = Settings.Default.HiveUsername; 38 factory.Credentials.UserName.Password = Settings.Default.HivePassword; 39 40 IClientFacade client = factory.CreateChannel(); 41 return client; 42 } 43 44 internal static IClientFacade CreateStreamedClientFacade(string url) { 45 ChannelFactory<IClientFacade> factory = new ChannelFactory<IClientFacade>("ClientStreamedHttpEndpoint"); 46 WcfSettings.SetEndpointAddress(factory.Endpoint, url); 47 48 factory.Credentials.UserName.UserName = Settings.Default.HiveUsername; 49 factory.Credentials.UserName.Password = Settings.Default.HivePassword; 50 51 IClientFacade client = factory.CreateChannel(); 52 return client; 37 53 } 38 54 } -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment/3.3/app.config
r4170 r4305 8 8 <userSettings> 9 9 <HeuristicLab.Hive.Experiment.Properties.Settings> 10 <setting name="HiveServerUrl" serializeAs="String">11 <value>net.tcp://10.20.71.22:9000/ExecutionEngine/ExecutionEngineFacade</value>12 </setting>13 10 <setting name="ResourceIds" serializeAs="String"> 14 11 <value>MyGroup</value> 15 12 </setting> 13 <setting name="HiveServerIp" serializeAs="String"> 14 <value>localhost</value> 15 </setting> 16 <setting name="HiveUsername" serializeAs="String"> 17 <value>cneumueller</value> 18 </setting> 19 <setting name="HivePassword" serializeAs="String"> 20 <value>cneumueller</value> 21 </setting> 22 <setting name="HiveServerPort" serializeAs="String"> 23 <value>9000</value> 24 </setting> 16 25 </HeuristicLab.Hive.Experiment.Properties.Settings> 17 26 </userSettings> 27 <system.serviceModel> 28 29 <bindings> 30 <basicHttpBinding> 31 <binding name="ClientStreamedHttpEndpoint" closeTimeout="00:01:00" 32 openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" 33 allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" 34 maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" 35 messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" 36 useDefaultWebProxy="true"> 37 <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" 38 maxBytesPerRead="4096" maxNameTableCharCount="16384" /> 39 <security mode="None"> 40 <transport clientCredentialType="None" proxyCredentialType="None" 41 realm="" /> 42 <message clientCredentialType="UserName" algorithmSuite="Default" /> 43 </security> 44 </binding> 45 </basicHttpBinding> 46 <wsHttpBinding> 47 <binding name="ClientHttpEndpoint" closeTimeout="00:01:00" openTimeout="00:01:00" 48 receiveTimeout="00:10:00" sendTimeout="00:01:00" bypassProxyOnLocal="false" 49 transactionFlow="false" hostNameComparisonMode="StrongWildcard" 50 maxBufferPoolSize="524288" maxReceivedMessageSize="65536" 51 messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" 52 allowCookies="false"> 53 <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" 54 maxBytesPerRead="4096" maxNameTableCharCount="16384" /> 55 <reliableSession ordered="true" inactivityTimeout="00:10:00" 56 enabled="false" /> 57 <security mode="Message"> 58 <transport clientCredentialType="Windows" proxyCredentialType="None" 59 realm="" /> 60 <message clientCredentialType="UserName" negotiateServiceCredential="true" 61 algorithmSuite="Default" /> 62 </security> 63 </binding> 64 <binding name="ClientMexEndpoint" closeTimeout="00:01:00" openTimeout="00:01:00" 65 receiveTimeout="00:10:00" sendTimeout="00:01:00" bypassProxyOnLocal="false" 66 transactionFlow="false" hostNameComparisonMode="StrongWildcard" 67 maxBufferPoolSize="524288" maxReceivedMessageSize="65536" 68 messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" 69 allowCookies="false"> 70 <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" 71 maxBytesPerRead="4096" maxNameTableCharCount="16384" /> 72 <reliableSession ordered="true" inactivityTimeout="00:10:00" 73 enabled="false" /> 74 <security mode="None"> 75 <transport clientCredentialType="Windows" proxyCredentialType="None" 76 realm="" /> 77 <message clientCredentialType="Windows" negotiateServiceCredential="true" /> 78 </security> 79 </binding> 80 </wsHttpBinding> 81 </bindings> 82 <client> 83 <endpoint address="http://localhost:9000/ClientService" behaviorConfiguration="ClientServiceBehaviour" binding="wsHttpBinding" 84 bindingConfiguration="ClientHttpEndpoint" contract="HeuristicLab.Hive.Contracts.Interfaces.IClientFacade" 85 name="ClientHttpEndpoint"> 86 <identity> 87 <certificate encodedValue="AwAAAAEAAAAUAAAAeBLH/0jWrlsW42fIC8VIIdAE6PUgAAAAAQAAAPIBAAAwggHuMIIBW6ADAgECAhDez3CoJIIitEZ5xwVqLJn6MAkGBSsOAwIdBQAwFDESMBAGA1UEAxMJbG9jYWxob3N0MB4XDTEwMDgyMzE1NTg0OFoXDTM5MTIzMTIzNTk1OVowFDESMBAGA1UEAxMJbG9jYWxob3N0MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCmOgweB6X4Ss6W2xb2hg1x61cjD2T7SO0ckkzmtqRhC2UWly9dBnonFJmg9RjN0y6l2tZhVzNhq8DgCkn3hPg5GL3XIwYX4PsXwNmeT6i+7s6rGbESuaEMvYOAQJSJ+MTgBvXCwo2g5nFHIBqP4W4aU2eybxP7H4cm1rQpoYHHjQIDAQABo0kwRzBFBgNVHQEEPjA8gBASDhO/IE7Ff7PpkCVF8oUpoRYwFDESMBAGA1UEAxMJbG9jYWxob3N0ghDez3CoJIIitEZ5xwVqLJn6MAkGBSsOAwIdBQADgYEAhxAzm3JTV7j51jti5P7izTEs7+8534kQloeAJDwlKolkd4ZMkf0BiexC2Vt1KsnxUjrK0HbbITzazkvkAmKi7dP+4G+3SrWag5lS4NcoPjTQy16T3zC9E6yafRaZp1/pxjC3Ap44qwq4Kjl2mEjeHHsdie/h4loowTqC9FlLbgo=" /> 88 </identity> 89 </endpoint> 90 <endpoint address="http://localhost:9000/ClientService/mex" binding="wsHttpBinding" 91 bindingConfiguration="ClientMexEndpoint" contract="HeuristicLab.Hive.Contracts.Interfaces.IClientFacade" 92 name="ClientMexEndpoint" /> 93 <endpoint address="http://localhost:9000/ClientServiceStreamed" 94 binding="basicHttpBinding" bindingConfiguration="ClientStreamedHttpEndpoint" 95 contract="HeuristicLab.Hive.Contracts.Interfaces.IClientFacade" name="ClientStreamedHttpEndpoint" /> 96 </client> 97 98 <behaviors> 99 <endpointBehaviors> 100 <behavior name="ClientServiceBehaviour"> 101 <clientCredentials> 102 <serviceCertificate> 103 <authentication certificateValidationMode="None" /> 104 </serviceCertificate> 105 </clientCredentials> 106 </behavior> 107 </endpointBehaviors> 108 </behaviors> 109 110 </system.serviceModel> 18 111 </configuration> -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Console/3.3/Tools
-
Property
svn:ignore
set to
ServerConsoleFacade.cs
-
Property
svn:ignore
set to
-
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Console/3.3/Tools/RecreateServiceConfig.bat
r4302 r4305 4 4 SvcUtil.exe ^ 5 5 /noLogo ^ 6 /language:cs ^ 7 http://192.168.198.1:9000/ServerConsoleService/?wsdl ^ 8 /config:../app.config 6 http://localhost1:9000/ServerConsoleService/?wsdl ^ 7 /config:app.config -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/Facades/SlaveFacade.cs
r4302 r4305 51 51 [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Administrator)] 52 52 [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Slave)] 53 public Response Login( Guid slaveId) {53 public Response Login(SlaveDto slave) { 54 54 using (contextFactory.GetContext()) { 55 return slaveCommunicator.Login(slave Id);55 return slaveCommunicator.Login(slave); 56 56 } 57 57 } -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/SlaveCommunicator.cs
r4289 r4305 176 176 /// <param name="slaveInfo"></param> 177 177 /// <returns></returns> 178 public Response Login( Guid slaveId) {178 public Response Login(SlaveDto slave) { 179 179 Response response = new Response(); 180 180 181 181 heartbeatLock.EnterWriteLock(); 182 if (lastHeartbeats.ContainsKey(slave Id)) {183 lastHeartbeats[slave Id] = DateTime.Now;182 if (lastHeartbeats.ContainsKey(slave.Id)) { 183 lastHeartbeats[slave.Id] = DateTime.Now; 184 184 } else { 185 lastHeartbeats.Add(slave Id, DateTime.Now);185 lastHeartbeats.Add(slave.Id, DateTime.Now); 186 186 } 187 187 heartbeatLock.ExitWriteLock(); 188 188 189 SlaveDto dbSlave = DaoLocator.SlaveDao.FindById(slaveId); 190 191 //Really set offline? 192 //Reconnect issues with the currently calculating jobs 193 dbSlave.State = SlaveState.Idle; 194 dbSlave.CalendarSyncStatus = dbSlave != null ? dbSlave.CalendarSyncStatus : CalendarState.NotAllowedToFetch; 189 SlaveDto dbSlave = DaoLocator.SlaveDao.FindById(slave.Id); 190 191 slave.CalendarSyncStatus = dbSlave != null ? dbSlave.CalendarSyncStatus : CalendarState.NotAllowedToFetch; 192 slave.State = SlaveState.Idle; 195 193 196 194 if (dbSlave == null) 197 DaoLocator.SlaveDao.Insert(dbSlave); 198 else 199 DaoLocator.SlaveDao.Update(dbSlave); 195 DaoLocator.SlaveDao.Insert(slave); 196 else { 197 DaoLocator.SlaveDao.Update(slave); 198 } 200 199 201 200 return response; -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/app.config
r4302 r4305 28 28 29 29 <bindings> 30 30 <basicHttpBinding> 31 <binding name="StreamedHttpBinding" sendTimeout="00:10:00" maxBufferSize="104857600" 32 maxBufferPoolSize="104857600" maxReceivedMessageSize="104857600" 33 transferMode="Streamed"> 34 <readerQuotas maxStringContentLength="104857600" maxArrayLength="104857600" /> 35 <security> 36 <transport> 37 <extendedProtectionPolicy policyEnforcement="Never" /> 38 </transport> 39 </security> 40 </binding> 41 </basicHttpBinding> 31 42 <wsHttpBinding> 32 43 <binding name="HttpBinding"> 33 44 <security> 45 <transport> 46 <extendedProtectionPolicy policyEnforcement="Never" /> 47 </transport> 34 48 <message clientCredentialType="UserName" /> 35 49 </security> … … 85 99 <endpoint address="mex" binding="mexHttpBinding" name="ClientMexEndpoint" 86 100 contract="HeuristicLab.Hive.Contracts.Interfaces.IClientFacade" /> 101 <endpoint address="http://localhost:9000/ClientServiceStreamed" 102 binding="basicHttpBinding" bindingConfiguration="StreamedHttpBinding" 103 name="ClientStreamedHttpEndpoint" contract="HeuristicLab.Hive.Contracts.Interfaces.IClientFacade" /> 87 104 <host> 88 105 <baseAddresses> … … 92 109 </service> 93 110 </services> 111 94 112 </system.serviceModel> 95 113 -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.LINQDataAccess/3.3
- Property svn:ignore
-
old new 1 1 bin 2 2 obj 3 HeuristicLab.Hive.Server.LINQDataAccess-3.3.csproj.user
-
- Property svn:ignore
-
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server/3.3/HeuristicLabHiveServerApplication.cs
r4302 r4305 35 35 [Application("Hive Server", "Server application for the distributed hive engine.", false)] 36 36 public class HeuristicLabHiveServerApplication : ApplicationBase { 37 Dictionary<string, Uri> baseAddrDict = new Dictionary<string, Uri>(); 37 //private Dictionary<string, Uri> baseAddrDict = new Dictionary<string, Uri>(); 38 private IDictionary<string, ServiceHost> serviceHosts = new Dictionary<string, ServiceHost>(); 39 ILifecycleManager lifecycleManager = null; 38 40 39 41 public override void Run() { 40 ILifecycleManager lifecycleManager = null;41 ServiceHost slaveServiceHost = null;42 ServiceHost serverConsoleServiceHost = null;43 ServiceHost clientServiceHost = null;44 42 try { 45 slaveServiceHost = new ServiceHost(ApplicationManager.Manager.GetTypes(typeof(ISlaveFacade)).First(), GetUri(WcfSettings.SlaveServiceName)); 46 slaveServiceHost.Open(); 47 48 serverConsoleServiceHost = new ServiceHost(ApplicationManager.Manager.GetTypes(typeof(IServerConsoleFacade)).First(), GetUri(WcfSettings.ServerConsoleServiceName)); 49 serverConsoleServiceHost.Open(); 50 51 clientServiceHost = new ServiceHost(ApplicationManager.Manager.GetTypes(typeof(IClientFacade)).First(), GetUri(WcfSettings.ClientServiceName)); 52 clientServiceHost.Open(); 43 CreateAndOpenServiceHost(typeof(ISlaveFacade), WcfSettings.SlaveServiceName); 44 CreateAndOpenServiceHost(typeof(IServerConsoleFacade), WcfSettings.ServerConsoleServiceName); 45 CreateAndOpenServiceHost(typeof(IClientFacade), WcfSettings.ClientServiceName); 53 46 54 47 lifecycleManager = ServiceLocator.GetLifecycleManager(); 55 48 lifecycleManager.Init(); 56 49 57 Form mainForm = new MainForm( baseAddrDict);50 Form mainForm = new MainForm(GetBaseAddresses()); 58 51 Application.Run(); 52 } finally { 53 foreach (ServiceHost host in serviceHosts.Values) { 54 if (host.State == CommunicationState.Opened) 55 host.Close(); 56 } 57 if (lifecycleManager != null) 58 lifecycleManager.Shutdown(); 59 } 60 } 61 62 private ServiceHost CreateAndOpenServiceHost(Type serviceInterfaceType, string serviceName) { 63 try { 64 ServiceHost host = new ServiceHost(ApplicationManager.Manager.GetTypes(serviceInterfaceType).First()); 65 host.Open(); 66 serviceHosts.Add(serviceName, host); 67 return host; 59 68 } 60 69 catch (AddressAccessDeniedException ex) { 61 70 throw new Exception("Unable to start WCF-Services due to missing rights. Run the following command as administrator: \"netsh http add urlacl url=http://+" + WcfSettings.DefaultPort + "/ user=MYMACHINE\\UserName\". See inner exception for more details.", ex); 62 71 } 63 finally {64 if (slaveServiceHost != null && slaveServiceHost.State == CommunicationState.Opened)65 slaveServiceHost.Close();66 if (serverConsoleServiceHost != null && serverConsoleServiceHost.State == CommunicationState.Opened)67 serverConsoleServiceHost.Close();68 if (clientServiceHost != null && clientServiceHost.State == CommunicationState.Opened)69 clientServiceHost.Close();70 71 if(lifecycleManager != null)72 lifecycleManager.Shutdown();73 }74 72 } 75 73 76 private Uri GetUri(string serviceName) { 77 string ipAddress = WcfSettings.GetActiveIP().ToString(); 78 string port = WcfSettings.DefaultPort.ToString(); 79 Uri uriHttp = new Uri("http://" + ipAddress + ":" + port + "/" + serviceName + "/"); 80 baseAddrDict.Add(serviceName, uriHttp); 81 return uriHttp; 74 private IDictionary<string, Uri> GetBaseAddresses() { 75 IDictionary<string, Uri> dict = new Dictionary<string, Uri>(); 76 foreach (KeyValuePair<string, ServiceHost> host in serviceHosts) { 77 foreach (var addr in host.Value.BaseAddresses) { 78 dict.Add(host.Key, addr); 79 } 80 } 81 return dict; 82 82 } 83 84 83 } 85 84 } -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server/3.3/MainForm.cs
r4302 r4305 11 11 namespace HeuristicLab.Hive.Server { 12 12 public partial class MainForm : Form { 13 public MainForm( Dictionary<string, Uri> addresses) {13 public MainForm(IDictionary<string, Uri> addresses) { 14 14 InitializeComponent(); 15 15 -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Communication/3.3/GetJobCompletedEventArgs.cs
r4254 r4305 21 21 using System; 22 22 23 namespace HeuristicLab.Hive.Slave.Communication.S erverService {23 namespace HeuristicLab.Hive.Slave.Communication.SlaveService { 24 24 public partial class GetJobCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { 25 25 -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Communication/3.3/HeuristicLab.Hive.Slave.Communication-3.3.csproj
r4302 r4305 112 112 <Compile Include="Properties\AssemblyInfo.cs" /> 113 113 <Compile Include="GetJobCompletedEventArgs.cs" /> 114 <Compile Include="Service References\S erverService\Reference.cs">114 <Compile Include="Service References\SlaveService\Reference.cs"> 115 115 <AutoGen>True</AutoGen> 116 116 <DesignTime>True</DesignTime> 117 117 <DependentUpon>Reference.svcmap</DependentUpon> 118 118 </Compile> 119 <Compile Include="Properties\Settings.Designer.cs"> 120 <AutoGen>True</AutoGen> 121 <DesignTimeSharedInput>True</DesignTimeSharedInput> 122 <DependentUpon>Settings.settings</DependentUpon> 123 </Compile> 119 124 <Compile Include="WcfService.cs" /> 120 125 </ItemGroup> … … 124 129 <None Include="Properties\AssemblyInfo.frame" /> 125 130 <None Include="Properties\DataSources\HeuristicLab.Hive.Contracts.BusinessObjects.JobDto.datasource" /> 126 <None Include="Properties\DataSources\HeuristicLab.Hive.Contracts.ResponseHeartBeat.datasource" />127 131 <None Include="Properties\DataSources\HeuristicLab.Hive.Contracts.ResponseObjects.Response.datasource" /> 128 132 <None Include="Properties\DataSources\HeuristicLab.Hive.Contracts.ResponseObjects.ResponseCalendar.datasource" /> … … 130 134 <None Include="Properties\DataSources\HeuristicLab.Hive.Contracts.ResponseObjects.ResponseResultReceived.datasource" /> 131 135 <None Include="Properties\DataSources\HeuristicLab.PluginInfrastructure.CachedHivePluginInfoDto.datasource" /> 132 <None Include="Service References\ServerService\SlaveFacade2.wsdl" /> 133 <None Include="Service References\ServerService\SlaveService.wsdl" /> 134 <None Include="Service References\ServerService\SlaveService.xsd"> 135 <SubType>Designer</SubType> 136 </None> 137 <None Include="Service References\ServerService\SlaveService1.xsd"> 138 <SubType>Designer</SubType> 139 </None> 140 <None Include="Service References\ServerService\SlaveService2.xsd"> 141 <SubType>Designer</SubType> 142 </None> 143 <None Include="Service References\ServerService\SlaveService3.xsd"> 144 <SubType>Designer</SubType> 145 </None> 146 <None Include="Service References\ServerService\SlaveService4.xsd"> 147 <SubType>Designer</SubType> 148 </None> 149 <None Include="Service References\ServerService\SlaveService5.xsd"> 150 <SubType>Designer</SubType> 151 </None> 152 <None Include="Service References\ServerService\SlaveService6.xsd"> 153 <SubType>Designer</SubType> 154 </None> 155 <None Include="Service References\ServerService\SlaveService7.xsd"> 156 <SubType>Designer</SubType> 157 </None> 158 <None Include="Service References\ServerService\SlaveService8.xsd"> 159 <SubType>Designer</SubType> 160 </None> 161 <None Include="Service References\ServerService\SlaveService9.xsd"> 162 <SubType>Designer</SubType> 136 <None Include="Service References\SlaveService\SlaveFacade.wsdl" /> 137 <None Include="Service References\SlaveService\SlaveService.wsdl" /> 138 <None Include="Service References\SlaveService\SlaveService.xsd"> 139 <SubType>Designer</SubType> 140 </None> 141 <None Include="Service References\SlaveService\SlaveService1.xsd"> 142 <SubType>Designer</SubType> 143 </None> 144 <None Include="Service References\SlaveService\SlaveService2.xsd"> 145 <SubType>Designer</SubType> 146 </None> 147 <None Include="Service References\SlaveService\SlaveService3.xsd"> 148 <SubType>Designer</SubType> 149 </None> 150 <None Include="Service References\SlaveService\SlaveService4.xsd"> 151 <SubType>Designer</SubType> 152 </None> 153 <None Include="Service References\SlaveService\SlaveService5.xsd"> 154 <SubType>Designer</SubType> 155 </None> 156 <None Include="Service References\SlaveService\SlaveService6.xsd"> 157 <SubType>Designer</SubType> 158 </None> 159 <None Include="Service References\SlaveService\SlaveService7.xsd"> 160 <SubType>Designer</SubType> 161 </None> 162 <None Include="Service References\SlaveService\SlaveService8.xsd"> 163 <SubType>Designer</SubType> 164 </None> 165 <None Include="Service References\SlaveService\SlaveService9.xsd"> 166 <SubType>Designer</SubType> 167 </None> 168 <None Include="Properties\Settings.settings"> 169 <Generator>SettingsSingleFileGenerator</Generator> 170 <LastGenOutput>Settings.Designer.cs</LastGenOutput> 163 171 </None> 164 172 </ItemGroup> … … 177 185 </ItemGroup> 178 186 <ItemGroup> 179 <WCFMetadataStorage Include="Service References\ServerService\" /> 180 </ItemGroup> 181 <ItemGroup> 182 <None Include="Service References\ServerService\configuration91.svcinfo" /> 183 </ItemGroup> 184 <ItemGroup> 185 <None Include="Service References\ServerService\configuration.svcinfo" /> 186 </ItemGroup> 187 <ItemGroup> 188 <None Include="Properties\DataSources\HeuristicLab.Hive.Contracts.Response.datasource" /> 189 <None Include="Properties\DataSources\HeuristicLab.Hive.Contracts.ResponseCalendar.datasource" /> 190 <None Include="Properties\DataSources\HeuristicLab.Hive.Contracts.ResponseHB.datasource" /> 191 <None Include="Properties\DataSources\HeuristicLab.Hive.Contracts.ResponseJob.datasource" /> 192 <None Include="Properties\DataSources\HeuristicLab.Hive.Contracts.ResponsePlugin.datasource" /> 193 <None Include="Properties\DataSources\HeuristicLab.Hive.Contracts.ResponseResultReceived.datasource" /> 194 <None Include="Properties\DataSources\HeuristicLab.Hive.Contracts.ResponseSerializedJob.datasource" /> 195 <None Include="Service References\ServerService\HeuristicLab.PluginInfrastructure.xsd" /> 196 <None Include="Service References\ServerService\Reference.svcmap"> 187 <WCFMetadataStorage Include="Service References\SlaveService\" /> 188 </ItemGroup> 189 <ItemGroup> 190 <None Include="Service References\SlaveService\SlaveService.disco" /> 191 </ItemGroup> 192 <ItemGroup> 193 <None Include="Service References\SlaveService\configuration91.svcinfo" /> 194 </ItemGroup> 195 <ItemGroup> 196 <None Include="Service References\SlaveService\configuration.svcinfo" /> 197 </ItemGroup> 198 <ItemGroup> 199 <None Include="Service References\SlaveService\Reference.svcmap"> 197 200 <Generator>WCF Proxy Generator</Generator> 198 201 <LastGenOutput>Reference.cs</LastGenOutput> 199 202 </None> 200 </ItemGroup>201 <ItemGroup>202 <None Include="Service References\ServerService\SlaveService.disco" />203 203 </ItemGroup> 204 204 <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Communication/3.3/WcfService.cs
r4302 r4305 33 33 using HeuristicLab.Hive.Contracts; 34 34 using HeuristicLab.Hive.Contracts.BusinessObjects; 35 using HeuristicLab.Hive.Slave.Communication.SlaveService; 36 using HeuristicLab.Hive.Contracts.ResponseObjects; 37 using HeuristicLab.Hive.Slave.Communication.Properties; 35 38 36 39 namespace HeuristicLab.Hive.Slave.Communication { 37 using Service = HeuristicLab.Hive.Slave.Communication.ServerService;38 using HeuristicLab.Hive.Slave.Communication.ServerService;39 using HeuristicLab.Hive.Contracts.ResponseObjects;40 40 41 41 /// <summary> … … 94 94 95 95 Logger.Debug("Registring new Events"); 96 proxy.LoginCompleted += new EventHandler<LoginCompletedEventArgs>(proxy_LoginCompleted);97 96 proxy.GetStreamedJobCompleted += new EventHandler<GetStreamedJobCompletedEventArgs>(proxy_GetStreamedJobCompleted); 98 97 proxy.StoreFinishedJobResultStreamedCompleted += new EventHandler<StoreFinishedJobResultStreamedCompletedEventArgs>(proxy_StoreFinishedJobResultStreamedCompleted); … … 101 100 Logger.Debug("Registered new Events"); 102 101 Logger.Debug("Opening the Connection"); 102 proxy.ClientCredentials.UserName.UserName = Settings.Default.HiveUsername; 103 proxy.ClientCredentials.UserName.Password = Settings.Default.HivePassword; 103 104 proxy.Open(); 104 105 Logger.Debug("Opened the Connection"); … … 122 123 123 124 private SlaveFacadeClient CreateSlaveFacadeClient() { 124 //return new SlaveFacadeClient(125 // HeuristicLab.Hive.Contracts.WcfSettings.GetStreamedBinding(),126 // new EndpointAddress("net.tcp://" + ServerIP + ":" + ServerPort + "/HiveServer/SlaveCommunicator")127 //);128 125 SlaveFacadeClient client = new SlaveFacadeClient("SlaveHttpEndpoint"); 129 126 WcfSettings.SetEndpointAddress(client.Endpoint, string.Format("http://{0}:{1}/{2}", ServerIP, ServerPort, WcfSettings.SlaveServiceName)); … … 176 173 /// Methods for the Server Login 177 174 /// </summary> 178 #region Login 179 public event System.EventHandler<LoginCompletedEventArgs> LoginCompleted; 180 public void LoginAsync(SlaveDto clientInfo) { 181 if (ConnState == NetworkEnum.WcfConnState.Connected) { 182 Logger.Debug("STARTED: Login Async"); 183 proxy.LoginAsync(clientInfo.Id); 184 } 185 } 186 private void proxy_LoginCompleted(object sender, LoginCompletedEventArgs e) { 187 if (e.Error == null) { 188 Logger.Debug("ENDED: Login Async"); 189 LoggedIn = true; 190 LoginCompleted(sender, e); 191 } else 192 HandleNetworkError(e.Error.InnerException); 193 } 194 195 public void LoginSync(SlaveDto clientInfo) { 175 public void LoginSync(SlaveDto slaveInfo) { 196 176 try { 197 177 if (ConnState == NetworkEnum.WcfConnState.Connected) { 198 178 Logger.Debug("STARTED: Login Sync"); 199 Response res = proxy.Login( clientInfo.Id);179 Response res = proxy.Login(slaveInfo); 200 180 if (res.StatusMessage != ResponseStatus.Ok) { 201 181 Logger.Error("FAILED: Login Failed! " + res.StatusMessage); … … 210 190 } 211 191 } 212 213 #endregion 214 192 215 193 /// <summary> 216 194 /// Pull a Job from the Server -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Communication/3.3/app.config
r4302 r4305 1 1 <?xml version="1.0" encoding="utf-8" ?> 2 2 <configuration> 3 <system.serviceModel> 4 <bindings> 5 <wsHttpBinding> 6 <binding name="SlaveHttpEndpoint" closeTimeout="00:01:00" openTimeout="00:01:00" 7 receiveTimeout="00:10:00" sendTimeout="00:01:00" bypassProxyOnLocal="false" 8 transactionFlow="false" hostNameComparisonMode="StrongWildcard" 9 maxBufferPoolSize="524288" maxReceivedMessageSize="65536" 10 messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" 11 allowCookies="false"> 12 <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" 13 maxBytesPerRead="4096" maxNameTableCharCount="16384" /> 14 <reliableSession ordered="true" inactivityTimeout="00:10:00" 15 enabled="false" /> 16 <security mode="Message"> 17 <transport clientCredentialType="Windows" proxyCredentialType="None" 18 realm="" /> 19 <message clientCredentialType="UserName" negotiateServiceCredential="true" 20 algorithmSuite="Default" /> 21 </security> 22 </binding> 23 <binding name="SlaveMexEndpoint" closeTimeout="00:01:00" openTimeout="00:01:00" 24 receiveTimeout="00:10:00" sendTimeout="00:01:00" bypassProxyOnLocal="false" 25 transactionFlow="false" hostNameComparisonMode="StrongWildcard" 26 maxBufferPoolSize="524288" maxReceivedMessageSize="65536" 27 messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" 28 allowCookies="false"> 29 <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" 30 maxBytesPerRead="4096" maxNameTableCharCount="16384" /> 31 <reliableSession ordered="true" inactivityTimeout="00:10:00" 32 enabled="false" /> 33 <security mode="None"> 34 <transport clientCredentialType="Windows" proxyCredentialType="None" 35 realm="" /> 36 <message clientCredentialType="Windows" negotiateServiceCredential="true" /> 37 </security> 38 </binding> 39 </wsHttpBinding> 40 </bindings> 41 <client> 42 <endpoint address="http://localhost:9000/SlaveService" binding="wsHttpBinding" 43 bindingConfiguration="SlaveHttpEndpoint" contract="ServerService.ISlaveFacade" 44 name="SlaveHttpEndpoint"> 45 <identity> 46 <certificate encodedValue="AwAAAAEAAAAUAAAAeBLH/0jWrlsW42fIC8VIIdAE6PUgAAAAAQAAAPIBAAAwggHuMIIBW6ADAgECAhDez3CoJIIitEZ5xwVqLJn6MAkGBSsOAwIdBQAwFDESMBAGA1UEAxMJbG9jYWxob3N0MB4XDTEwMDgyMzE1NTg0OFoXDTM5MTIzMTIzNTk1OVowFDESMBAGA1UEAxMJbG9jYWxob3N0MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCmOgweB6X4Ss6W2xb2hg1x61cjD2T7SO0ckkzmtqRhC2UWly9dBnonFJmg9RjN0y6l2tZhVzNhq8DgCkn3hPg5GL3XIwYX4PsXwNmeT6i+7s6rGbESuaEMvYOAQJSJ+MTgBvXCwo2g5nFHIBqP4W4aU2eybxP7H4cm1rQpoYHHjQIDAQABo0kwRzBFBgNVHQEEPjA8gBASDhO/IE7Ff7PpkCVF8oUpoRYwFDESMBAGA1UEAxMJbG9jYWxob3N0ghDez3CoJIIitEZ5xwVqLJn6MAkGBSsOAwIdBQADgYEAhxAzm3JTV7j51jti5P7izTEs7+8534kQloeAJDwlKolkd4ZMkf0BiexC2Vt1KsnxUjrK0HbbITzazkvkAmKi7dP+4G+3SrWag5lS4NcoPjTQy16T3zC9E6yafRaZp1/pxjC3Ap44qwq4Kjl2mEjeHHsdie/h4loowTqC9FlLbgo=" /> 47 </identity> 48 </endpoint> 49 <endpoint address="http://localhost:9000/SlaveService/mex" binding="wsHttpBinding" 50 bindingConfiguration="SlaveMexEndpoint" contract="ServerService.ISlaveFacade" 51 name="SlaveMexEndpoint" /> 52 </client> 53 </system.serviceModel> 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.Slave.Communication.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" /> 6 </sectionGroup> 7 </configSections> 8 <system.serviceModel> 9 <behaviors> 10 <endpointBehaviors> 11 <behavior name="SlaveServiceBehaviour"> 12 <clientCredentials> 13 <serviceCertificate> 14 <authentication certificateValidationMode="None" /> 15 </serviceCertificate> 16 </clientCredentials> 17 </behavior> 18 </endpointBehaviors> 19 </behaviors> 20 <bindings> 21 <wsHttpBinding> 22 <binding name="SlaveHttpEndpoint" closeTimeout="00:01:00" openTimeout="00:01:00" 23 receiveTimeout="00:10:00" sendTimeout="00:01:00" bypassProxyOnLocal="false" 24 transactionFlow="false" hostNameComparisonMode="StrongWildcard" 25 maxBufferPoolSize="524288" maxReceivedMessageSize="65536" 26 messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" 27 allowCookies="false"> 28 <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" 29 maxBytesPerRead="4096" maxNameTableCharCount="16384" /> 30 <reliableSession ordered="true" inactivityTimeout="00:10:00" 31 enabled="false" /> 32 <security mode="Message"> 33 <transport clientCredentialType="Windows" proxyCredentialType="None" 34 realm="" /> 35 <message clientCredentialType="UserName" negotiateServiceCredential="true" 36 algorithmSuite="Default" /> 37 </security> 38 </binding> 39 <binding name="SlaveMexEndpoint" closeTimeout="00:01:00" openTimeout="00:01:00" 40 receiveTimeout="00:10:00" sendTimeout="00:01:00" bypassProxyOnLocal="false" 41 transactionFlow="false" hostNameComparisonMode="StrongWildcard" 42 maxBufferPoolSize="524288" maxReceivedMessageSize="65536" 43 messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" 44 allowCookies="false"> 45 <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" 46 maxBytesPerRead="4096" maxNameTableCharCount="16384" /> 47 <reliableSession ordered="true" inactivityTimeout="00:10:00" 48 enabled="false" /> 49 <security mode="None"> 50 <transport clientCredentialType="Windows" proxyCredentialType="None" 51 realm="" /> 52 <message clientCredentialType="Windows" negotiateServiceCredential="true" /> 53 </security> 54 </binding> 55 </wsHttpBinding> 56 </bindings> 57 <client> 58 <endpoint address="http://localhost:9000/SlaveService" behaviorConfiguration="SlaveServiceBehaviour" binding="wsHttpBinding" 59 bindingConfiguration="SlaveHttpEndpoint" contract="SlaveService.ISlaveFacade" 60 name="SlaveHttpEndpoint"> 61 <identity> 62 <certificate encodedValue="AwAAAAEAAAAUAAAAeBLH/0jWrlsW42fIC8VIIdAE6PUgAAAAAQAAAPIBAAAwggHuMIIBW6ADAgECAhDez3CoJIIitEZ5xwVqLJn6MAkGBSsOAwIdBQAwFDESMBAGA1UEAxMJbG9jYWxob3N0MB4XDTEwMDgyMzE1NTg0OFoXDTM5MTIzMTIzNTk1OVowFDESMBAGA1UEAxMJbG9jYWxob3N0MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCmOgweB6X4Ss6W2xb2hg1x61cjD2T7SO0ckkzmtqRhC2UWly9dBnonFJmg9RjN0y6l2tZhVzNhq8DgCkn3hPg5GL3XIwYX4PsXwNmeT6i+7s6rGbESuaEMvYOAQJSJ+MTgBvXCwo2g5nFHIBqP4W4aU2eybxP7H4cm1rQpoYHHjQIDAQABo0kwRzBFBgNVHQEEPjA8gBASDhO/IE7Ff7PpkCVF8oUpoRYwFDESMBAGA1UEAxMJbG9jYWxob3N0ghDez3CoJIIitEZ5xwVqLJn6MAkGBSsOAwIdBQADgYEAhxAzm3JTV7j51jti5P7izTEs7+8534kQloeAJDwlKolkd4ZMkf0BiexC2Vt1KsnxUjrK0HbbITzazkvkAmKi7dP+4G+3SrWag5lS4NcoPjTQy16T3zC9E6yafRaZp1/pxjC3Ap44qwq4Kjl2mEjeHHsdie/h4loowTqC9FlLbgo=" /> 63 </identity> 64 </endpoint> 65 <endpoint address="http://localhost:9000/SlaveService/mex" binding="wsHttpBinding" 66 bindingConfiguration="SlaveMexEndpoint" contract="SlaveService.ISlaveFacade" 67 name="SlaveMexEndpoint" /> 68 </client> 69 </system.serviceModel> 70 <userSettings> 71 <HeuristicLab.Hive.Slave.Communication.Properties.Settings> 72 <setting name="HiveUsername" serializeAs="String"> 73 <value>hiveslave</value> 74 </setting> 75 <setting name="HivePassword" serializeAs="String"> 76 <value>hiveslave</value> 77 </setting> 78 </HeuristicLab.Hive.Slave.Communication.Properties.Settings> 79 </userSettings> 54 80 </configuration> -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Core/3.3/ConfigurationManager/ConfigManager.cs
r4267 r4305 46 46 } 47 47 48 public Core Core { get; set; } 49 private SlaveDto hardwareInfo; 48 public Core Core { get; set; } 49 private SlaveDto hardwareInfo; 50 50 51 51 /// <summary> 52 52 /// Constructor for the singleton, must recover Guid, Calendar, ... 53 53 /// </summary> 54 private ConfigManager() { 54 private ConfigManager() { 55 55 hardwareInfo = new SlaveDto(); 56 56 … … 61 61 } else 62 62 hardwareInfo.Id = Settings.Default.Guid; 63 63 64 64 hardwareInfo.NrOfCores = Environment.ProcessorCount; 65 65 hardwareInfo.Memory = 1024; … … 73 73 public SlaveDto GetClientInfo() { 74 74 hardwareInfo.Login = WcfService.Instance.ConnectedSince; 75 return hardwareInfo; 75 return hardwareInfo; 76 76 } 77 77 … … 104 104 StatusCommons st = new StatusCommons(); 105 105 st.ClientGuid = hardwareInfo.Id; 106 106 107 107 st.Status = WcfService.Instance.ConnState; 108 108 st.ConnectedSince = WcfService.Instance.ConnectedSince; … … 113 113 st.JobsAborted = SlaveStatusInfo.JobsAborted; 114 114 st.JobsDone = SlaveStatusInfo.JobsProcessed; 115 st.JobsFetched = SlaveStatusInfo.JobsFetched; 115 st.JobsFetched = SlaveStatusInfo.JobsFetched; 116 116 117 117 Dictionary<Guid, Executor> engines = Core.GetExecutionEngines(); … … 124 124 } 125 125 } 126 return st; 126 return st; 127 127 } 128 128 … … 144 144 Dictionary<Guid, JobDto> jobs = Core.GetJobs(); 145 145 int usedCores = 0; 146 lock (engines) { 146 lock (engines) { 147 147 foreach (KeyValuePair<Guid, JobDto> kvp in jobs) 148 148 usedCores += kvp.Value.CoresNeeded; -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Core/3.3/Core.cs
r4269 r4305 30 30 using HeuristicLab.Hive.Slave.Common; 31 31 using HeuristicLab.Hive.Slave.Communication; 32 using HeuristicLab.Hive.Slave.Communication.ServerService;33 32 using HeuristicLab.Hive.Slave.Core.ClientConsoleService; 34 33 using HeuristicLab.Hive.Slave.Core.ConfigurationManager; … … 36 35 using HeuristicLab.Hive.Slave.ExecutionEngine; 37 36 using HeuristicLab.Tracing; 37 using HeuristicLab.Hive.Slave.Communication.SlaveService; 38 38 39 39 namespace HeuristicLab.Hive.Slave.Core { … … 76 76 //Register all Wcf Service references 77 77 wcfService = WcfService.Instance; 78 wcfService.LoginCompleted += new EventHandler<LoginCompletedEventArgs>(wcfService_LoginCompleted);79 78 wcfService.GetJobCompleted += new EventHandler<GetJobCompletedEventArgs>(wcfService_GetJobCompleted); 80 79 wcfService.GetFinishedJobResultCompleted += new EventHandler<StoreFinishedJobResultCompletedEventArgs>(wcfService_StoreFinishedJobResultCompleted); … … 417 416 wcfService.SetCalendarStatus(ConfigManager.Instance.GetClientInfo().Id, CalendarState.NotAllowedToFetch); 418 417 } 419 beat.InterruptHeartBeatThread();420 418 } 421 419 -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive/3.3/MergeConfigs.cmd
r4302 r4305 6 6 ConfigMerger "%SolutionDir%HeuristicLab.Hive.Server.LINQDataAccess\3.3\app.config" "HeuristicLab.Hive-3.3.dll.config" 7 7 ConfigMerger "%SolutionDir%HeuristicLab.Hive.Slave.Core\3.3\app.config" "HeuristicLab.Hive-3.3.dll.config" 8 ConfigMerger "%SolutionDir%HeuristicLab.Hive.Slave.Communication\3.3\app.config" "HeuristicLab.Hive-3.3.dll.config" 8 9 ConfigMerger "%SolutionDir%HeuristicLab.Hive.Tracing\3.3\app.config" "HeuristicLab.Hive-3.3.dll.config" 9 10
Note: See TracChangeset
for help on using the changeset viewer.