Free cookie consent management tool by TermsFeed Policy Generator

Changeset 9665


Ignore:
Timestamp:
06/28/13 12:05:53 (11 years ago)
Author:
ascheibe
Message:

#2030 merged hive performance branch back into trunk

Location:
trunk/sources
Files:
27 edited
4 copied

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Clients.Hive.Slave.ConsoleClient/3.3/app.config

    r8957 r9665  
    2929        </binding>
    3030      </wsHttpBinding>
     31      <netTcpBinding>
     32        <binding name="netTcpBinding_Hive" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:20:00" sendTimeout="00:20:00" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647">
     33          <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
     34          <reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false" />
     35          <security mode="TransportWithMessageCredential">
     36            <transport clientCredentialType="Windows" />
     37            <message clientCredentialType="UserName" algorithmSuite="Default" />
     38          </security>
     39        </binding>
     40      </netTcpBinding>
    3141    </bindings>
    3242   
     
    3949   <client>
    4050     <endpoint name="SlaveCommunicationServiceEndpoint" address="net.pipe://localhost/HeuristicLabSlaveCom" binding="netNamedPipeBinding" contract="HeuristicLab.Clients.Hive.SlaveCore.ServiceContracts.ISlaveCommunication"/>
    41     <endpoint address="http://services.heuristiclab.com/Hive-3.3/HiveService.svc"
    42               binding="wsHttpBinding"
    43               bindingConfiguration="wsHttpBinding_Hive"
    44               contract="HeuristicLab.Clients.Hive.IHiveService"
    45               name="wsHttpBinding_IHiveService" behaviorConfiguration="HiveBehaviorConfiguration">
     51    <endpoint address="http://services.heuristiclab.com/Hive-3.3/HiveService.svc" binding="wsHttpBinding" bindingConfiguration="wsHttpBinding_Hive" contract="HeuristicLab.Clients.Hive.IHiveService" name="wsHttpBinding_IHiveService" behaviorConfiguration="HiveBehaviorConfiguration">
    4652      <identity>
    4753        <certificate encodedValue="AwAAAAEAAAAUAAAAwK1+2oAmcy/mI2P2QjyiJRh0y60gAAAAAQAAACoCAAAwggImMIIBj6ADAgECAhAIkseQ2EEhgU720qJA61gqMA0GCSqGSIb3DQEBBAUAMCQxIjAgBgNVBAMTGXNlcnZpY2VzLmhldXJpc3RpY2xhYi5jb20wHhcNMTAwNTExMTExNDAyWhcNMzkxMjMxMjM1OTU5WjAkMSIwIAYDVQQDExlzZXJ2aWNlcy5oZXVyaXN0aWNsYWIuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCq26Bwmwc7k+4W30qLQ2j+FInEL5BuH6opDY6CSlrtt3xQS/anrhvpbf3QghLDVINzcHkzbPmm/SguG4F85QLB6xO+tJaOvRo0iEK5g3c307vMIru7FJwk/OhplEQ5J1hbDgL3zOJlrWlgtqRVxCtVdF3XroI9BctOt1NkeKv9ewIDAQABo1kwVzBVBgNVHQEETjBMgBCjbgdYd4j5JgUuJ1Wo/GxroSYwJDEiMCAGA1UEAxMZc2VydmljZXMuaGV1cmlzdGljbGFiLmNvbYIQCJLHkNhBIYFO9tKiQOtYKjANBgkqhkiG9w0BAQQFAAOBgQAb/2xk2uQad68shSPl/uixWgvFI8WkxOTBopOLaLtDxwCeZ3mWVHdV9VnixHtThubnEBXAhYOCQSIXWtQuXFWO+gH3YyjTRJY5kTmXyuvBRTn3/so5SrQ7Rdlm9hf6E5YVX3tCjAy7ybUyaDUkQfmH5vmvgvpMzRfsJ1qhnUpJiQ==" />
    4854      </identity>
    4955    </endpoint>
     56     <endpoint address="net.tcp://services.heuristiclab.com/Hive-3.3/HiveService.svc" binding="netTcpBinding" bindingConfiguration="netTcpBinding_Hive" contract="HeuristicLab.Clients.Hive.IHiveService" name="netTcpBinding_IHiveService" behaviorConfiguration="HiveBehaviorConfiguration">
     57       <identity>
     58         <certificate encodedValue="AwAAAAEAAAAUAAAAwK1+2oAmcy/mI2P2QjyiJRh0y60gAAAAAQAAACoCAAAwggImMIIBj6ADAgECAhAIkseQ2EEhgU720qJA61gqMA0GCSqGSIb3DQEBBAUAMCQxIjAgBgNVBAMTGXNlcnZpY2VzLmhldXJpc3RpY2xhYi5jb20wHhcNMTAwNTExMTExNDAyWhcNMzkxMjMxMjM1OTU5WjAkMSIwIAYDVQQDExlzZXJ2aWNlcy5oZXVyaXN0aWNsYWIuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCq26Bwmwc7k+4W30qLQ2j+FInEL5BuH6opDY6CSlrtt3xQS/anrhvpbf3QghLDVINzcHkzbPmm/SguG4F85QLB6xO+tJaOvRo0iEK5g3c307vMIru7FJwk/OhplEQ5J1hbDgL3zOJlrWlgtqRVxCtVdF3XroI9BctOt1NkeKv9ewIDAQABo1kwVzBVBgNVHQEETjBMgBCjbgdYd4j5JgUuJ1Wo/GxroSYwJDEiMCAGA1UEAxMZc2VydmljZXMuaGV1cmlzdGljbGFiLmNvbYIQCJLHkNhBIYFO9tKiQOtYKjANBgkqhkiG9w0BAQQFAAOBgQAb/2xk2uQad68shSPl/uixWgvFI8WkxOTBopOLaLtDxwCeZ3mWVHdV9VnixHtThubnEBXAhYOCQSIXWtQuXFWO+gH3YyjTRJY5kTmXyuvBRTn3/so5SrQ7Rdlm9hf6E5YVX3tCjAy7ybUyaDUkQfmH5vmvgvpMzRfsJ1qhnUpJiQ==" />
     59       </identity>
     60     </endpoint>
    5061   </client>
    5162   
  • trunk/sources/HeuristicLab.Clients.Hive.Slave.WindowsService/3.3/app.config

    r8957 r9665  
    3232    <client>
    3333      <endpoint name="SlaveCommunicationServiceEndpoint" address="net.pipe://localhost/HeuristicLabSlaveCom" binding="netNamedPipeBinding" contract="HeuristicLab.Clients.Hive.SlaveCore.ServiceContracts.ISlaveCommunication"/>
    34       <endpoint address="http://services.heuristiclab.com/Hive-3.3/HiveService.svc"
    35                 binding="wsHttpBinding"
    36                 bindingConfiguration="wsHttpBinding_Hive"
    37                 contract="HeuristicLab.Clients.Hive.IHiveService"
    38                 name="wsHttpBinding_IHiveService">
     34      <endpoint address="http://services.heuristiclab.com/Hive-3.3/HiveService.svc" binding="wsHttpBinding" bindingConfiguration="wsHttpBinding_Hive" contract="HeuristicLab.Clients.Hive.IHiveService" name="wsHttpBinding_IHiveService">
    3935        <identity>
    4036          <certificate encodedValue="AwAAAAEAAAAUAAAAwK1+2oAmcy/mI2P2QjyiJRh0y60gAAAAAQAAACoCAAAwggImMIIBj6ADAgECAhAIkseQ2EEhgU720qJA61gqMA0GCSqGSIb3DQEBBAUAMCQxIjAgBgNVBAMTGXNlcnZpY2VzLmhldXJpc3RpY2xhYi5jb20wHhcNMTAwNTExMTExNDAyWhcNMzkxMjMxMjM1OTU5WjAkMSIwIAYDVQQDExlzZXJ2aWNlcy5oZXVyaXN0aWNsYWIuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCq26Bwmwc7k+4W30qLQ2j+FInEL5BuH6opDY6CSlrtt3xQS/anrhvpbf3QghLDVINzcHkzbPmm/SguG4F85QLB6xO+tJaOvRo0iEK5g3c307vMIru7FJwk/OhplEQ5J1hbDgL3zOJlrWlgtqRVxCtVdF3XroI9BctOt1NkeKv9ewIDAQABo1kwVzBVBgNVHQEETjBMgBCjbgdYd4j5JgUuJ1Wo/GxroSYwJDEiMCAGA1UEAxMZc2VydmljZXMuaGV1cmlzdGljbGFiLmNvbYIQCJLHkNhBIYFO9tKiQOtYKjANBgkqhkiG9w0BAQQFAAOBgQAb/2xk2uQad68shSPl/uixWgvFI8WkxOTBopOLaLtDxwCeZ3mWVHdV9VnixHtThubnEBXAhYOCQSIXWtQuXFWO+gH3YyjTRJY5kTmXyuvBRTn3/so5SrQ7Rdlm9hf6E5YVX3tCjAy7ybUyaDUkQfmH5vmvgvpMzRfsJ1qhnUpJiQ==" />
  • trunk/sources/HeuristicLab.Clients.Hive.Slave/3.3/app.config

    r8957 r9665  
    3333        </binding>
    3434      </wsHttpBinding>
     35      <netTcpBinding>
     36        <binding name="netTcpBinding_Hive" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:20:00" sendTimeout="00:20:00" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647">
     37          <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
     38          <reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false" />
     39          <security mode="TransportWithMessageCredential">
     40            <transport clientCredentialType="Windows" />
     41            <message clientCredentialType="UserName" algorithmSuite="Default" />
     42          </security>
     43        </binding>
     44      </netTcpBinding>
    3545    </bindings>
    3646    <services>
     
    4656        </identity>
    4757      </endpoint>
     58      <endpoint address="net.tcp://services.heuristiclab.com/Hive-3.3/HiveService.svc" binding="netTcpBinding" bindingConfiguration="netTcpBinding_Hive" contract="HeuristicLab.Clients.Hive.IHiveService" name="netTcpBinding_IHiveService" behaviorConfiguration="HiveBehaviorConfiguration">
     59        <identity>
     60          <certificate encodedValue="AwAAAAEAAAAUAAAAwK1+2oAmcy/mI2P2QjyiJRh0y60gAAAAAQAAACoCAAAwggImMIIBj6ADAgECAhAIkseQ2EEhgU720qJA61gqMA0GCSqGSIb3DQEBBAUAMCQxIjAgBgNVBAMTGXNlcnZpY2VzLmhldXJpc3RpY2xhYi5jb20wHhcNMTAwNTExMTExNDAyWhcNMzkxMjMxMjM1OTU5WjAkMSIwIAYDVQQDExlzZXJ2aWNlcy5oZXVyaXN0aWNsYWIuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCq26Bwmwc7k+4W30qLQ2j+FInEL5BuH6opDY6CSlrtt3xQS/anrhvpbf3QghLDVINzcHkzbPmm/SguG4F85QLB6xO+tJaOvRo0iEK5g3c307vMIru7FJwk/OhplEQ5J1hbDgL3zOJlrWlgtqRVxCtVdF3XroI9BctOt1NkeKv9ewIDAQABo1kwVzBVBgNVHQEETjBMgBCjbgdYd4j5JgUuJ1Wo/GxroSYwJDEiMCAGA1UEAxMZc2VydmljZXMuaGV1cmlzdGljbGFiLmNvbYIQCJLHkNhBIYFO9tKiQOtYKjANBgkqhkiG9w0BAQQFAAOBgQAb/2xk2uQad68shSPl/uixWgvFI8WkxOTBopOLaLtDxwCeZ3mWVHdV9VnixHtThubnEBXAhYOCQSIXWtQuXFWO+gH3YyjTRJY5kTmXyuvBRTn3/so5SrQ7Rdlm9hf6E5YVX3tCjAy7ybUyaDUkQfmH5vmvgvpMzRfsJ1qhnUpJiQ==" />
     61        </identity>
     62      </endpoint>
    4863    </client>
    4964  </system.serviceModel>
     
    5166    <HeuristicLab.Clients.Hive.SlaveCore.Properties.Settings>
    5267      <setting name="HeartbeatInterval" serializeAs="String">
    53         <value>00:00:40</value>
     68        <value>00:00:30</value>
    5469      </setting>
    5570      <setting name="LastUsedFileName" serializeAs="String">
  • trunk/sources/HeuristicLab.Clients.Hive/3.3/HiveServiceLocator.cs

    r9456 r9665  
    3535    }
    3636
     37    private HiveServiceLocator() {
     38    }
     39
    3740    private string username;
    3841    public string Username {
     
    4750    }
    4851
     52    public int EndpointRetries { get; private set; }
     53
     54    public string WorkingEndpoint { get; private set; }
     55
    4956    private HiveServiceClient NewServiceClient() {
    50       HiveServiceClient cl;
     57      if (EndpointRetries >= Settings.Default.MaxEndpointRetries) {
     58        return CreateClient(WorkingEndpoint);
     59      }
     60
     61      var configurations = Settings.Default.EndpointConfigurationPriorities;
     62
     63      Exception exception = null;
     64      foreach (var endpointConfigurationName in configurations) {
     65        try {
     66          var cl = CreateClient(endpointConfigurationName);
     67          cl.Open();
     68          WorkingEndpoint = endpointConfigurationName;
     69          return cl;
     70        }
     71        catch (Exception exc) {
     72          exception = exc;
     73          EndpointRetries++;
     74        }
     75      }
     76
     77      throw exception ?? new Exception("No endpoint for Hive service found.");
     78    }
     79
     80    private HiveServiceClient CreateClient(string endpointConfigurationName) {
     81      HiveServiceClient cl = null;
     82
    5183      if (string.IsNullOrEmpty(username) && string.IsNullOrEmpty(password))
    52         cl = ClientFactory.CreateClient<HiveServiceClient, IHiveService>();
     84        cl = ClientFactory.CreateClient<HiveServiceClient, IHiveService>(endpointConfigurationName);
    5385      else
    54         cl = ClientFactory.CreateClient<HiveServiceClient, IHiveService>(null, null, username, password);
     86        cl = ClientFactory.CreateClient<HiveServiceClient, IHiveService>(endpointConfigurationName, null, username, password);
    5587
    5688      return cl;
  • trunk/sources/HeuristicLab.Clients.Hive/3.3/Settings.Designer.cs

    r9207 r9665  
    22// <auto-generated>
    33//     This code was generated by a tool.
    4 //     Runtime Version:4.0.30319.586
     4//     Runtime Version:4.0.30319.18034
    55//
    66//     Changes to this file may cause incorrect behavior and will be lost if
     
    1313   
    1414    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
    15     [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
     15    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
    1616    internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
    1717       
     
    2626        [global::System.Configuration.ApplicationScopedSettingAttribute()]
    2727        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
    28         [global::System.Configuration.DefaultSettingValueAttribute("1")]
     28        [global::System.Configuration.DefaultSettingValueAttribute("2")]
    2929        public int MaxParallelUploads {
    3030            get {
     
    5353        [global::System.Configuration.ApplicationScopedSettingAttribute()]
    5454        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
    55         [global::System.Configuration.DefaultSettingValueAttribute("2")]
     55        [global::System.Configuration.DefaultSettingValueAttribute("4")]
    5656        public int MaxParallelDownloads {
    5757            get {
     
    7777            }
    7878        }
     79       
     80        [global::System.Configuration.ApplicationScopedSettingAttribute()]
     81        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     82        [global::System.Configuration.DefaultSettingValueAttribute(@"<?xml version=""1.0"" encoding=""utf-16""?>
     83<ArrayOfString xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema"">
     84  <string>netTcpBinding_IHiveService</string>
     85  <string>wsHttpBinding_IHiveService</string>
     86</ArrayOfString>")]
     87        public global::System.Collections.Specialized.StringCollection EndpointConfigurationPriorities {
     88            get {
     89                return ((global::System.Collections.Specialized.StringCollection)(this["EndpointConfigurationPriorities"]));
     90            }
     91        }
     92       
     93        [global::System.Configuration.ApplicationScopedSettingAttribute()]
     94        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     95        [global::System.Configuration.DefaultSettingValueAttribute("3")]
     96        public int MaxEndpointRetries {
     97            get {
     98                return ((int)(this["MaxEndpointRetries"]));
     99            }
     100        }
    79101    }
    80102}
  • trunk/sources/HeuristicLab.Clients.Hive/3.3/Settings.settings

    r9207 r9665  
    44  <Settings>
    55    <Setting Name="MaxParallelUploads" Type="System.Int32" Scope="Application">
    6       <Value Profile="(Default)">1</Value>
     6      <Value Profile="(Default)">2</Value>
    77    </Setting>
    88    <Setting Name="HLBinaryName" Type="System.String" Scope="Application">
     
    1313    </Setting>
    1414    <Setting Name="MaxParallelDownloads" Type="System.Int32" Scope="Application">
    15       <Value Profile="(Default)">2</Value>
     15      <Value Profile="(Default)">4</Value>
    1616    </Setting>
    1717    <Setting Name="MaxRepeatServiceCalls" Type="System.Int32" Scope="Application">
     
    2121      <Value Profile="(Default)">anonymous</Value>
    2222    </Setting>
     23    <Setting Name="EndpointConfigurationPriorities" Type="System.Collections.Specialized.StringCollection" Scope="Application">
     24      <Value Profile="(Default)">&lt;?xml version="1.0" encoding="utf-16"?&gt;
     25&lt;ArrayOfString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
     26  &lt;string&gt;netTcpBinding_IHiveService&lt;/string&gt;
     27  &lt;string&gt;wsHttpBinding_IHiveService&lt;/string&gt;
     28&lt;/ArrayOfString&gt;</Value>
     29    </Setting>
     30    <Setting Name="MaxEndpointRetries" Type="System.Int32" Scope="Application">
     31      <Value Profile="(Default)">3</Value>
     32    </Setting>
    2333  </Settings>
    2434</SettingsFile>
  • trunk/sources/HeuristicLab.Clients.Hive/3.3/app.config

    r9207 r9665  
    99    <HeuristicLab.Clients.Hive.Settings>
    1010      <setting name="MaxParallelUploads" serializeAs="String">
    11         <value>1</value>
     11        <value>2</value>
    1212      </setting>
    1313      <setting name="HLBinaryName" serializeAs="String">
     
    1818      </setting>
    1919      <setting name="MaxParallelDownloads" serializeAs="String">
    20         <value>2</value>
     20        <value>4</value>
    2121      </setting>
    2222      <setting name="MaxRepeatServiceCalls" serializeAs="String">
     
    2525      <setting name="AnonymousUserName" serializeAs="String">
    2626        <value>anonymous</value>
     27      </setting>
     28      <setting name="EndpointConfigurationPriorities" serializeAs="Xml">
     29        <value>
     30          <ArrayOfString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     31            xmlns:xsd="http://www.w3.org/2001/XMLSchema">
     32            <string>netTcpBinding_IHiveService</string>
     33            <string>wsHttpBinding_IHiveService</string>
     34          </ArrayOfString>
     35        </value>
     36      </setting>
     37      <setting name="MaxEndpointRetries" serializeAs="String">
     38        <value>3</value>
    2739      </setting>
    2840    </HeuristicLab.Clients.Hive.Settings>
     
    3850    <bindings>
    3951      <wsHttpBinding>
    40         <binding name="wsHttpBinding_Hive"
    41                  closeTimeout="00:01:00"
    42                  openTimeout="00:01:00"
    43                  receiveTimeout="00:20:00"
    44                  sendTimeout="00:20:00"
    45                  bypassProxyOnLocal="false"
    46                  transactionFlow="false"
    47                  hostNameComparisonMode="StrongWildcard"
    48                  maxBufferPoolSize="2147483647"
    49                  maxReceivedMessageSize="2147483647"
    50                  messageEncoding="Text"
    51                  textEncoding="utf-8"
    52                  useDefaultWebProxy="true"
    53                  allowCookies="false">
    54 
    55           <readerQuotas maxDepth="2147483647"
    56                         maxStringContentLength="2147483647"
    57                         maxArrayLength="2147483647"
    58                         maxBytesPerRead="2147483647"
    59                         maxNameTableCharCount="2147483647"/>
     52        <binding name="wsHttpBinding_Hive" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:20:00" sendTimeout="00:20:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false">
     53          <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647"/>
    6054          <reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false"/>
    6155          <security mode="Message">
     
    6559        </binding>
    6660      </wsHttpBinding>
     61      <netTcpBinding>
     62        <binding name="netTcpBinding_Hive" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:20:00" sendTimeout="00:20:00" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647">
     63          <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
     64          <reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false" />
     65          <security mode="TransportWithMessageCredential">
     66            <transport clientCredentialType="Windows" />
     67            <message clientCredentialType="UserName" algorithmSuite="Default" />
     68          </security>
     69        </binding>
     70      </netTcpBinding>
    6771    </bindings>
    6872    <client>
    6973      <endpoint address="http://services.heuristiclab.com/Hive-3.3/HiveService.svc" binding="wsHttpBinding" bindingConfiguration="wsHttpBinding_Hive" contract="HeuristicLab.Clients.Hive.IHiveService" name="wsHttpBinding_IHiveService" behaviorConfiguration="HiveBehaviorConfiguration">
    7074        <identity>
    71           <certificate encodedValue="AwAAAAEAAAAUAAAAwK1+2oAmcy/mI2P2QjyiJRh0y60gAAAAAQAAACoCAAAwggImMIIBj6ADAgECAhAIkseQ2EEhgU720qJA61gqMA0GCSqGSIb3DQEBBAUAMCQxIjAgBgNVBAMTGXNlcnZpY2VzLmhldXJpc3RpY2xhYi5jb20wHhcNMTAwNTExMTExNDAyWhcNMzkxMjMxMjM1OTU5WjAkMSIwIAYDVQQDExlzZXJ2aWNlcy5oZXVyaXN0aWNsYWIuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCq26Bwmwc7k+4W30qLQ2j+FInEL5BuH6opDY6CSlrtt3xQS/anrhvpbf3QghLDVINzcHkzbPmm/SguG4F85QLB6xO+tJaOvRo0iEK5g3c307vMIru7FJwk/OhplEQ5J1hbDgL3zOJlrWlgtqRVxCtVdF3XroI9BctOt1NkeKv9ewIDAQABo1kwVzBVBgNVHQEETjBMgBCjbgdYd4j5JgUuJ1Wo/GxroSYwJDEiMCAGA1UEAxMZc2VydmljZXMuaGV1cmlzdGljbGFiLmNvbYIQCJLHkNhBIYFO9tKiQOtYKjANBgkqhkiG9w0BAQQFAAOBgQAb/2xk2uQad68shSPl/uixWgvFI8WkxOTBopOLaLtDxwCeZ3mWVHdV9VnixHtThubnEBXAhYOCQSIXWtQuXFWO+gH3YyjTRJY5kTmXyuvBRTn3/so5SrQ7Rdlm9hf6E5YVX3tCjAy7ybUyaDUkQfmH5vmvgvpMzRfsJ1qhnUpJiQ=="/>
     75          <certificate encodedValue="AwAAAAEAAAAUAAAAwK1+2oAmcy/mI2P2QjyiJRh0y60gAAAAAQAAACoCAAAwggImMIIBj6ADAgECAhAIkseQ2EEhgU720qJA61gqMA0GCSqGSIb3DQEBBAUAMCQxIjAgBgNVBAMTGXNlcnZpY2VzLmhldXJpc3RpY2xhYi5jb20wHhcNMTAwNTExMTExNDAyWhcNMzkxMjMxMjM1OTU5WjAkMSIwIAYDVQQDExlzZXJ2aWNlcy5oZXVyaXN0aWNsYWIuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCq26Bwmwc7k+4W30qLQ2j+FInEL5BuH6opDY6CSlrtt3xQS/anrhvpbf3QghLDVINzcHkzbPmm/SguG4F85QLB6xO+tJaOvRo0iEK5g3c307vMIru7FJwk/OhplEQ5J1hbDgL3zOJlrWlgtqRVxCtVdF3XroI9BctOt1NkeKv9ewIDAQABo1kwVzBVBgNVHQEETjBMgBCjbgdYd4j5JgUuJ1Wo/GxroSYwJDEiMCAGA1UEAxMZc2VydmljZXMuaGV1cmlzdGljbGFiLmNvbYIQCJLHkNhBIYFO9tKiQOtYKjANBgkqhkiG9w0BAQQFAAOBgQAb/2xk2uQad68shSPl/uixWgvFI8WkxOTBopOLaLtDxwCeZ3mWVHdV9VnixHtThubnEBXAhYOCQSIXWtQuXFWO+gH3YyjTRJY5kTmXyuvBRTn3/so5SrQ7Rdlm9hf6E5YVX3tCjAy7ybUyaDUkQfmH5vmvgvpMzRfsJ1qhnUpJiQ==" />
     76        </identity>
     77      </endpoint>
     78      <endpoint address="net.tcp://services.heuristiclab.com/Hive-3.3/HiveService.svc" binding="netTcpBinding" bindingConfiguration="netTcpBinding_Hive" contract="HeuristicLab.Clients.Hive.IHiveService" name="netTcpBinding_IHiveService" behaviorConfiguration="HiveBehaviorConfiguration">
     79        <identity>
     80          <certificate encodedValue="AwAAAAEAAAAUAAAAwK1+2oAmcy/mI2P2QjyiJRh0y60gAAAAAQAAACoCAAAwggImMIIBj6ADAgECAhAIkseQ2EEhgU720qJA61gqMA0GCSqGSIb3DQEBBAUAMCQxIjAgBgNVBAMTGXNlcnZpY2VzLmhldXJpc3RpY2xhYi5jb20wHhcNMTAwNTExMTExNDAyWhcNMzkxMjMxMjM1OTU5WjAkMSIwIAYDVQQDExlzZXJ2aWNlcy5oZXVyaXN0aWNsYWIuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCq26Bwmwc7k+4W30qLQ2j+FInEL5BuH6opDY6CSlrtt3xQS/anrhvpbf3QghLDVINzcHkzbPmm/SguG4F85QLB6xO+tJaOvRo0iEK5g3c307vMIru7FJwk/OhplEQ5J1hbDgL3zOJlrWlgtqRVxCtVdF3XroI9BctOt1NkeKv9ewIDAQABo1kwVzBVBgNVHQEETjBMgBCjbgdYd4j5JgUuJ1Wo/GxroSYwJDEiMCAGA1UEAxMZc2VydmljZXMuaGV1cmlzdGljbGFiLmNvbYIQCJLHkNhBIYFO9tKiQOtYKjANBgkqhkiG9w0BAQQFAAOBgQAb/2xk2uQad68shSPl/uixWgvFI8WkxOTBopOLaLtDxwCeZ3mWVHdV9VnixHtThubnEBXAhYOCQSIXWtQuXFWO+gH3YyjTRJY5kTmXyuvBRTn3/so5SrQ7Rdlm9hf6E5YVX3tCjAy7ybUyaDUkQfmH5vmvgvpMzRfsJ1qhnUpJiQ==" />
    7281        </identity>
    7382      </endpoint>
  • trunk/sources/HeuristicLab.Services.Hive

  • trunk/sources/HeuristicLab.Services.Hive.DataAccess

  • trunk/sources/HeuristicLab.Services.Hive.DataAccess/3.3/HeuristicLab.Services.Hive.DataAccess-3.3.csproj

    r8957 r9665  
    149149  <ItemGroup>
    150150    <Content Include="SQL Scripts\Initialize Hive Database.sql" />
     151    <Content Include="SQL Scripts\Migrate to Filestream.sql" />
    151152    <Content Include="SQL Scripts\Prepare Hive Database.sql" />
    152153  </ItemGroup>
  • trunk/sources/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.cs

    r9456 r9665  
    2323using System.Data.Linq.Mapping;
    2424namespace HeuristicLab.Services.Hive.DataAccess {
    25   partial class SlaveStatistics {
    26   }
    27 
    2825  partial class HiveDataContext {
    2926    // source: http://stackoverflow.com/questions/648196/random-row-from-linq-to-sql
    3027    [Function(Name = "NEWID", IsComposable = true)]
    31     public Guid Random() { 
     28    public Guid Random() {
    3229      // to prove not used by our C# code...
    3330      throw new NotImplementedException();
  • trunk/sources/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.dbml

    r9426 r9665  
    114114    <Type Name="TaskData">
    115115      <Column Name="TaskId" Storage="_JobId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" IsPrimaryKey="true" CanBeNull="false" />
    116       <Column Name="Data" Type="System.Data.Linq.Binary" DbType="VarBinary(MAX)" CanBeNull="false" UpdateCheck="Never" IsDelayLoaded="true" />
     116      <Column Name="Data" Type="System.Byte[]" DbType="VarBinary(MAX)" CanBeNull="false" UpdateCheck="Never" IsDelayLoaded="true" />
    117117      <Column Name="LastUpdate" Type="System.DateTime" DbType="DateTime" CanBeNull="false" />
    118118      <Association Name="Task_TaskData" Member="Task" Storage="_Job" ThisKey="TaskId" OtherKey="TaskId" Type="Task" IsForeignKey="true" />
     
    123123      <Column Name="PluginDataId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" IsPrimaryKey="true" IsDbGenerated="true" CanBeNull="false" />
    124124      <Column Name="PluginId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" CanBeNull="false" />
    125       <Column Name="Data" Type="System.Data.Linq.Binary" DbType="VarBinary(MAX) NOT NULL" CanBeNull="false" UpdateCheck="Never" IsDelayLoaded="true" />
     125      <Column Name="Data" Type="System.Byte[]" DbType="VarBinary(MAX) NOT NULL" CanBeNull="false" UpdateCheck="Never" IsDelayLoaded="true" />
    126126      <Column Name="FileName" Type="System.String" DbType="VarChar(MAX)" CanBeNull="false" />
    127127      <Association Name="Plugin_PluginData" Member="Plugin" ThisKey="PluginId" OtherKey="PluginId" Type="Plugin" IsForeignKey="true" />
  • trunk/sources/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.dbml.layout

    r9123 r9665  
    33  <DataContextMoniker Name="/HiveDataContext" />
    44  <nestedChildShapes>
    5     <classShape Id="a929c9dc-69f4-4488-ba1c-a2342bf81d89" absoluteBounds="8.875, 4.5, 2, 1.1939925130208327">
     5    <classShape Id="a929c9dc-69f4-4488-ba1c-a2342bf81d89" absoluteBounds="8.875, 4.5, 2, 1.0961531575520827">
    66      <DataClassMoniker Name="/HiveDataContext/AssignedResource" />
    77      <nestedChildShapes>
    8         <elementListCompartment Id="8b005775-f0ee-41b0-ae10-6d1151003708" absoluteBounds="8.89, 4.9600000000000009, 1.9700000000000002, 0.63399251302083326" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
    9       </nestedChildShapes>
    10     </classShape>
    11     <classShape Id="7d998e56-4fba-41ca-a1a8-1dcdb9068edf" absoluteBounds="8.875, 5.875, 2, 1.9631982421874996">
     8        <elementListCompartment Id="8b005775-f0ee-41b0-ae10-6d1151003708" absoluteBounds="8.89, 4.9600000000000009, 1.9700000000000002, 0.53615315755208326" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
     9      </nestedChildShapes>
     10    </classShape>
     11    <classShape Id="7d998e56-4fba-41ca-a1a8-1dcdb9068edf" absoluteBounds="8.875, 5.875, 2, 1.7535424804687496">
    1212      <DataClassMoniker Name="/HiveDataContext/Plugin" />
    1313      <nestedChildShapes>
    14         <elementListCompartment Id="ec4ba325-6dff-4418-baad-59af81ae2024" absoluteBounds="8.89, 6.3350000000000009, 1.9700000000000002, 1.4031982421875" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
    15       </nestedChildShapes>
    16     </classShape>
    17     <classShape Id="97b00810-fa30-457e-b484-b4e80b22f91b" absoluteBounds="6.5, 5.875, 2, 1.3862939453124987">
     14        <elementListCompartment Id="ec4ba325-6dff-4418-baad-59af81ae2024" absoluteBounds="8.89, 6.3350000000000009, 1.9700000000000002, 1.19354248046875" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
     15      </nestedChildShapes>
     16    </classShape>
     17    <classShape Id="97b00810-fa30-457e-b484-b4e80b22f91b" absoluteBounds="6.5, 5.875, 2, 1.2605004882812496">
    1818      <DataClassMoniker Name="/HiveDataContext/RequiredPlugin" />
    1919      <nestedChildShapes>
    20         <elementListCompartment Id="df6451e5-069e-4ca0-a909-61b8213b5047" absoluteBounds="6.5150000000000006, 6.3350000000000009, 1.9700000000000002, 0.8262939453125" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
    21       </nestedChildShapes>
    22     </classShape>
    23     <classShape Id="706a4581-6daf-4e71-ae2a-87d50b27a051" absoluteBounds="11.25, 1, 2, 1.9631982421875">
     20        <elementListCompartment Id="df6451e5-069e-4ca0-a909-61b8213b5047" absoluteBounds="6.5150000000000006, 6.3350000000000009, 1.9700000000000002, 0.70050048828125" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
     21      </nestedChildShapes>
     22    </classShape>
     23    <classShape Id="706a4581-6daf-4e71-ae2a-87d50b27a051" absoluteBounds="11.25, 1, 2, 1.75354248046875">
    2424      <DataClassMoniker Name="/HiveDataContext/Resource" />
    2525      <nestedChildShapes>
    26         <elementListCompartment Id="8c24f5bf-2164-4d0f-832e-1730eb0066df" absoluteBounds="11.265, 1.46, 1.9700000000000002, 1.4031982421875" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
    27       </nestedChildShapes>
    28     </classShape>
    29     <classShape Id="695bfc39-59f3-4e60-8644-f847964bf62c" absoluteBounds="6.5, 1, 2, 3.3093082682291666">
     26        <elementListCompartment Id="8c24f5bf-2164-4d0f-832e-1730eb0066df" absoluteBounds="11.265, 1.46, 1.9700000000000002, 1.19354248046875" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
     27      </nestedChildShapes>
     28    </classShape>
     29    <classShape Id="695bfc39-59f3-4e60-8644-f847964bf62c" absoluteBounds="6.5, 1, 2, 2.9039737955729166">
    3030      <DataClassMoniker Name="/HiveDataContext/Task" />
    3131      <nestedChildShapes>
    32         <elementListCompartment Id="a6a30e11-03d1-4869-82e6-b733f4ef9974" absoluteBounds="6.5150000000000006, 1.46, 1.9700000000000002, 2.7493082682291665" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
    33       </nestedChildShapes>
    34     </classShape>
    35     <classShape Id="8d5712f7-7a1a-4a89-bd4d-fd60200d3306" absoluteBounds="13.5, 2.5, 2, 2.3478011067708326">
     32        <elementListCompartment Id="a6a30e11-03d1-4869-82e6-b733f4ef9974" absoluteBounds="6.5150000000000006, 1.46, 1.9700000000000002, 2.3439737955729165" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
     33      </nestedChildShapes>
     34    </classShape>
     35    <classShape Id="8d5712f7-7a1a-4a89-bd4d-fd60200d3306" absoluteBounds="13.5, 2.5, 2, 2.0822371419270826">
    3636      <DataClassMoniker Name="/HiveDataContext/Downtime" />
    3737      <nestedChildShapes>
    38         <elementListCompartment Id="7d8f121b-35bb-4753-a25f-3fac1562e68e" absoluteBounds="13.515, 2.9600000000000009, 1.9700000000000002, 1.7878011067708333" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
    39       </nestedChildShapes>
    40     </classShape>
    41     <classShape Id="e6f840cc-2968-4be1-b234-eef624ccacbb" absoluteBounds="4.125, 2.625, 2, 1.9631982421874996">
     38        <elementListCompartment Id="7d8f121b-35bb-4753-a25f-3fac1562e68e" absoluteBounds="13.515, 2.9600000000000009, 1.9700000000000002, 1.5222371419270833" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
     39      </nestedChildShapes>
     40    </classShape>
     41    <classShape Id="e6f840cc-2968-4be1-b234-eef624ccacbb" absoluteBounds="4.125, 2.625, 2, 1.7535424804687496">
    4242      <DataClassMoniker Name="/HiveDataContext/Job" />
    4343      <nestedChildShapes>
    44         <elementListCompartment Id="0c65d4e1-256a-4a91-9a57-392f25e4de7f" absoluteBounds="4.1400000000000006, 3.0850000000000009, 1.9700000000000002, 1.4031982421875" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
    45       </nestedChildShapes>
    46     </classShape>
    47     <classShape Id="26f4edfa-91dd-4941-a058-359f89e567a8" absoluteBounds="8.875, 0.75, 2, 3.3093082682291666">
     44        <elementListCompartment Id="0c65d4e1-256a-4a91-9a57-392f25e4de7f" absoluteBounds="4.1400000000000006, 3.0850000000000009, 1.9700000000000002, 1.19354248046875" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
     45      </nestedChildShapes>
     46    </classShape>
     47    <classShape Id="26f4edfa-91dd-4941-a058-359f89e567a8" absoluteBounds="8.875, 0.75, 2, 2.9039737955729166">
    4848      <DataClassMoniker Name="/HiveDataContext/Slave" />
    4949      <nestedChildShapes>
    50         <elementListCompartment Id="1e61f36b-08dc-4df7-8594-c9dcd95c0791" absoluteBounds="8.89, 1.21, 1.9700000000000002, 2.7493082682291665" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
    51       </nestedChildShapes>
    52     </classShape>
    53     <classShape Id="bbd91675-92f2-4a69-8429-0950008fc8a4" absoluteBounds="13.5, 1, 2, 0.8093896484375">
     50        <elementListCompartment Id="1e61f36b-08dc-4df7-8594-c9dcd95c0791" absoluteBounds="8.89, 1.21, 1.9700000000000002, 2.3439737955729165" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
     51      </nestedChildShapes>
     52    </classShape>
     53    <classShape Id="bbd91675-92f2-4a69-8429-0950008fc8a4" absoluteBounds="13.5, 1, 2, 0.76745849609375">
    5454      <DataClassMoniker Name="/HiveDataContext/SlaveGroup" />
    5555      <nestedChildShapes>
    56         <elementListCompartment Id="5a790e8f-6e2e-4bf5-bd2b-f8a82224d9d7" absoluteBounds="13.5, 1, 0.125, 0.2493896484375" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
     56        <elementListCompartment Id="5a790e8f-6e2e-4bf5-bd2b-f8a82224d9d7" absoluteBounds="13.5, 1, 0.125, 0.20745849609375" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
    5757      </nestedChildShapes>
    5858    </classShape>
     
    6969      </nodes>
    7070    </inheritanceConnector>
    71     <associationConnector edgePoints="[(11.8134963640734 : 2.9631982421875); (11.8134963640734 : 3.56770833333333); (11.1119791666667 : 3.56770833333333); (11.1119791666667 : 5.09699625651042); (10.875 : 5.09699625651042)]" manuallyRouted="true" fixedFrom="NotFixed" fixedTo="NotFixed">
     71    <associationConnector edgePoints="[(11.8134963640734 : 2.75354248046875); (11.8134963640734 : 3.56770833333333); (11.1119791666667 : 3.56770833333333); (11.1119791666667 : 5.09699625651042); (10.875 : 5.09699625651042)]" manuallyRouted="true" fixedFrom="Algorithm" fixedTo="Algorithm">
    7272      <AssociationMoniker Name="/HiveDataContext/Resource/Resource_AssignedResource" />
    7373      <nodes>
     
    7676      </nodes>
    7777    </associationConnector>
    78     <classShape Id="6bc13f26-f9a8-4597-b054-35be34190d12" absoluteBounds="4.125, 1, 2, 1.3862939453125">
     78    <classShape Id="6bc13f26-f9a8-4597-b054-35be34190d12" absoluteBounds="4.125, 1, 2, 1.26050048828125">
    7979      <DataClassMoniker Name="/HiveDataContext/TaskData" />
    8080      <nestedChildShapes>
    81         <elementListCompartment Id="a068522c-7974-4679-b356-e33c941c465b" absoluteBounds="4.14, 1.46, 1.9700000000000002, 0.8262939453125" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
    82       </nestedChildShapes>
    83     </classShape>
    84     <classShape Id="ad25bd0f-80e8-4a06-abd8-190eb678eec7" absoluteBounds="11.25, 5.875, 2, 1.5785953776041666">
     81        <elementListCompartment Id="a068522c-7974-4679-b356-e33c941c465b" absoluteBounds="4.14, 1.46, 1.9700000000000002, 0.70050048828125" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
     82      </nestedChildShapes>
     83    </classShape>
     84    <classShape Id="ad25bd0f-80e8-4a06-abd8-190eb678eec7" absoluteBounds="11.25, 5.875, 2, 1.4248478190104166">
    8585      <DataClassMoniker Name="/HiveDataContext/PluginData" />
    8686      <nestedChildShapes>
    87         <elementListCompartment Id="acddb513-7de6-4bb4-8335-d6982fb2ef35" absoluteBounds="11.265, 6.3350000000000009, 1.9700000000000002, 1.0185953776041665" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
     87        <elementListCompartment Id="acddb513-7de6-4bb4-8335-d6982fb2ef35" absoluteBounds="11.265, 6.3350000000000009, 1.9700000000000002, 0.86484781901041663" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
    8888      </nestedChildShapes>
    8989    </classShape>
     
    109109      </nodes>
    110110    </associationConnector>
    111     <classShape Id="00352397-340e-449a-8e23-6ddd216e8617" absoluteBounds="1.75, 1, 2, 2.1554996744791666">
     111    <classShape Id="00352397-340e-449a-8e23-6ddd216e8617" absoluteBounds="1.75, 1, 2, 1.9178898111979166">
    112112      <DataClassMoniker Name="/HiveDataContext/StateLog" />
    113113      <nestedChildShapes>
    114         <elementListCompartment Id="9a003897-deef-4bb5-b180-4c4bcdb7fadc" absoluteBounds="1.765, 1.46, 1.9700000000000002, 1.5954996744791665" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
    115       </nestedChildShapes>
    116     </classShape>
    117     <classShape Id="4d800dc9-1b18-469f-b02c-d4554757c5e1" absoluteBounds="1.75, 3.625, 2, 1.5785953776041666">
     114        <elementListCompartment Id="9a003897-deef-4bb5-b180-4c4bcdb7fadc" absoluteBounds="1.765, 1.46, 1.9700000000000002, 1.3578898111979165" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
     115      </nestedChildShapes>
     116    </classShape>
     117    <classShape Id="4d800dc9-1b18-469f-b02c-d4554757c5e1" absoluteBounds="1.75, 3.625, 2, 1.4248478190104166">
    118118      <DataClassMoniker Name="/HiveDataContext/JobPermission" />
    119119      <nestedChildShapes>
    120         <elementListCompartment Id="dedd97d3-a9a2-45a2-9b95-d7366fb65a7f" absoluteBounds="1.765, 4.085, 1.9700000000000002, 1.0185953776041665" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
     120        <elementListCompartment Id="dedd97d3-a9a2-45a2-9b95-d7366fb65a7f" absoluteBounds="1.765, 4.085, 1.9700000000000002, 0.86484781901041663" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
    121121      </nestedChildShapes>
    122122    </classShape>
     
    128128      </nodes>
    129129    </associationConnector>
    130     <classShape Id="b4e7aaa8-a382-4560-a1fd-498de77e9340" absoluteBounds="1.75, 5.5, 2, 1.1939925130208327">
     130    <classShape Id="b4e7aaa8-a382-4560-a1fd-498de77e9340" absoluteBounds="1.75, 5.5, 2, 1.0961531575520827">
    131131      <DataClassMoniker Name="/HiveDataContext/Lifecycle" />
    132132      <nestedChildShapes>
    133         <elementListCompartment Id="03597a2c-5c5d-4c2c-b741-c49ab5aa34d5" absoluteBounds="1.7650000000000001, 5.96, 1.9700000000000002, 0.63399251302083326" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
    134       </nestedChildShapes>
    135     </classShape>
    136     <classShape Id="cdddf4da-eaef-46a1-9cfd-987bb6b3d03e" absoluteBounds="17, 3.125, 2.5, 1.7708968098958327">
     133        <elementListCompartment Id="03597a2c-5c5d-4c2c-b741-c49ab5aa34d5" absoluteBounds="1.7650000000000001, 5.96, 1.9700000000000002, 0.53615315755208326" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
     134      </nestedChildShapes>
     135    </classShape>
     136    <classShape Id="cdddf4da-eaef-46a1-9cfd-987bb6b3d03e" absoluteBounds="17, 3.125, 2.5, 1.5891951497395827">
    137137      <DataClassMoniker Name="/HiveDataContext/DeletedJobStatistics" />
    138138      <nestedChildShapes>
    139         <elementListCompartment Id="b8738381-f696-4dba-a517-47e9cd96a9a6" absoluteBounds="17.015, 3.585, 2.4699999999999998, 1.2108968098958333" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
    140       </nestedChildShapes>
    141     </classShape>
    142     <classShape Id="25442617-ff41-49a0-b5d5-4cbe0b2f0f45" absoluteBounds="22, 4.5, 2, 1.9631982421874996">
     139        <elementListCompartment Id="b8738381-f696-4dba-a517-47e9cd96a9a6" absoluteBounds="17.015, 3.585, 2.4699999999999998, 1.0291951497395833" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
     140      </nestedChildShapes>
     141    </classShape>
     142    <classShape Id="25442617-ff41-49a0-b5d5-4cbe0b2f0f45" absoluteBounds="22, 4.5, 2, 1.7535424804687496">
    143143      <DataClassMoniker Name="/HiveDataContext/UserStatistics" />
    144144      <nestedChildShapes>
    145         <elementListCompartment Id="6edf08e7-054a-4253-8d4f-5bf2dfec2d29" absoluteBounds="22.015, 4.96, 1.9700000000000002, 1.4031982421875" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
    146       </nestedChildShapes>
    147     </classShape>
    148     <classShape Id="f78ec989-4862-4bac-87e3-9b0aad4bc037" absoluteBounds="19.875, 4.5, 2, 2.1554996744791666">
     145        <elementListCompartment Id="6edf08e7-054a-4253-8d4f-5bf2dfec2d29" absoluteBounds="22.015, 4.96, 1.9700000000000002, 1.19354248046875" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
     146      </nestedChildShapes>
     147    </classShape>
     148    <classShape Id="f78ec989-4862-4bac-87e3-9b0aad4bc037" absoluteBounds="19.875, 4.5, 2, 1.9178898111979166">
    149149      <DataClassMoniker Name="/HiveDataContext/SlaveStatistics" />
    150150      <nestedChildShapes>
    151         <elementListCompartment Id="98cb46fe-820e-4041-aee8-04e8bed3df23" absoluteBounds="19.89, 4.96, 1.9700000000000002, 1.5954996744791665" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
    152       </nestedChildShapes>
    153     </classShape>
    154     <classShape Id="4d9f0606-b7ee-4dae-a8ac-aff88d25a941" absoluteBounds="21, 3, 2, 1.1939925130208327">
     151        <elementListCompartment Id="98cb46fe-820e-4041-aee8-04e8bed3df23" absoluteBounds="19.89, 4.96, 1.9700000000000002, 1.3578898111979165" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
     152      </nestedChildShapes>
     153    </classShape>
     154    <classShape Id="4d9f0606-b7ee-4dae-a8ac-aff88d25a941" absoluteBounds="21, 3, 2, 1.0961531575520827">
    155155      <DataClassMoniker Name="/HiveDataContext/Statistics" />
    156156      <nestedChildShapes>
    157         <elementListCompartment Id="17821282-8edf-40b7-9065-84f53391d5c1" absoluteBounds="21.015, 3.46, 1.9700000000000002, 0.63399251302083326" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
     157        <elementListCompartment Id="17821282-8edf-40b7-9065-84f53391d5c1" absoluteBounds="21.015, 3.46, 1.9700000000000002, 0.53615315755208326" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
    158158      </nestedChildShapes>
    159159    </classShape>
     
    228228      </nodes>
    229229    </associationConnector>
    230     <classShape Id="a3f352be-9f15-4e73-8d44-3e8ac02fb4cf" absoluteBounds="11.25, 3.875, 2, 1.3862939453124996">
     230    <classShape Id="a3f352be-9f15-4e73-8d44-3e8ac02fb4cf" absoluteBounds="11.25, 3.875, 2, 1.2605004882812496">
    231231      <DataClassMoniker Name="/HiveDataContext/ResourcePermission" />
    232232      <nestedChildShapes>
    233         <elementListCompartment Id="45e2f1a8-8a1e-4647-b649-10ec55976ab4" absoluteBounds="11.265, 4.335, 1.9700000000000002, 0.8262939453125" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
     233        <elementListCompartment Id="45e2f1a8-8a1e-4647-b649-10ec55976ab4" absoluteBounds="11.265, 4.335, 1.9700000000000002, 0.70050048828125" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
    234234      </nestedChildShapes>
    235235    </classShape>
     
    241241      </nodes>
    242242    </associationConnector>
    243     <classShape Id="f9e8867f-fd15-4a72-8ca4-4f02cd3f141f" absoluteBounds="4.125, 5.5, 2, 1.1939925130208327">
     243    <classShape Id="f9e8867f-fd15-4a72-8ca4-4f02cd3f141f" absoluteBounds="4.125, 5.5, 2, 1.0961531575520827">
    244244      <DataClassMoniker Name="/HiveDataContext/UserPriority" />
    245245      <nestedChildShapes>
    246         <elementListCompartment Id="ee41f516-7d9c-4a1d-a1b8-bbe00a6ffea8" absoluteBounds="4.14, 5.96, 1.9700000000000002, 0.63399251302083326" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
     246        <elementListCompartment Id="ee41f516-7d9c-4a1d-a1b8-bbe00a6ffea8" absoluteBounds="4.14, 5.96, 1.9700000000000002, 0.53615315755208326" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
    247247      </nestedChildShapes>
    248248    </classShape>
  • trunk/sources/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.designer.cs

    r9426 r9665  
    26612661    private System.Guid _JobId;
    26622662   
    2663     private System.Data.Linq.Link<System.Data.Linq.Binary> _Data;
     2663    private System.Data.Linq.Link<byte[]> _Data;
    26642664   
    26652665    private System.DateTime _LastUpdate;
     
    26732673    partial void OnTaskIdChanging(System.Guid value);
    26742674    partial void OnTaskIdChanged();
    2675     partial void OnDataChanging(System.Data.Linq.Binary value);
     2675    partial void OnDataChanging(byte[] value);
    26762676    partial void OnDataChanged();
    26772677    partial void OnLastUpdateChanging(System.DateTime value);
     
    27102710   
    27112711    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Data", DbType="VarBinary(MAX)", CanBeNull=false, UpdateCheck=UpdateCheck.Never)]
    2712     public System.Data.Linq.Binary Data
     2712    public byte[] Data
    27132713    {
    27142714      get
     
    28142814    private System.Guid _PluginId;
    28152815   
    2816     private System.Data.Linq.Link<System.Data.Linq.Binary> _Data;
     2816    private System.Data.Linq.Link<byte[]> _Data;
    28172817   
    28182818    private string _FileName;
     
    28282828    partial void OnPluginIdChanging(System.Guid value);
    28292829    partial void OnPluginIdChanged();
    2830     partial void OnDataChanging(System.Data.Linq.Binary value);
     2830    partial void OnDataChanging(byte[] value);
    28312831    partial void OnDataChanged();
    28322832    partial void OnFileNameChanging(string value);
     
    28852885   
    28862886    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Data", DbType="VarBinary(MAX) NOT NULL", CanBeNull=false, UpdateCheck=UpdateCheck.Never)]
    2887     public System.Data.Linq.Binary Data
     2887    public byte[] Data
    28882888    {
    28892889      get
  • trunk/sources/HeuristicLab.Services.Hive.DataAccess/3.3/SQL Scripts/Initialize Hive Database.sql

    r9123 r9665  
    11USE [HeuristicLab.Hive-3.3]
    22/* create and initialize hive database tables */
     3
     4EXEC sp_configure filestream_access_level, 2
     5GO
     6RECONFIGURE
     7GO
    38
    49SET ARITHABORT ON
     
    8893  )
    8994CREATE TABLE [dbo].[TaskData](
    90   [TaskId] UniqueIdentifier NOT NULL,
    91   [Data] VarBinary(MAX) NOT NULL,
     95  [TaskId] UniqueIdentifier RowGuidCol NOT NULL,
     96  [Data] VarBinary(MAX) Filestream NOT NULL,
    9297  [LastUpdate] DateTime NOT NULL,
    9398  CONSTRAINT [PK_dbo.TaskData] PRIMARY KEY ([TaskId])
    9499  )
    95100CREATE TABLE [dbo].[PluginData](
    96   [PluginDataId] UniqueIdentifier NOT NULL,
     101  [PluginDataId] UniqueIdentifier RowGuidCol NOT NULL,
    97102  [PluginId] UniqueIdentifier NOT NULL,
    98   [Data] VarBinary(MAX) NOT NULL,
     103  [Data] VarBinary(MAX) FileStream NOT NULL,
    99104  [FileName] VarChar(MAX) NOT NULL,
    100105  CONSTRAINT [PK_dbo.PluginData] PRIMARY KEY ([PluginDataId])
  • trunk/sources/HeuristicLab.Services.Hive.DataAccess/3.3/SQL Scripts/Prepare Hive Database.sql

    r7916 r9665  
    4141ALTER TABLE dbo.Plugin WITH NOCHECK ADD CONSTRAINT [DF_Plugin_PluginId] DEFAULT (NEWSEQUENTIALID()) FOR PluginId;
    4242
    43 ALTER TABLE dbo.PluginData ALTER COLUMN PluginDataId ADD ROWGUIDCOL;
    4443ALTER TABLE dbo.PluginData WITH NOCHECK ADD CONSTRAINT [DF_PluginData_PluginDataId] DEFAULT (NEWSEQUENTIALID()) FOR PluginDataId;
    4544
  • trunk/sources/HeuristicLab.Services.Hive.Web/Hive-3.3/Web.config

    r9251 r9665  
    5454  </system.web>
    5555  <system.serviceModel>
    56     <diagnostics>
     56    <diagnostics performanceCounters="All">
    5757      <messageLogging logEntireMessage="true" logMalformedMessages="true" logMessagesAtServiceLevel="true" logMessagesAtTransportLevel="true" maxMessagesToLog="3000"/>
    5858    </diagnostics>
    5959    <bindings>
    6060      <wsHttpBinding>
    61         <binding name="WSHttpBinding_IHiveService" receiveTimeout="00:15:00" sendTimeout="00:10:00" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647">
     61        <binding name="WSHttpBinding_IHiveService" messageEncoding="Text" receiveTimeout="00:35:00" sendTimeout="00:35:00" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647">
    6262          <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
    6363          <security mode="Message">
     
    6767        </binding>
    6868      </wsHttpBinding>
     69      <netTcpBinding>
     70        <binding name="NetTcpBinding_IHiveService" portSharingEnabled="true" receiveTimeout="00:35:00" sendTimeout="00:35:00" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647">
     71          <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
     72          <security mode="TransportWithMessageCredential">
     73            <transport clientCredentialType="Certificate"/>
     74            <message clientCredentialType="UserName"/>
     75          </security>
     76        </binding>
     77      </netTcpBinding>
    6978    </bindings>
    7079    <behaviors>
     
    8897    <services>
    8998      <service behaviorConfiguration="ServiceBehaviour_IHiveService" name="HeuristicLab.Services.Hive.HiveService">
    90         <endpoint address="mex" binding="mexHttpBinding" bindingConfiguration="" name="MexEndpoint" contract="IMetadataExchange"/>
    91         <endpoint binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IHiveService" name="WSHttpBinding_IHiveService" contract="HeuristicLab.Services.Hive.ServiceContracts.IHiveService"/>
     99        <endpoint address="mexhttp" binding="mexHttpBinding" bindingConfiguration="" name="MexHttpEndpoint" contract="IMetadataExchange"/>
     100        <endpoint address="mex" binding="mexTcpBinding" bindingConfiguration="" name="MexTcpEndpoint" contract="IMetadataExchange"/>
     101        <endpoint address="" binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IHiveService" name="WSHttpBinding_IHiveService" contract="HeuristicLab.Services.Hive.ServiceContracts.IHiveService"/>
     102        <endpoint address="net.tcp://services.heuristiclab.com/Hive-3.3/HiveService.svc" binding="netTcpBinding"  bindingConfiguration="NetTcpBinding_IHiveService" name="NetBinding_IHiveService" contract="HeuristicLab.Services.Hive.ServiceContracts.IHiveService"/>
    92103      </service>
    93104    </services>
  • trunk/sources/HeuristicLab.Services.Hive.Web/web_services.config

    r9251 r9665  
    2929  </connectionStrings>
    3030 
    31   <system.web>
     31  <system.web>     
    3232  <customErrors mode="Off"/>
    3333    <authentication mode="Forms" />
    34     <compilation debug="true" targetFramework="4.0">
     34    <compilation debug="true" targetFramework="4.0" batch="false">
    3535      <assemblies>
    3636        <add assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
     
    5555      </controls>
    5656    </pages>
    57     <httpRuntime maxRequestLength="2147483647"/>
    58  
     57    <httpRuntime maxRequestLength="2147483647"/>   
    5958  </system.web>
    6059 
     
    6766      <wsHttpBinding>
    6867        <binding name="WSHttpBinding_IHiveService"
    69       receiveTimeout="00:15:00"
    70           sendTimeout="00:10:00"
     68      receiveTimeout="00:35:00"
     69          sendTimeout="00:35:00"
    7170      maxBufferPoolSize="2147483647"
    7271      maxReceivedMessageSize="2147483647">
     
    7877        </binding>
    7978      </wsHttpBinding>
     79    <netTcpBinding>
     80        <binding name="NetTcpBinding_IHiveService" portSharingEnabled="true" receiveTimeout="00:35:00" sendTimeout="00:35:00" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647">
     81          <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
     82          <security mode="TransportWithMessageCredential">
     83            <transport clientCredentialType="Certificate"/>
     84            <message clientCredentialType="UserName"/>
     85          </security>
     86        </binding>
     87      </netTcpBinding>
    8088    </bindings>
    8189   
     
    105113    </behaviors>
    106114
    107     <services>
     115     <services>
    108116      <service behaviorConfiguration="ServiceBehaviour_IHiveService" name="HeuristicLab.Services.Hive.HiveService">
    109         <endpoint address="mex" binding="mexHttpBinding" bindingConfiguration="" name="MexEndpoint" contract="IMetadataExchange" />
    110         <endpoint binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IHiveService" name="WSHttpBinding_IHiveService" contract="HeuristicLab.Services.Hive.ServiceContracts.IHiveService" />
     117        <endpoint address="mexhttp" binding="mexHttpBinding" bindingConfiguration="" name="MexHttpEndpoint" contract="IMetadataExchange"/>
     118        <endpoint address="mex" binding="mexTcpBinding" bindingConfiguration="" name="MexTcpEndpoint" contract="IMetadataExchange"/>
     119        <endpoint address="" binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IHiveService" name="WSHttpBinding_IHiveService" contract="HeuristicLab.Services.Hive.ServiceContracts.IHiveService"/>
     120        <endpoint address="net.tcp://services.heuristiclab.com/Hive-3.3/HiveService.svc" binding="netTcpBinding"  bindingConfiguration="NetTcpBinding_IHiveService" name="NetBinding_IHiveService" contract="HeuristicLab.Services.Hive.ServiceContracts.IHiveService"/>
    111121      </service>
    112122    </services>
  • trunk/sources/HeuristicLab.Services.Hive/3.3

    • Property svn:ignore
      •  

        old new  
        22bin
        33obj
         4*.user
  • trunk/sources/HeuristicLab.Services.Hive/3.3/Convert.cs

    r9456 r9665  
    102102    public static DT.TaskData ToDto(DB.TaskData source) {
    103103      if (source == null) return null;
    104       return new DT.TaskData { TaskId = source.TaskId, Data = source.Data.ToArray(), LastUpdate = source.LastUpdate };
     104      return new DT.TaskData { TaskId = source.TaskId, Data = source.Data, LastUpdate = source.LastUpdate };
    105105    }
    106106    public static DB.TaskData ToEntity(DT.TaskData source) {
     
    111111    public static void ToEntity(DT.TaskData source, DB.TaskData target) {
    112112      if ((source != null) && (target != null)) {
    113         target.TaskId = source.TaskId; target.Data = new Binary(source.Data); target.LastUpdate = source.LastUpdate;
     113        target.TaskId = source.TaskId;
     114        target.Data = source.Data;
     115        target.LastUpdate = source.LastUpdate;
    114116      }
    115117    }
     
    213215    public static void ToEntity(DT.PluginData source, DB.PluginData target) {
    214216      if ((source != null) && (target != null)) {
    215         target.PluginDataId = source.Id; target.PluginId = source.PluginId; target.Data = new Binary(source.Data); target.FileName = source.FileName;
     217        target.PluginDataId = source.Id;
     218        target.PluginId = source.PluginId;
     219        target.Data = source.Data;
     220        target.FileName = source.FileName;
    216221      }
    217222    }
  • trunk/sources/HeuristicLab.Services.Hive/3.3/HeuristicLab.Services.Hive-3.3.csproj

    r9123 r9665  
    137137    <Compile Include="DataTransfer\Statistics.cs" />
    138138    <Compile Include="DataTransfer\UserStatistics.cs" />
     139    <Compile Include="OptimizedHiveDao.cs" />
    139140    <Compile Include="HiveDao.cs" />
    140141    <Compile Include="HiveJanitor.cs" />
     142    <Compile Include="HiveOperationContext.cs" />
     143    <Compile Include="Interfaces\IOptimizedHiveDao.cs" />
    141144    <Compile Include="Interfaces\IHiveDao.cs" />
    142145    <Compile Include="Interfaces\ITaskScheduler.cs" />
  • trunk/sources/HeuristicLab.Services.Hive/3.3/HiveDao.cs

    r9456 r9665  
    3535    }
    3636
    37     public HiveDao() { }
    38 
    3937    #region Task Methods
    4038    public DT.Task GetTask(Guid id) {
     
    666664    }
    667665
    668     private void CollectParentResources(List<Resource> resources, Resource resource) {
     666    private static void CollectParentResources(ICollection<Resource> resources, Resource resource) {
    669667      if (resource == null) return;
    670668      resources.Add(resource);
  • trunk/sources/HeuristicLab.Services.Hive/3.3/HiveService.cs

    r9456 r9665  
    3737  /// </summary>
    3838  [ServiceBehavior(InstanceContextMode = InstanceContextMode.PerCall, IgnoreExtensionDataObject = true)]
     39  [HiveOperationContextBehavior]
    3940  public class HiveService : IHiveService {
    4041    private IHiveDao dao {
    4142      get { return ServiceLocator.Instance.HiveDao; }
    4243    }
     44    private IOptimizedHiveDao optimizedDao {
     45      get { return ServiceLocator.Instance.OptimizedHiveDao; }
     46    }
    4347    private Access.IRoleVerifier authen {
    4448      get { return ServiceLocator.Instance.RoleVerifier; }
     
    6468      authen.AuthenticateForAnyRole(HiveRoles.Administrator, HiveRoles.Client);
    6569      return trans.UseTransaction(() => {
    66         task.Id = dao.AddTask(task);
    67         taskData.TaskId = task.Id;
    68         taskData.LastUpdate = DateTime.Now;
    69         dao.AssignJobToResource(task.Id, resourceIds);
    70         dao.AddTaskData(taskData);
    71         dao.UpdateTaskState(task.Id, DA.TaskState.Waiting, null, userManager.CurrentUserId, null);
    72         return taskData.TaskId;
     70        var t = DT.Convert.ToEntity(task);
     71        t.RequiredPlugins.AddRange(task.PluginsNeededIds.Select(pluginId => new DA.RequiredPlugin { Task = t, PluginId = pluginId }));
     72
     73        t.JobData = DT.Convert.ToEntity(taskData);
     74        t.JobData.LastUpdate = DateTime.Now;
     75
     76        optimizedDao.AddTask(t);
     77
     78        dao.AssignJobToResource(t.TaskId, resourceIds);
     79
     80        optimizedDao.UpdateTaskState(t.TaskId, DA.TaskState.Waiting, null, userManager.CurrentUserId, null);
     81
     82        return t.TaskId;
    7383      }, false, true);
    7484    }
     
    7686    public Guid AddChildTask(Guid parentTaskId, Task task, TaskData taskData) {
    7787      authen.AuthenticateForAnyRole(HiveRoles.Administrator, HiveRoles.Client);
    78       return trans.UseTransaction(() => {
    79         task.ParentTaskId = parentTaskId;
    80         return AddTask(task, taskData, dao.GetAssignedResources(parentTaskId).Select(x => x.Id));
    81       }, false, true);
     88      task.ParentTaskId = parentTaskId;
     89      return AddTask(task, taskData, optimizedDao.GetAssignedResourceIds(parentTaskId));
    8290    }
    8391
     
    8795
    8896      return trans.UseTransaction(() => {
    89         return dao.GetTask(taskId);
     97        return DT.Convert.ToDto(optimizedDao.GetTaskById(taskId));
    9098      }, false, false);
    9199    }
     
    128136
    129137      return trans.UseTransaction(() => {
    130         return dao.GetLightweightTasks(task => task.JobId == jobId).ToArray();
     138        return optimizedDao.GetLightweightTasks(jobId).ToArray();
    131139      }, false, true);
    132140    }
     
    155163
    156164      trans.UseTransaction(() => {
    157         dao.UpdateTaskAndPlugins(taskDto);
     165        var task = optimizedDao.GetTaskByDto(taskDto);
     166        optimizedDao.UpdateTask(task);
    158167      });
    159168    }
     
    164173
    165174      trans.UseTransaction(() => {
    166         dao.UpdateTaskAndPlugins(task);
    167       });
    168 
    169       trans.UseTransaction(() => {
    170         taskData.LastUpdate = DateTime.Now;
    171         dao.UpdateTaskData(taskData);
     175        var t = optimizedDao.GetTaskByDto(task);
     176        optimizedDao.UpdateTask(t);
     177      });
     178
     179      trans.UseTransaction(() => {
     180        var data = optimizedDao.GetTaskDataByDto(taskData);
     181        data.LastUpdate = DateTime.Now;
     182        optimizedDao.UpdateTaskData(data);
    172183      });
    173184    }
     
    196207      authen.AuthenticateForAnyRole(HiveRoles.Administrator, HiveRoles.Client, HiveRoles.Slave);
    197208      author.AuthorizeForTask(taskId, Permission.Full);
    198       return trans.UseTransaction(() => {
    199         Task task = dao.UpdateTaskState(taskId, DataTransfer.Convert.ToEntity(taskState), slaveId, userId, exception);
    200 
    201         if (task.Command.HasValue && task.Command.Value == Command.Pause && task.State == TaskState.Paused) {
     209
     210      return trans.UseTransaction(() => {
     211        var task = optimizedDao.UpdateTaskState(taskId, DT.Convert.ToEntity(taskState), slaveId, userId, exception);
     212
     213        if (task.Command.HasValue && task.Command.Value == DA.Command.Pause && task.State == DA.TaskState.Paused) {
    202214          task.Command = null;
    203         } else if (task.Command.HasValue && task.Command.Value == Command.Abort && task.State == TaskState.Aborted) {
     215        } else if (task.Command.HasValue && task.Command.Value == DA.Command.Abort && task.State == DA.TaskState.Aborted) {
    204216          task.Command = null;
    205         } else if (task.Command.HasValue && task.Command.Value == Command.Stop && task.State == TaskState.Aborted) {
     217        } else if (task.Command.HasValue && task.Command.Value == DA.Command.Stop && task.State == DA.TaskState.Aborted) {
    206218          task.Command = null;
    207219        } else if (taskState == TaskState.Paused && !task.Command.HasValue) {
    208220          // slave paused and uploaded the task (no user-command) -> set waiting.
    209           task = dao.UpdateTaskState(taskId, DataTransfer.Convert.ToEntity(TaskState.Waiting), slaveId, userId, exception);
    210         }
    211 
    212         dao.UpdateTaskAndPlugins(task);
    213         return task;
     221          task = optimizedDao.UpdateTaskState(taskId, DA.TaskState.Waiting, slaveId, userId, exception);
     222        }
     223
     224        return DT.Convert.ToDto(task);
    214225      });
    215226    }
     
    463474      authen.AuthenticateForAnyRole(HiveRoles.Administrator, HiveRoles.Client, HiveRoles.Slave);
    464475      return trans.UseTransaction(() => {
    465         return dao.GetPlugin(pluginId);
     476        return DT.Convert.ToDto(optimizedDao.GetPluginById(pluginId));
    466477      });
    467478    }
  • trunk/sources/HeuristicLab.Services.Hive/3.3/Interfaces/IServiceLocator.cs

    r9456 r9665  
    2727    IAuthorizationManager AuthorizationManager { get; }
    2828    IHiveDao HiveDao { get; }
     29    IOptimizedHiveDao OptimizedHiveDao { get; }
    2930    IEventManager EventManager { get; }
    3031    ITransactionManager TransactionManager { get; }
  • trunk/sources/HeuristicLab.Services.Hive/3.3/Manager/EventManager.cs

    r9456 r9665  
    7878      //we have to find another way to deal with this. 
    7979      //until then the next line is commented out...
    80       //stats.UserStatistics = dao.GetUserStatistics();
     80      //stats.UserStatistics = dtoDao.GetUserStatistics();
    8181      dao.AddStatistics(stats);
    8282    }
  • trunk/sources/HeuristicLab.Services.Hive/3.3/Manager/HeartbeatManager.cs

    r9456 r9665  
    2424using System.Linq;
    2525using System.Threading;
    26 using HeuristicLab.Services.Hive.DataTransfer;
    27 using DA = HeuristicLab.Services.Hive.DataAccess;
     26using HeuristicLab.Services.Hive.DataAccess;
     27using Heartbeat = HeuristicLab.Services.Hive.DataTransfer.Heartbeat;
    2828
    2929namespace HeuristicLab.Services.Hive {
     
    3131    private const string MutexName = "HiveTaskSchedulingMutex";
    3232
    33     private IHiveDao dao {
    34       get { return ServiceLocator.Instance.HiveDao; }
     33    private IOptimizedHiveDao dao {
     34      get { return ServiceLocator.Instance.OptimizedHiveDao; }
    3535    }
    3636    private ITaskScheduler taskScheduler {
     
    4747    public List<MessageContainer> ProcessHeartbeat(Heartbeat heartbeat) {
    4848      List<MessageContainer> actions = new List<MessageContainer>();
     49
    4950      Slave slave = null;
    50       slave = trans.UseTransaction(() => { return dao.GetSlave(heartbeat.SlaveId); });
    51 
     51      trans.UseTransaction(() => {
     52        slave = dao.GetSlaveById(heartbeat.SlaveId);
     53      });
    5254      if (slave == null) {
    5355        actions.Add(new MessageContainer(MessageContainer.MessageType.SayHello));
     
    5658          actions.Add(new MessageContainer(MessageContainer.MessageType.NewHBInterval));
    5759        }
    58         if (ShutdownSlaveComputer(slave.Id)) {
     60        if (dao.SlaveHasToShutdownComputer(slave.ResourceId)) {
    5961          actions.Add(new MessageContainer(MessageContainer.MessageType.ShutdownComputer));
    6062        }
     
    6466        slave.FreeMemory = heartbeat.FreeMemory;
    6567        slave.CpuUtilization = heartbeat.CpuUtilization;
    66         slave.IsAllowedToCalculate = SlaveIsAllowedToCalculate(slave.Id);
     68        slave.IsAllowedToCalculate = dao.SlaveIsAllowedToCalculate(slave.ResourceId);
    6769        slave.SlaveState = (heartbeat.JobProgress != null && heartbeat.JobProgress.Count > 0) ? SlaveState.Calculating : SlaveState.Idle;
    6870        slave.LastHeartbeat = DateTime.Now;
    6971
    70         trans.UseTransaction(() => { dao.UpdateSlave(slave); });
     72        trans.UseTransaction(() => {
     73          dao.UpdateSlave(slave);
     74        });
    7175
    7276        // update task data
     
    7882          var mutex = new Mutex(false, MutexName);
    7983          try {
     84
    8085            mutexAquired = mutex.WaitOne(Properties.Settings.Default.SchedulingPatience);
    8186            if (!mutexAquired)
    82               DA.LogFactory.GetLogger(this.GetType().Namespace).Log("HeartbeatManager: The mutex used for scheduling could not be aquired.");
     87              LogFactory.GetLogger(this.GetType().Namespace).Log("HeartbeatManager: The mutex used for scheduling could not be aquired.");
    8388            else {
    84               IEnumerable<TaskInfoForScheduler> availableTasks = null;
    85               availableTasks = trans.UseTransaction(() => { return taskScheduler.Schedule(dao.GetWaitingTasks(slave)); });
    86               if (availableTasks.Any()) {
    87                 var task = availableTasks.First();
    88                 AssignJob(slave, task.TaskId);
    89                 actions.Add(new MessageContainer(MessageContainer.MessageType.CalculateTask, task.TaskId));
    90               }
     89              trans.UseTransaction(() => {
     90                IEnumerable<TaskInfoForScheduler> availableTasks = null;
     91                availableTasks = taskScheduler.Schedule(dao.GetWaitingTasks(slave).ToArray());
     92                if (availableTasks.Any()) {
     93                  var task = availableTasks.First();
     94                  AssignTask(slave, task.TaskId);
     95                  actions.Add(new MessageContainer(MessageContainer.MessageType.CalculateTask, task.TaskId));
     96                }
     97              });
    9198            }
    9299          }
    93100          catch (AbandonedMutexException) {
    94             DA.LogFactory.GetLogger(this.GetType().Namespace).Log("HeartbeatManager: The mutex used for scheduling has been abandoned.");
     101            LogFactory.GetLogger(this.GetType().Namespace).Log("HeartbeatManager: The mutex used for scheduling has been abandoned.");
    95102          }
    96103          catch (Exception ex) {
    97             DA.LogFactory.GetLogger(this.GetType().Namespace).Log("HeartbeatManager threw an exception in ProcessHeartbeat: " + ex.ToString());
     104            LogFactory.GetLogger(this.GetType().Namespace).Log("HeartbeatManager threw an exception in ProcessHeartbeat: " + ex.ToString());
    98105          }
    99106          finally {
     
    105112    }
    106113
    107     private void AssignJob(Slave slave, Guid taskId) {
    108       trans.UseTransaction(() => {
    109         var task = dao.UpdateTaskState(taskId, DataAccess.TaskState.Transferring, slave.Id, null, null);
     114    private void AssignTask(Slave slave, Guid taskId) {
     115      var task = dao.UpdateTaskState(taskId, TaskState.Transferring, slave.ResourceId, null, null);
    110116
    111         // from now on the task has some time to send the next heartbeat (ApplicationConstants.TransferringJobHeartbeatTimeout)
    112         task.LastHeartbeat = DateTime.Now;
    113         dao.UpdateTask(task);
    114       });
     117      // from now on the task has some time to send the next heartbeat (ApplicationConstants.TransferringJobHeartbeatTimeout)
     118      task.LastHeartbeat = DateTime.Now;
     119      dao.UpdateTask(task);
    115120    }
    116121
     
    130135        // process the jobProgresses
    131136        foreach (var jobProgress in heartbeat.JobProgress) {
    132           Task curTask = null;
    133           curTask = trans.UseTransaction(() => { return dao.GetTask(jobProgress.Key); });
     137          Tuple<Task, Guid?> taskWithLastStateLogSlaveId = null;
     138          trans.UseTransaction(() => {
     139            taskWithLastStateLogSlaveId = dao.GetTaskByIdAndLastStateLogSlaveId(jobProgress.Key);
     140          });
     141          var curTask = taskWithLastStateLogSlaveId != null ? taskWithLastStateLogSlaveId.Item1 : null;
    134142          if (curTask == null) {
    135143            // task does not exist in db
    136144            actions.Add(new MessageContainer(MessageContainer.MessageType.AbortTask, jobProgress.Key));
    137             DA.LogFactory.GetLogger(this.GetType().Namespace).Log("Task on slave " + heartbeat.SlaveId + " does not exist in DB: " + jobProgress.Key);
     145            LogFactory.GetLogger(this.GetType().Namespace).Log("Task on slave " + heartbeat.SlaveId + " does not exist in DB: " + jobProgress.Key);
    138146          } else {
    139             if (curTask.CurrentStateLog.SlaveId == Guid.Empty || curTask.CurrentStateLog.SlaveId != heartbeat.SlaveId) {
     147            var slaveId = taskWithLastStateLogSlaveId.Item2;
     148            if (slaveId == Guid.Empty || slaveId != heartbeat.SlaveId) {
    140149              // assigned slave does not match heartbeat
    141               actions.Add(new MessageContainer(MessageContainer.MessageType.AbortTask, curTask.Id));
    142               DA.LogFactory.GetLogger(this.GetType().Namespace).Log("The slave " + heartbeat.SlaveId + " is not supposed to calculate task: " + curTask);
    143             } else if (!TaskIsAllowedToBeCalculatedBySlave(heartbeat.SlaveId, curTask)) {
     150              actions.Add(new MessageContainer(MessageContainer.MessageType.AbortTask, curTask.TaskId));
     151              LogFactory.GetLogger(this.GetType().Namespace).Log("The slave " + heartbeat.SlaveId + " is not supposed to calculate task: " + curTask);
     152            } else if (!dao.TaskIsAllowedToBeCalculatedBySlave(curTask.TaskId, heartbeat.SlaveId)) {
    144153              // assigned resources ids of task do not match with slaveId (and parent resourceGroupIds); this might happen when slave is moved to different group
    145               actions.Add(new MessageContainer(MessageContainer.MessageType.PauseTask, curTask.Id));
     154              actions.Add(new MessageContainer(MessageContainer.MessageType.PauseTask, curTask.TaskId));
    146155            } else {
    147156              // save task execution time
    148               curTask.ExecutionTime = jobProgress.Value;
     157              curTask.ExecutionTimeMs = jobProgress.Value.TotalMilliseconds;
    149158              curTask.LastHeartbeat = DateTime.Now;
    150159
    151160              switch (curTask.Command) {
    152161                case Command.Stop:
    153                   actions.Add(new MessageContainer(MessageContainer.MessageType.StopTask, curTask.Id));
     162                  actions.Add(new MessageContainer(MessageContainer.MessageType.StopTask, curTask.TaskId));
    154163                  break;
    155164                case Command.Pause:
    156                   actions.Add(new MessageContainer(MessageContainer.MessageType.PauseTask, curTask.Id));
     165                  actions.Add(new MessageContainer(MessageContainer.MessageType.PauseTask, curTask.TaskId));
    157166                  break;
    158167                case Command.Abort:
    159                   actions.Add(new MessageContainer(MessageContainer.MessageType.AbortTask, curTask.Id));
     168                  actions.Add(new MessageContainer(MessageContainer.MessageType.AbortTask, curTask.TaskId));
    160169                  break;
    161170              }
    162               trans.UseTransaction(() => { dao.UpdateTask(curTask); });
     171              trans.UseTransaction(() => {
     172                dao.UpdateTask(curTask);
     173              });
    163174            }
    164175          }
     
    167178      return actions;
    168179    }
    169 
    170     private bool TaskIsAllowedToBeCalculatedBySlave(Guid slaveId, Task curTask) {
    171       return trans.UseTransaction(() => {
    172         var assignedResourceIds = dao.GetAssignedResources(curTask.Id).Select(x => x.Id);
    173         var slaveResourceIds = dao.GetParentResources(slaveId).Select(x => x.Id);
    174         return assignedResourceIds.Any(x => slaveResourceIds.Contains(x));
    175       });
    176     }
    177 
    178     private bool SlaveIsAllowedToCalculate(Guid slaveId) {
    179       // the slave may only calculate if there is no downtime right now. this needs to be checked for every parent resource also
    180       return trans.UseTransaction(() => { return dao.GetParentResources(slaveId).All(r => dao.GetDowntimes(x => x.ResourceId == r.Id && x.DowntimeType == DA.DowntimeType.Offline && (DateTime.Now >= x.StartDate) && (DateTime.Now <= x.EndDate)).Count() == 0); });
    181     }
    182 
    183     private bool ShutdownSlaveComputer(Guid slaveId) {
    184       return trans.UseTransaction(() => { return dao.GetParentResources(slaveId).Any(r => dao.GetDowntimes(x => x.ResourceId == r.Id && x.DowntimeType == DA.DowntimeType.Shutdown && (DateTime.Now >= x.StartDate) && (DateTime.Now <= x.EndDate)).Count() != 0); });
    185     }
    186180  }
    187181}
  • trunk/sources/HeuristicLab.Services.Hive/3.3/ServiceLocator.cs

    r9456 r9665  
    3939        if (hiveDao == null) hiveDao = new HiveDao();
    4040        return hiveDao;
     41      }
     42    }
     43
     44    public IOptimizedHiveDao OptimizedHiveDao {
     45      get {
     46        var dataContext = HiveOperationContext.Current != null
     47                            ? HiveOperationContext.Current.DataContext
     48                            : new HiveDataContext(Settings.Default.HeuristicLab_Hive_LinqConnectionString);
     49        return new OptimizedHiveDao(dataContext);
    4150      }
    4251    }
Note: See TracChangeset for help on using the changeset viewer.