Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/24/10 18:37:04 (14 years ago)
Author:
cneumuel
Message:

added streamedHttpEndpoit binding (without message-security (for now)) (#1168)

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  
    5858// [assembly: AssemblyVersion("1.0.*")]
    5959[assembly: AssemblyVersion("3.3.0.0")]
    60 [assembly: AssemblyFileVersion("3.3.0.4296")]
     60[assembly: AssemblyFileVersion("3.3.0.4302")]
  • branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive 3.3.sln

    r4302 r4305  
    7878EndProject
    7979Project("{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
    8083EndProject
    8184Project("{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  
    4040    /// </summary>
    4141    [OperationContract]
    42     Response Login(Guid slaveId);
     42    Response Login(SlaveDto slave);
    4343
    4444    [OperationContract]
  • branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/WcfSettings.cs

    r4302 r4305  
    1515    public const string ServerConsoleServiceName = "ServerConsoleService";
    1616    public const string ClientServiceName = "ClientService";
     17    public const string ClientStreamedServiceName = "ClientServiceStreamed";
    1718
    1819    public const int DefaultPort = 9000;
     
    5758    }
    5859
    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_BINDING
    65       svchost.Credentials.ServiceCertificate.SetCertificate(
    66         StoreLocation.LocalMachine,
    67         StoreName.My,
    68         X509FindType.FindBySubjectName,
    69         SERVERCERT);
    70 #endif
    71     }
     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//    }
    7273
    7374    /// <summary>
     
    7778    /// <returns></returns>
    7879    public static IPAddress GetActiveIP() {
    79       //return IPAddress.Parse("127.0.0.1");
    8080      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];
    9081    }
    9182
     
    10697      endpoint.Address = builder.ToEndpointAddress();
    10798    }
     99
    108100  }
    109101
  • branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment.Views/3.3/HiveExperimentView.Designer.cs

    r4173 r4305  
    6464      this.executionTimeTextBox = new System.Windows.Forms.TextBox();
    6565      this.pauseButton = new System.Windows.Forms.Button();
    66       this.ServerUrlLabel = new System.Windows.Forms.Label();
     66      this.ServerIpLabel = new System.Windows.Forms.Label();
    6767      this.resourceIdsLabel = new System.Windows.Forms.Label();
    68       this.serverUrlTextBox = new System.Windows.Forms.TextBox();
     68      this.serverIpTextBox = new System.Windows.Forms.TextBox();
    6969      this.resourceIdsTextBox = new System.Windows.Forms.TextBox();
    7070      this.disconnectButton = new System.Windows.Forms.Button();
     
    304304      // ServerUrlLabel
    305305      //
    306       this.ServerUrlLabel.AutoSize = true;
    307       this.ServerUrlLabel.Location = new System.Drawing.Point(1, 53);
    308       this.ServerUrlLabel.Name = "ServerUrlLabel";
    309       this.ServerUrlLabel.Size = new System.Drawing.Size(51, 13);
    310       this.ServerUrlLabel.TabIndex = 11;
    311       this.ServerUrlLabel.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";
    312312      //
    313313      // resourceIdsLabel
     
    322322      // serverUrlTextBox
    323323      //
    324       this.serverUrlTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    325                   | System.Windows.Forms.AnchorStyles.Right)));
    326       this.serverUrlTextBox.Location = new System.Drawing.Point(72, 50);
    327       this.serverUrlTextBox.Name = "serverUrlTextBox";
    328       this.serverUrlTextBox.Size = new System.Drawing.Size(663, 20);
    329       this.serverUrlTextBox.TabIndex = 13;
    330       this.serverUrlTextBox.Validating += new System.ComponentModel.CancelEventHandler(this.serverUrlTextBox_Validating);
    331       this.serverUrlTextBox.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);
    332332      //
    333333      // resourceIdsTextBox
     
    372372      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
    373373      this.Controls.Add(this.resourceIdsTextBox);
    374       this.Controls.Add(this.serverUrlTextBox);
     374      this.Controls.Add(this.serverIpTextBox);
    375375      this.Controls.Add(this.resourceIdsLabel);
    376376      this.Controls.Add(this.tabControl);
     
    379379      this.Controls.Add(this.executionTimeTextBox);
    380380      this.Controls.Add(this.executionTimeLabel);
    381       this.Controls.Add(this.ServerUrlLabel);
     381      this.Controls.Add(this.ServerIpLabel);
    382382      this.Controls.Add(this.pauseButton);
    383383      this.Controls.Add(this.stopButton);
     
    390390      this.Controls.SetChildIndex(this.stopButton, 0);
    391391      this.Controls.SetChildIndex(this.pauseButton, 0);
    392       this.Controls.SetChildIndex(this.ServerUrlLabel, 0);
     392      this.Controls.SetChildIndex(this.ServerIpLabel, 0);
    393393      this.Controls.SetChildIndex(this.executionTimeLabel, 0);
    394394      this.Controls.SetChildIndex(this.executionTimeTextBox, 0);
     
    397397      this.Controls.SetChildIndex(this.tabControl, 0);
    398398      this.Controls.SetChildIndex(this.resourceIdsLabel, 0);
    399       this.Controls.SetChildIndex(this.serverUrlTextBox, 0);
     399      this.Controls.SetChildIndex(this.serverIpTextBox, 0);
    400400      this.Controls.SetChildIndex(this.resourceIdsTextBox, 0);
    401401      this.Controls.SetChildIndex(this.nameLabel, 0);
     
    424424    private System.Windows.Forms.Button pauseButton;
    425425    private System.Windows.Forms.TabPage hiveStatusTabPage;
    426     private System.Windows.Forms.Label ServerUrlLabel;
     426    private System.Windows.Forms.Label ServerIpLabel;
    427427    private System.Windows.Forms.Label resourceIdsLabel;
    428     private System.Windows.Forms.TextBox serverUrlTextBox;
     428    private System.Windows.Forms.TextBox serverIpTextBox;
    429429    private System.Windows.Forms.TextBox resourceIdsTextBox;
    430430    private System.Windows.Forms.Button viewExperimentButton;
  • branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment.Views/3.3/HiveExperimentView.cs

    r4170 r4305  
    2929using HeuristicLab.Optimization;
    3030using HeuristicLab.Optimization.Views;
     31using HeuristicLab.Hive.Experiment.Properties;
    3132
    3233namespace HeuristicLab.Hive.Experiment.Views {
     
    8283        executionTimeTextBox.Text = Content.ExecutionTime.ToString();
    8384        resourceIdsTextBox.Text = Content.ResourceIds;
    84         serverUrlTextBox.Text = Content.ServerUrl;
     85        serverIpTextBox.Text = Settings.Default.HiveServerIp;
    8586        experimentNamedItemView.Content = Content.Experiment;
    8687        logView.Content = Content.Log;
     
    193194
    194195    private void serverUrlTextBox_Validating(object sender, System.ComponentModel.CancelEventArgs e) {
    195       if (string.IsNullOrEmpty(serverUrlTextBox.Text)) {
     196      if (string.IsNullOrEmpty(serverIpTextBox.Text)) {
    196197        e.Cancel = true;
    197         errorProvider.SetError(serverUrlTextBox, "ServerUrl cannot be empty");
    198         serverUrlTextBox.SelectAll();
     198        errorProvider.SetError(serverIpTextBox, "ServerUrl cannot be empty");
     199        serverIpTextBox.SelectAll();
    199200        return;
    200201      }
    201       Content.ServerUrl = serverUrlTextBox.Text;
     202      Settings.Default.HiveServerIp = serverIpTextBox.Text;
    202203    }
    203204
    204205    private void serverUrlTextBox_Validated(object sender, EventArgs e) {
    205       errorProvider.SetError(serverUrlTextBox, string.Empty);
     206      errorProvider.SetError(serverIpTextBox, string.Empty);
    206207    }
    207208
  • branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment/3.3/HeuristicLab.Hive.Experiment-3.3.csproj

    r4296 r4305  
    8585    <Reference Include="System.Core" />
    8686    <Reference Include="System.Drawing" />
     87    <Reference Include="System.Runtime.Serialization" />
    8788    <Reference Include="System.ServiceModel" />
    8889    <Reference Include="System.Xml.Linq" />
     
    104105    </Compile>
    105106    <Compile Include="ServiceLocator.cs" />
    106     <Compile Include="Settings.cs" />
    107107  </ItemGroup>
    108108  <ItemGroup>
     
    113113    <None Include="Properties\AssemblyInfo.frame" />
    114114    <None Include="Properties\Settings.settings">
    115       <Generator>SettingsSingleFileGenerator</Generator>
     115      <Generator>PublicSettingsSingleFileGenerator</Generator>
    116116      <LastGenOutput>Settings.Designer.cs</LastGenOutput>
    117117    </None>
     118    <None Include="Tools\RecreateServiceConfig.bat" />
    118119  </ItemGroup>
    119120  <ItemGroup>
     
    130131      <Name>HeuristicLab.Hive.JobBase-3.3</Name>
    131132    </ProjectReference>
     133  </ItemGroup>
     134  <ItemGroup>
     135    <WCFMetadata Include="Service References\" />
    132136  </ItemGroup>
    133137  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
  • branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment/3.3/HiveExperiment.cs

    r4302 r4305  
    4343using System.ServiceModel;
    4444using HeuristicLab.Hive.Contracts.ResponseObjects;
     45using HeuristicLab.Hive.Experiment.Properties;
    4546
    4647namespace HeuristicLab.Hive.Experiment {
     
    9091      }
    9192    }
    92    
     93
    9394    #region Storable Properties
    9495    [Storable]
     
    114115    public JobItemList JobItems {
    115116      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       }
    129117    }
    130118
     
    191179    public HiveExperiment()
    192180      : base(itemName, itemDescription) {
    193       this.ServerUrl = HeuristicLab.Hive.Experiment.Properties.Settings.Default.HiveServerUrl;
    194181      this.ResourceIds = HeuristicLab.Hive.Experiment.Properties.Settings.Default.ResourceIds;
    195182      this.log = new Log();
     
    205192      HiveExperiment clone = (HiveExperiment)base.Clone(cloner);
    206193      clone.resourceIds = this.resourceIds;
    207       clone.serverUrl = this.serverUrl;
    208194      clone.experiment = (HeuristicLab.Optimization.Experiment)cloner.Clone(experiment);
    209195      clone.executionState = this.executionState;
     
    279265
    280266      Thread t = new Thread(() => {
    281         IClientFacade clientFacade = GetClientFacade();
     267        IClientFacade clientFacade = CreateStreamedClientFacade();
    282268
    283269        try {
     
    307293            LogMessage(jobItem.JobDto.Id, "Job sent to Hive");
    308294          }
    309         } catch (Exception e) {
     295        }
     296        catch (Exception e) {
    310297          LogMessage("Error: Starting HiveExperiment failed: " + e.Message);
    311298          this.ExecutionState = Core.ExecutionState.Stopped;
     
    468455    private void FetchAndUpdateJob(Guid jobId) {
    469456      LogMessage(jobId, "FetchAndUpdateJob started");
    470       IClientFacade clientFacade = GetClientFacade();
     457      IClientFacade clientFacade = CreateStreamedClientFacade();
    471458      IOptimizer originalOptimizer;
    472459      lock (pendingOptimizersByJobId) {
     
    490477
    491478    public void AbortJob(Guid jobId) {
    492       IClientFacade clientFacade = GetClientFacade();
     479      IClientFacade clientFacade = CreateClientFacade();
    493480      Response response = clientFacade.AbortJob(jobId);
    494481      LogMessage(jobId, "Aborting Job: " + response.StatusMessage);
     
    554541        try {
    555542          do {
    556             IClientFacade clientFacade = GetClientFacade();
     543            IClientFacade clientFacade = CreateStreamedClientFacade();
    557544            IEnumerable<Guid> jobIdsToQuery = from job in JobItems
    558545                                              where job.State != JobState.Finished &&
     
    571558                  throw new Exception(response.StatusMessage.ToString());
    572559                }
    573               } catch (Exception e) {
     560              }
     561              catch (Exception e) {
    574562                LogMessage("Polling results failed: " + e.Message);
    575563              }
     
    582570            }
    583571          } while (!this.stopResultsPollingPending);
    584         } catch (ThreadInterruptedException exception) {
     572        }
     573        catch (ThreadInterruptedException exception) {
    585574          // thread has been interuppted
    586         } finally {
     575        }
     576        finally {
    587577          this.IsPollingResults = false;
    588578        }
     
    601591    public void RequestSnapshot(Guid jobId) {
    602592      Thread t = new Thread(() => {
    603         IClientFacade clientFacade = GetClientFacade();
     593        IClientFacade clientFacade = CreateStreamedClientFacade();
    604594        ResponseObject<SerializedJob> response;
    605595        int retryCount = 0;
     
    876866
    877867    #region Helper Functions
    878     private IClientFacade GetClientFacade() {
     868    private IClientFacade CreateClientFacade() {
    879869      IClientFacade clientFacade = null;
    880870      do {
    881871        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
    883874        } catch (EndpointNotFoundException exception) {
    884875          LogMessage("Could not connect to Server: " + exception.Message + ". Will try again in " + (resultPollingIntervalMs / 1000) + " sec.");
     
    889880    }
    890881
     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    }
    891895
    892896    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  
    1414    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
    1515    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
    16     internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
     16    public sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
    1717       
    1818        private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
     
    2121            get {
    2222                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;
    3523            }
    3624        }
     
    4735            }
    4836        }
     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        }
    4985    }
    5086}
  • branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment/3.3/Properties/Settings.settings

    r4116 r4305  
    33  <Profiles />
    44  <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>
    85    <Setting Name="ResourceIds" Type="System.String" Scope="User">
    96      <Value Profile="(Default)">MyGroup</Value>
    107    </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>
    1120  </Settings>
    1221</SettingsFile>
  • branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment/3.3/ServiceLocator.cs

    r4302 r4305  
    2727using System.ServiceModel;
    2828using HeuristicLab.Hive.Contracts;
     29using HeuristicLab.Hive.Experiment.Properties;
    2930
    3031namespace HeuristicLab.Hive.Experiment {
    3132  internal class ServiceLocator {
    3233    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;
    3753    }
    3854  }
  • branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment/3.3/app.config

    r4170 r4305  
    88  <userSettings>
    99    <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>
    1310      <setting name="ResourceIds" serializeAs="String">
    1411        <value>MyGroup</value>
    1512      </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>
    1625    </HeuristicLab.Hive.Experiment.Properties.Settings>
    1726  </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>
    18111</configuration>
  • branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Console/3.3/Tools

    • Property svn:ignore set to
      ServerConsoleFacade.cs
  • branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Console/3.3/Tools/RecreateServiceConfig.bat

    r4302 r4305  
    44SvcUtil.exe ^
    55      /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  
    5151    [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Administrator)]
    5252    [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Slave)]
    53     public Response Login(Guid slaveId) {
     53    public Response Login(SlaveDto slave) {
    5454      using (contextFactory.GetContext()) {
    55         return slaveCommunicator.Login(slaveId);
     55        return slaveCommunicator.Login(slave);
    5656      }
    5757    }
  • branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/SlaveCommunicator.cs

    r4289 r4305  
    176176    /// <param name="slaveInfo"></param>
    177177    /// <returns></returns>
    178     public Response Login(Guid slaveId) {
     178    public Response Login(SlaveDto slave) {
    179179      Response response = new Response();
    180180
    181181      heartbeatLock.EnterWriteLock();
    182       if (lastHeartbeats.ContainsKey(slaveId)) {
    183         lastHeartbeats[slaveId] = DateTime.Now;
     182      if (lastHeartbeats.ContainsKey(slave.Id)) {
     183        lastHeartbeats[slave.Id] = DateTime.Now;
    184184      } else {
    185         lastHeartbeats.Add(slaveId, DateTime.Now);
     185        lastHeartbeats.Add(slave.Id, DateTime.Now);
    186186      }
    187187      heartbeatLock.ExitWriteLock();
    188188
    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;
    195193
    196194      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      }
    200199
    201200      return response;
  • branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/app.config

    r4302 r4305  
    2828   
    2929    <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>
    3142      <wsHttpBinding>
    3243        <binding name="HttpBinding">
    3344          <security>
     45            <transport>
     46              <extendedProtectionPolicy policyEnforcement="Never" />
     47            </transport>
    3448            <message clientCredentialType="UserName" />
    3549          </security>
     
    8599        <endpoint address="mex" binding="mexHttpBinding" name="ClientMexEndpoint"
    86100          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" />
    87104        <host>
    88105          <baseAddresses>
     
    92109      </service>
    93110    </services>
     111   
    94112  </system.serviceModel>
    95113 
  • branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.LINQDataAccess/3.3

    • Property svn:ignore
      •  

        old new  
        11bin
        22obj
         3HeuristicLab.Hive.Server.LINQDataAccess-3.3.csproj.user
  • branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server/3.3/HeuristicLabHiveServerApplication.cs

    r4302 r4305  
    3535  [Application("Hive Server", "Server application for the distributed hive engine.", false)]
    3636  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;
    3840
    3941    public override void Run() {
    40       ILifecycleManager lifecycleManager = null;
    41       ServiceHost slaveServiceHost = null;
    42       ServiceHost serverConsoleServiceHost = null;
    43       ServiceHost clientServiceHost = null;
    4442      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);
    5346
    5447        lifecycleManager = ServiceLocator.GetLifecycleManager();
    5548        lifecycleManager.Init();
    5649
    57         Form mainForm = new MainForm(baseAddrDict);
     50        Form mainForm = new MainForm(GetBaseAddresses());
    5851        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;
    5968      }
    6069      catch (AddressAccessDeniedException ex) {
    6170        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);
    6271      }
    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       }
    7472    }
    7573
    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;
    8282    }
    83 
    8483  }
    8584}
  • branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server/3.3/MainForm.cs

    r4302 r4305  
    1111namespace HeuristicLab.Hive.Server {
    1212  public partial class MainForm : Form {
    13     public MainForm(Dictionary<string, Uri> addresses) {
     13    public MainForm(IDictionary<string, Uri> addresses) {
    1414      InitializeComponent();
    1515
  • branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Communication/3.3/GetJobCompletedEventArgs.cs

    r4254 r4305  
    2121using System;
    2222
    23 namespace HeuristicLab.Hive.Slave.Communication.ServerService {
     23namespace HeuristicLab.Hive.Slave.Communication.SlaveService {
    2424  public partial class GetJobCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
    2525
  • branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Communication/3.3/HeuristicLab.Hive.Slave.Communication-3.3.csproj

    r4302 r4305  
    112112    <Compile Include="Properties\AssemblyInfo.cs" />
    113113    <Compile Include="GetJobCompletedEventArgs.cs" />
    114     <Compile Include="Service References\ServerService\Reference.cs">
     114    <Compile Include="Service References\SlaveService\Reference.cs">
    115115      <AutoGen>True</AutoGen>
    116116      <DesignTime>True</DesignTime>
    117117      <DependentUpon>Reference.svcmap</DependentUpon>
    118118    </Compile>
     119    <Compile Include="Properties\Settings.Designer.cs">
     120      <AutoGen>True</AutoGen>
     121      <DesignTimeSharedInput>True</DesignTimeSharedInput>
     122      <DependentUpon>Settings.settings</DependentUpon>
     123    </Compile>
    119124    <Compile Include="WcfService.cs" />
    120125  </ItemGroup>
     
    124129    <None Include="Properties\AssemblyInfo.frame" />
    125130    <None Include="Properties\DataSources\HeuristicLab.Hive.Contracts.BusinessObjects.JobDto.datasource" />
    126     <None Include="Properties\DataSources\HeuristicLab.Hive.Contracts.ResponseHeartBeat.datasource" />
    127131    <None Include="Properties\DataSources\HeuristicLab.Hive.Contracts.ResponseObjects.Response.datasource" />
    128132    <None Include="Properties\DataSources\HeuristicLab.Hive.Contracts.ResponseObjects.ResponseCalendar.datasource" />
     
    130134    <None Include="Properties\DataSources\HeuristicLab.Hive.Contracts.ResponseObjects.ResponseResultReceived.datasource" />
    131135    <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>
    163171    </None>
    164172  </ItemGroup>
     
    177185  </ItemGroup>
    178186  <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">
    197200      <Generator>WCF Proxy Generator</Generator>
    198201      <LastGenOutput>Reference.cs</LastGenOutput>
    199202    </None>
    200   </ItemGroup>
    201   <ItemGroup>
    202     <None Include="Service References\ServerService\SlaveService.disco" />
    203203  </ItemGroup>
    204204  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
  • branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Communication/3.3/WcfService.cs

    r4302 r4305  
    3333using HeuristicLab.Hive.Contracts;
    3434using HeuristicLab.Hive.Contracts.BusinessObjects;
     35using HeuristicLab.Hive.Slave.Communication.SlaveService;
     36using HeuristicLab.Hive.Contracts.ResponseObjects;
     37using HeuristicLab.Hive.Slave.Communication.Properties;
    3538
    3639namespace 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;
    4040
    4141  /// <summary>
     
    9494
    9595        Logger.Debug("Registring new Events");
    96         proxy.LoginCompleted += new EventHandler<LoginCompletedEventArgs>(proxy_LoginCompleted);
    9796        proxy.GetStreamedJobCompleted += new EventHandler<GetStreamedJobCompletedEventArgs>(proxy_GetStreamedJobCompleted);
    9897        proxy.StoreFinishedJobResultStreamedCompleted += new EventHandler<StoreFinishedJobResultStreamedCompletedEventArgs>(proxy_StoreFinishedJobResultStreamedCompleted);
     
    101100        Logger.Debug("Registered new Events");
    102101        Logger.Debug("Opening the Connection");
     102        proxy.ClientCredentials.UserName.UserName = Settings.Default.HiveUsername;
     103        proxy.ClientCredentials.UserName.Password = Settings.Default.HivePassword;
    103104        proxy.Open();
    104105        Logger.Debug("Opened the Connection");
     
    122123
    123124    private SlaveFacadeClient CreateSlaveFacadeClient() {
    124       //return new SlaveFacadeClient(
    125       //  HeuristicLab.Hive.Contracts.WcfSettings.GetStreamedBinding(),
    126       //  new EndpointAddress("net.tcp://" + ServerIP + ":" + ServerPort + "/HiveServer/SlaveCommunicator")
    127       //);
    128125      SlaveFacadeClient client = new SlaveFacadeClient("SlaveHttpEndpoint");
    129126      WcfSettings.SetEndpointAddress(client.Endpoint, string.Format("http://{0}:{1}/{2}", ServerIP, ServerPort, WcfSettings.SlaveServiceName));
     
    176173    /// Methods for the Server Login
    177174    /// </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) {
    196176      try {
    197177        if (ConnState == NetworkEnum.WcfConnState.Connected) {
    198178          Logger.Debug("STARTED: Login Sync");
    199           Response res = proxy.Login(clientInfo.Id);
     179          Response res = proxy.Login(slaveInfo);
    200180          if (res.StatusMessage != ResponseStatus.Ok) {
    201181            Logger.Error("FAILED: Login Failed! " + res.StatusMessage);
     
    210190      }
    211191    }
    212 
    213     #endregion
    214 
     192   
    215193    /// <summary>
    216194    /// Pull a Job from the Server
  • branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Communication/3.3/app.config

    r4302 r4305  
    11<?xml version="1.0" encoding="utf-8" ?>
    22<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>
    5480</configuration>
  • branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Core/3.3/ConfigurationManager/ConfigManager.cs

    r4267 r4305  
    4646    }
    4747
    48     public Core Core { get; set; }   
    49     private SlaveDto hardwareInfo;       
     48    public Core Core { get; set; }
     49    private SlaveDto hardwareInfo;
    5050
    5151    /// <summary>
    5252    /// Constructor for the singleton, must recover Guid, Calendar, ...
    5353    /// </summary>
    54     private ConfigManager() {     
     54    private ConfigManager() {
    5555      hardwareInfo = new SlaveDto();
    5656
     
    6161      } else
    6262        hardwareInfo.Id = Settings.Default.Guid;
    63      
     63
    6464      hardwareInfo.NrOfCores = Environment.ProcessorCount;
    6565      hardwareInfo.Memory = 1024;
     
    7373    public SlaveDto GetClientInfo() {
    7474      hardwareInfo.Login = WcfService.Instance.ConnectedSince;
    75       return hardwareInfo;         
     75      return hardwareInfo;
    7676    }
    7777
     
    104104      StatusCommons st = new StatusCommons();
    105105      st.ClientGuid = hardwareInfo.Id;
    106      
     106
    107107      st.Status = WcfService.Instance.ConnState;
    108108      st.ConnectedSince = WcfService.Instance.ConnectedSince;
     
    113113      st.JobsAborted = SlaveStatusInfo.JobsAborted;
    114114      st.JobsDone = SlaveStatusInfo.JobsProcessed;
    115       st.JobsFetched = SlaveStatusInfo.JobsFetched;     
     115      st.JobsFetched = SlaveStatusInfo.JobsFetched;
    116116
    117117      Dictionary<Guid, Executor> engines = Core.GetExecutionEngines();
     
    124124        }
    125125      }
    126       return st;     
     126      return st;
    127127    }
    128128
     
    144144      Dictionary<Guid, JobDto> jobs = Core.GetJobs();
    145145      int usedCores = 0;
    146       lock (engines) {       
     146      lock (engines) {
    147147        foreach (KeyValuePair<Guid, JobDto> kvp in jobs)
    148148          usedCores += kvp.Value.CoresNeeded;
  • branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Core/3.3/Core.cs

    r4269 r4305  
    3030using HeuristicLab.Hive.Slave.Common;
    3131using HeuristicLab.Hive.Slave.Communication;
    32 using HeuristicLab.Hive.Slave.Communication.ServerService;
    3332using HeuristicLab.Hive.Slave.Core.ClientConsoleService;
    3433using HeuristicLab.Hive.Slave.Core.ConfigurationManager;
     
    3635using HeuristicLab.Hive.Slave.ExecutionEngine;
    3736using HeuristicLab.Tracing;
     37using HeuristicLab.Hive.Slave.Communication.SlaveService;
    3838
    3939namespace HeuristicLab.Hive.Slave.Core {
     
    7676      //Register all Wcf Service references
    7777      wcfService = WcfService.Instance;
    78       wcfService.LoginCompleted += new EventHandler<LoginCompletedEventArgs>(wcfService_LoginCompleted);
    7978      wcfService.GetJobCompleted += new EventHandler<GetJobCompletedEventArgs>(wcfService_GetJobCompleted);
    8079      wcfService.GetFinishedJobResultCompleted += new EventHandler<StoreFinishedJobResultCompletedEventArgs>(wcfService_StoreFinishedJobResultCompleted);
     
    417416        wcfService.SetCalendarStatus(ConfigManager.Instance.GetClientInfo().Id, CalendarState.NotAllowedToFetch);
    418417      }
    419       beat.InterruptHeartBeatThread();
    420418    }
    421419
  • branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive/3.3/MergeConfigs.cmd

    r4302 r4305  
    66ConfigMerger "%SolutionDir%HeuristicLab.Hive.Server.LINQDataAccess\3.3\app.config" "HeuristicLab.Hive-3.3.dll.config"
    77ConfigMerger "%SolutionDir%HeuristicLab.Hive.Slave.Core\3.3\app.config" "HeuristicLab.Hive-3.3.dll.config"
     8ConfigMerger "%SolutionDir%HeuristicLab.Hive.Slave.Communication\3.3\app.config" "HeuristicLab.Hive-3.3.dll.config"
    89ConfigMerger "%SolutionDir%HeuristicLab.Hive.Tracing\3.3\app.config" "HeuristicLab.Hive-3.3.dll.config"
    910
Note: See TracChangeset for help on using the changeset viewer.