Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/29/10 00:52:06 (14 years ago)
Author:
cneumuel
Message:

#1260

  • migrated to .NET 4.0
  • moved state-information about heartbeat timestamps into DB to reduce IIS-recycling issues
  • optimized memory usage of ExperimentManager when lots of large jobs are downloaded
Location:
branches/HeuristicLab.Hive-3.3/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.LINQDataAccess/3.3
Files:
7 edited

Legend:

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

    r5134 r5179  
    1111    <RootNamespace>HeuristicLab.Hive.Server.LINQDataAccess</RootNamespace>
    1212    <AssemblyName>HeuristicLab.Hive.Server.LINQDataAccess-3.3</AssemblyName>
    13     <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
     13    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
    1414    <FileAlignment>512</FileAlignment>
    1515    <SignAssembly>true</SignAssembly>
  • branches/HeuristicLab.Hive-3.3/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.LINQDataAccess/3.3/HiveDataContext.cs

    r5037 r5179  
    15661566    private bool _IsAllowedToCalculate;
    15671567   
     1568    private System.Nullable<System.DateTime> _LastHeartbeat;
     1569   
    15681570    private EntitySet<UptimeStatistic> _UptimeStatistics;
    15691571   
     
    15981600    partial void OnIsAllowedToCalculateChanging(bool value);
    15991601    partial void OnIsAllowedToCalculateChanged();
     1602    partial void OnLastHeartbeatChanging(System.Nullable<System.DateTime> value);
     1603    partial void OnLastHeartbeatChanged();
    16001604    #endregion
    16011605   
     
    18281832          this.SendPropertyChanged("IsAllowedToCalculate");
    18291833          this.OnIsAllowedToCalculateChanged();
     1834        }
     1835      }
     1836    }
     1837   
     1838    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_LastHeartbeat", DbType="DateTime")]
     1839    public System.Nullable<System.DateTime> LastHeartbeat
     1840    {
     1841      get
     1842      {
     1843        return this._LastHeartbeat;
     1844      }
     1845      set
     1846      {
     1847        if ((this._LastHeartbeat != value))
     1848        {
     1849          this.OnLastHeartbeatChanging(value);
     1850          this.SendPropertyChanging();
     1851          this._LastHeartbeat = value;
     1852          this.SendPropertyChanged("LastHeartbeat");
     1853          this.OnLastHeartbeatChanged();
    18301854        }
    18311855      }
     
    19952019   
    19962020    private int _MemoryNeeded;
     2021   
     2022    private System.Nullable<System.DateTime> _LastHeartbeat;
    19972023   
    19982024    private EntitySet<AssignedResource> _AssignedResources;
     
    20422068    partial void OnMemoryNeededChanging(int value);
    20432069    partial void OnMemoryNeededChanged();
     2070    partial void OnLastHeartbeatChanging(System.Nullable<System.DateTime> value);
     2071    partial void OnLastHeartbeatChanged();
    20442072    #endregion
    20452073   
     
    23632391          this.SendPropertyChanged("MemoryNeeded");
    23642392          this.OnMemoryNeededChanged();
     2393        }
     2394      }
     2395    }
     2396   
     2397    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_LastHeartbeat", DbType="DateTime")]
     2398    public System.Nullable<System.DateTime> LastHeartbeat
     2399    {
     2400      get
     2401      {
     2402        return this._LastHeartbeat;
     2403      }
     2404      set
     2405      {
     2406        if ((this._LastHeartbeat != value))
     2407        {
     2408          this.OnLastHeartbeatChanging(value);
     2409          this.SendPropertyChanging();
     2410          this._LastHeartbeat = value;
     2411          this.SendPropertyChanged("LastHeartbeat");
     2412          this.OnLastHeartbeatChanged();
    23652413        }
    23662414      }
  • branches/HeuristicLab.Hive-3.3/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.LINQDataAccess/3.3/HiveDataContext.dbml

    r5037 r5179  
    8080        <Column Name="FreeMemory" Type="System.Int32" DbType="Int" CanBeNull="true" />
    8181        <Column Name="IsAllowedToCalculate" Type="System.Boolean" DbType="Bit" CanBeNull="false" />
     82        <Column Name="LastHeartbeat" Type="System.DateTime" DbType="DateTime" CanBeNull="true" />
    8283        <Association Name="Slave_UptimeStatistic" Member="UptimeStatistics" ThisKey="ResourceId" OtherKey="ResourceId" Type="UptimeStatistic" />
    8384        <Association Name="Slave_Job" Member="Jobs" ThisKey="ResourceId" OtherKey="ResourceId" Type="Job" />
     
    106107      <Column Name="CoresNeeded" Type="System.Int32" DbType="Int NOT NULL" CanBeNull="false" />
    107108      <Column Name="MemoryNeeded" Type="System.Int32" DbType="Int NOT NULL" CanBeNull="false" />
     109      <Column Name="LastHeartbeat" Type="System.DateTime" DbType="DateTime" CanBeNull="true" />
    108110      <Association Name="Job_AssignedResource" Member="AssignedResources" ThisKey="JobId" OtherKey="JobId" Type="AssignedResource" />
    109111      <Association Name="Job_RequiredPlugin" Member="RequiredPlugins" ThisKey="JobId" OtherKey="JobId" Type="RequiredPlugin" />
  • branches/HeuristicLab.Hive-3.3/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.LINQDataAccess/3.3/HiveDataContext.dbml.layout

    r5037 r5179  
    4545      </nestedChildShapes>
    4646    </classShape>
    47     <classShape Id="706a4581-6daf-4e71-ae2a-87d50b27a051" absoluteBounds="12.375, 2.875, 2, 1.3862939453125005">
     47    <classShape Id="706a4581-6daf-4e71-ae2a-87d50b27a051" absoluteBounds="12.375, 2.875, 2, 1.3862939453124996">
    4848      <DataClassMoniker Name="/HiveDataContext/Resource" />
    4949      <nestedChildShapes>
     
    5151      </nestedChildShapes>
    5252    </classShape>
    53     <classShape Id="695bfc39-59f3-4e60-8644-f847964bf62c" absoluteBounds="9.25, 4.375, 2, 3.6939111328124987">
     53    <classShape Id="695bfc39-59f3-4e60-8644-f847964bf62c" absoluteBounds="9.25, 4.375, 2, 3.8862125651041666">
    5454      <DataClassMoniker Name="/HiveDataContext/Job" />
    5555      <nestedChildShapes>
    56         <elementListCompartment Id="a6a30e11-03d1-4869-82e6-b733f4ef9974" absoluteBounds="9.265, 4.835, 1.9700000000000002, 3.1339111328125" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
     56        <elementListCompartment Id="a6a30e11-03d1-4869-82e6-b733f4ef9974" absoluteBounds="9.265, 4.835, 1.9700000000000002, 3.3262125651041665" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
    5757      </nestedChildShapes>
    5858    </classShape>
     
    6969      </nestedChildShapes>
    7070    </classShape>
    71     <classShape Id="26f4edfa-91dd-4941-a058-359f89e567a8" absoluteBounds="7.75, 0.75, 2, 2.9247054036458326">
     71    <classShape Id="26f4edfa-91dd-4941-a058-359f89e567a8" absoluteBounds="7.75, 0.75, 2, 3.1170068359375">
    7272      <DataClassMoniker Name="/HiveDataContext/Slave" />
    7373      <nestedChildShapes>
    74         <elementListCompartment Id="1e61f36b-08dc-4df7-8594-c9dcd95c0791" absoluteBounds="7.7650000000000006, 1.21, 1.9700000000000002, 2.364705403645833" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
     74        <elementListCompartment Id="1e61f36b-08dc-4df7-8594-c9dcd95c0791" absoluteBounds="7.7650000000000006, 1.21, 1.9700000000000002, 2.5570068359375" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
    7575      </nestedChildShapes>
    7676    </classShape>
     
    8181      </nestedChildShapes>
    8282    </classShape>
    83     <inheritanceConnector edgePoints="[(12.375 : 3.27485270182292); (9.75 : 3.27485270182292)]" fixedFrom="NotFixed" fixedTo="NotFixed" TargetRelationshipDomainClassId="7a7fe09e-e9ef-4b01-9ff3-bde95e827b62">
     83    <inheritanceConnector edgePoints="[(12.375 : 3.37100341796875); (9.75 : 3.37100341796875)]" fixedFrom="Algorithm" fixedTo="Algorithm" TargetRelationshipDomainClassId="7a7fe09e-e9ef-4b01-9ff3-bde95e827b62">
    8484      <nodes>
    8585        <classShapeMoniker Id="706a4581-6daf-4e71-ae2a-87d50b27a051" />
     
    8787      </nodes>
    8888    </inheritanceConnector>
    89     <inheritanceConnector edgePoints="[(13.265623 : 4.2612939453125); (13.265623 : 4.625); (14.1354166666667 : 4.625 : JumpStart); (14.3020833333333 : 4.625 : JumpEnd); (16.375 : 4.625); (16.375 : 5)]" fixedFrom="NotFixed" fixedTo="NotFixed" TargetRelationshipDomainClassId="7a7fe09e-e9ef-4b01-9ff3-bde95e827b62">
     89    <inheritanceConnector edgePoints="[(13.265623 : 4.2612939453125); (13.265623 : 4.625); (14.1354166666667 : 4.625 : JumpStart); (14.3020833333333 : 4.625 : JumpEnd); (16.375 : 4.625); (16.375 : 5)]" fixedFrom="Algorithm" fixedTo="NotFixed" TargetRelationshipDomainClassId="7a7fe09e-e9ef-4b01-9ff3-bde95e827b62">
    9090      <nodes>
    9191        <classShapeMoniker Id="706a4581-6daf-4e71-ae2a-87d50b27a051" />
     
    9393      </nodes>
    9494    </inheritanceConnector>
    95     <associationConnector edgePoints="[(14.21875 : 4.2612939453125); (14.21875 : 8)]" fixedFrom="NotFixed" fixedTo="NotFixed">
     95    <associationConnector edgePoints="[(14.21875 : 4.2612939453125); (14.21875 : 8)]" fixedFrom="Algorithm" fixedTo="Algorithm">
    9696      <AssociationMoniker Name="/HiveDataContext/Resource/Resource_AssignedResource" />
    9797      <nodes>
     
    100100      </nodes>
    101101    </associationConnector>
    102     <associationConnector edgePoints="[(11.25 : 7.44314447265625); (14.6406275 : 7.44314447265625); (14.6406275 : 8)]" fixedFrom="NotFixed" fixedTo="NotFixed">
     102    <associationConnector edgePoints="[(11.25 : 7.44314447265625); (11.3854166666667 : 7.44314447265625 : JumpStart); (11.5520833333333 : 7.44314447265625 : JumpEnd); (11.6666666666667 : 7.44314447265625 : JumpStart); (11.8333333333333 : 7.44314447265625 : JumpEnd); (12.3854166666667 : 7.44314447265625 : JumpStart); (12.5520833333333 : 7.44314447265625 : JumpEnd); (14.1354166666667 : 7.44314447265625 : JumpStart); (14.3020833333333 : 7.44314447265625 : JumpEnd); (14.6406275 : 7.44314447265625); (14.6406275 : 8)]" fixedFrom="NotFixed" fixedTo="NotFixed">
    103103      <AssociationMoniker Name="/HiveDataContext/Job/Job_AssignedResource" />
    104104      <nodes>
     
    107107      </nodes>
    108108    </associationConnector>
    109     <associationConnector edgePoints="[(8 : 3.67470540364583); (8 : 8.375)]" fixedFrom="NotFixed" fixedTo="NotFixed">
     109    <associationConnector edgePoints="[(8 : 3.8670068359375); (8 : 8.375)]" fixedFrom="Algorithm" fixedTo="Algorithm">
    110110      <AssociationMoniker Name="/HiveDataContext/Slave/Slave_UptimeStatistic" />
    111111      <nodes>
     
    114114      </nodes>
    115115    </associationConnector>
    116     <associationConnector edgePoints="[(16.375 : 5.8093896484375); (16.375 : 13.0681469726563); (11.625 : 13.0681469726563)]" fixedFrom="NotFixed" fixedTo="NotFixed">
     116    <associationConnector edgePoints="[(16.375 : 5.8093896484375); (16.375 : 13.0681469726563); (12.5520833333333 : 13.0681469726563 : JumpStart); (12.3854166666667 : 13.0681469726563 : JumpEnd); (11.625 : 13.0681469726563)]" fixedFrom="NotFixed" fixedTo="Algorithm">
    117117      <AssociationMoniker Name="/HiveDataContext/SlaveGroup/SlaveGroup_SlaveGroup_Resource" />
    118118      <nodes>
     
    121121      </nodes>
    122122    </associationConnector>
    123     <associationConnector edgePoints="[(13.265623 : 4.2612939453125); (13.265623 : 5.25); (11.75 : 5.25); (11.75 : 9); (11.875 : 9); (11.875 : 12.6903214863281); (11.625 : 12.6903214863281)]" fixedFrom="NotFixed" fixedTo="NotFixed">
     123    <associationConnector edgePoints="[(13.265623 : 4.2612939453125); (13.265623 : 5.25); (11.75 : 5.25); (11.75 : 9); (11.875 : 9); (11.875 : 13.0681469726563); (11.625 : 13.0681469726563)]" fixedFrom="Algorithm" fixedTo="Algorithm">
    124124      <AssociationMoniker Name="/HiveDataContext/Resource/Resource_SlaveGroup_Resource" />
    125125      <nodes>
     
    142142      </nodes>
    143143    </associationConnector>
    144     <associationConnector edgePoints="[(5 : 8.5); (5 : 2.21235270182292); (7.75 : 2.21235270182292)]" fixedFrom="NotFixed" fixedTo="NotFixed">
     144    <associationConnector edgePoints="[(5 : 8.5); (5 : 2.30850341796875); (7.75 : 2.30850341796875)]" fixedFrom="Algorithm" fixedTo="Algorithm">
    145145      <AssociationMoniker Name="/HiveDataContext/SlaveConfig/SlaveConfig_Slave" />
    146146      <nodes>
     
    149149      </nodes>
    150150    </associationConnector>
    151     <associationConnector edgePoints="[(10.25 : 8.0689111328125); (10.25 : 8.3189111328125); (10.6930769230769 : 8.3189111328125); (10.6930769230769 : 8.0689111328125)]" fixedFrom="NotFixed" fixedTo="NotFixed">
     151    <associationConnector edgePoints="[(9.95923076923077 : 8.26121256510417); (9.95923076923077 : 8.51121256510417); (10.5546153846154 : 8.51121256510417); (10.5546153846154 : 8.26121256510417)]" fixedFrom="NotFixed" fixedTo="NotFixed">
    152152      <AssociationMoniker Name="/HiveDataContext/Job/Job_Job" />
    153153      <nodes>
     
    156156      </nodes>
    157157    </associationConnector>
    158     <associationConnector edgePoints="[(8.40625 : 16.875); (8.40625 : 6.22195556640625); (9.25 : 6.22195556640625)]" fixedFrom="NotFixed" fixedTo="NotFixed">
     158    <associationConnector edgePoints="[(8.40625 : 16.875); (8.40625 : 6.31810628255208); (9.25 : 6.31810628255208)]" fixedFrom="NotFixed" fixedTo="NotFixed">
    159159      <AssociationMoniker Name="/HiveDataContext/Project/Project_Job" />
    160160      <nodes>
     
    163163      </nodes>
    164164    </associationConnector>
    165     <associationConnector edgePoints="[(9.5 : 3.67470540364583); (9.5 : 4.375)]" fixedFrom="NotFixed" fixedTo="NotFixed">
     165    <associationConnector edgePoints="[(9.5 : 3.8670068359375); (9.5 : 4.375)]" fixedFrom="Algorithm" fixedTo="Algorithm">
    166166      <AssociationMoniker Name="/HiveDataContext/Slave/Slave_Job" />
    167167      <nodes>
     
    170170      </nodes>
    171171    </associationConnector>
    172     <associationConnector edgePoints="[(12.375 : 3.99924967447917); (11.46875 : 3.99924967447917); (11.46875 : 9.25)]" fixedFrom="NotFixed" fixedTo="NotFixed">
     172    <associationConnector edgePoints="[(12.375 : 3.99924967447917); (11.46875 : 3.99924967447917); (11.46875 : 9.25)]" fixedFrom="Algorithm" fixedTo="Algorithm">
    173173      <AssociationMoniker Name="/HiveDataContext/Resource/Resource_UptimeCalendar" />
    174174      <nodes>
     
    177177      </nodes>
    178178    </associationConnector>
    179     <associationConnector edgePoints="[(9.40625 : 8.0689111328125); (9.40625 : 11.8902498372396); (8 : 11.8902498372396)]" fixedFrom="NotFixed" fixedTo="NotFixed">
     179    <associationConnector edgePoints="[(9.40625 : 8.26121256510417); (9.40625 : 11.8902498372396); (8.48958333333333 : 11.8902498372396 : JumpStart); (8.32291666666667 : 11.8902498372396 : JumpEnd); (8 : 11.8902498372396)]" fixedFrom="NotFixed" fixedTo="NotFixed">
    180180      <AssociationMoniker Name="/HiveDataContext/Job/Job_HiveExperiment" />
    181181      <nodes>
  • branches/HeuristicLab.Hive-3.3/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.LINQDataAccess/3.3/JobDao.cs

    r5093 r5179  
    2727using HeuristicLab.Hive.Contracts.BusinessObjects;
    2828using HeuristicLab.Hive.Server.DataAccess;
     29using HeuristicLab.Hive.Contracts;
    2930
    3031namespace HeuristicLab.Hive.Server.LINQDataAccess {
     
    233234    }
    234235
     236    public IEnumerable<JobDto> FindTimeoutJobs() {
     237      return (from job in Context.Jobs
     238               where job.JobState == "Calculating" &&
     239                      (!job.LastHeartbeat.HasValue ||
     240                       job.LastHeartbeat.Value.AddSeconds(ApplicationConstants.JOB_TIME_TO_LIVE_SECONDS) < DateTime.Now)
     241               select EntityToDto(job, null)).ToArray();
     242    }
     243
    235244    #endregion
    236245
     
    256265      target.UserId = source.UserId;
    257266      target.ParentJobId = source.ParentJobId;
    258      
     267      target.LastHeartbeat = source.LastHeartbeat;
    259268
    260269      foreach (Guid assignRessourceId in source.AssignedResourceIds) {
     
    291300      target.UserId = source.UserId;
    292301      target.ParentJobId = source.ParentJobId;
    293      
     302      target.LastHeartbeat = source.LastHeartbeat;
     303
    294304      target.AssignedResourceIds = source.AssignedResources.Select(x => x.ResourceId).ToList();
    295305
  • branches/HeuristicLab.Hive-3.3/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.LINQDataAccess/3.3/SlaveDao.cs

    r4424 r5179  
    103103      target.NumberOfFreeCores = source.NrOfFreeCores;
    104104      target.Status = source.State.ToString();
     105      target.LastHeartbeat = source.LastHeartbeat;
    105106      return target;
    106107    }
     
    122123      target.State = (SlaveState)Enum.Parse(typeof(SlaveState), source.Status, true);
    123124      target.IsAllowedToCalculate = source.IsAllowedToCalculate;
     125      target.LastHeartbeat = source.LastHeartbeat;
    124126      return target;
    125127    }
  • branches/HeuristicLab.Hive-3.3/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.LINQDataAccess/3.3/app.config

    r4710 r5179  
    66        <add name="HeuristicLab.Hive.Server.LINQDataAccess.Properties.Settings.HeuristicLab_Hive_LinqConnectionString" connectionString="Data Source=localhost;Initial Catalog=HeuristicLab.Hive;Integrated Security=True;" providerName="System.Data.SqlClient"/>
    77    </connectionStrings>
    8 <startup><supportedRuntime version="v2.0.50727"/></startup></configuration>
     8<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration>
Note: See TracChangeset for help on using the changeset viewer.