Free cookie consent management tool by TermsFeed Policy Generator

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

#1260

  • implemented single sign on with services
  • fixed plugin-deployment
  • removed hive-specific userConfig sections
  • minor bugfixes
Location:
branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.ExperimentManager/3.3
Files:
1 added
2 deleted
7 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.ExperimentManager/3.3/HeuristicLab.Hive.ExperimentManager-3.3.csproj

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

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

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

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

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

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

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