Free cookie consent management tool by TermsFeed Policy Generator

Changeset 9508


Ignore:
Timestamp:
05/22/13 15:29:15 (12 years ago)
Author:
fschoepp
Message:

#1888:
HL:

  • Web projects requires different users to interact with hive. The singleton HiveServiceLocator.Instance doesn't allow different users at the same time, resulting in serialization during access of HiveClient methods.

The following changes have been introduced in favor of a parallel use of the HL libs:

  • HiveClient, TaskDownloader and ConcurrentTaskDownloader may now use a different IHiveServiceLocator than HiveServiceLocator.Instance (all methods have appropriate overloads now).
  • The default instance is still HiveServiceLocator.Instance.

Automated Scaling of Instances:

  • Added Scaler project to solution which represents a WorkerRole that scales the slave instances based on the global cpu utilization of all slaves.
  • Scaler is based on WASABi, rules can be adjusted in rulesstore.xml. Basic rule is: if < 45% global cpu utilization => remove an instance; if > 65% cpu => add an instance. Minimum boundary is 1 and maximum boundary is 8 slave instances.
  • Adjusted Slave project to automatically register itself to a SlaveGroup during WebRole startup (can be adjusted in service configuration).

Web-Frontend:

  • Added basic error messages to the dialogs when an ajax call fails.
  • Removed Styling.js from scripts.
Location:
branches/OaaS
Files:
16 added
26 edited

Legend:

Unmodified
Added
Removed
  • branches/OaaS/HeuristicLab 3.3 Services.sln

    r9253 r9508  
    6767EndProject
    6868Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Services.Optimization.ControllerService.Tests", "HeuristicLab.Services.Optimization.ControllerService.Tests\HeuristicLab.Services.Optimization.ControllerService.Tests.csproj", "{D6DD768C-707C-415A-B9F8-C1F7668F8560}"
     69EndProject
     70Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Services.Optimization.Scaler", "HeuristicLab.Services.Hive.Scaler\HeuristicLab.Services.Optimization.Scaler.csproj", "{D03B1A10-9C88-4C4B-BCCF-4F98CDE863D3}"
    6971EndProject
    7072Global
     
    346348    {D6DD768C-707C-415A-B9F8-C1F7668F8560}.Release|x86.ActiveCfg = Release|x86
    347349    {D6DD768C-707C-415A-B9F8-C1F7668F8560}.Release|x86.Build.0 = Release|x86
     350    {D03B1A10-9C88-4C4B-BCCF-4F98CDE863D3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
     351    {D03B1A10-9C88-4C4B-BCCF-4F98CDE863D3}.Debug|Any CPU.Build.0 = Debug|Any CPU
     352    {D03B1A10-9C88-4C4B-BCCF-4F98CDE863D3}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
     353    {D03B1A10-9C88-4C4B-BCCF-4F98CDE863D3}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
     354    {D03B1A10-9C88-4C4B-BCCF-4F98CDE863D3}.Debug|x64.ActiveCfg = Debug|Any CPU
     355    {D03B1A10-9C88-4C4B-BCCF-4F98CDE863D3}.Debug|x86.ActiveCfg = Debug|Any CPU
     356    {D03B1A10-9C88-4C4B-BCCF-4F98CDE863D3}.Release|Any CPU.ActiveCfg = Release|Any CPU
     357    {D03B1A10-9C88-4C4B-BCCF-4F98CDE863D3}.Release|Any CPU.Build.0 = Release|Any CPU
     358    {D03B1A10-9C88-4C4B-BCCF-4F98CDE863D3}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
     359    {D03B1A10-9C88-4C4B-BCCF-4F98CDE863D3}.Release|Mixed Platforms.Build.0 = Release|Any CPU
     360    {D03B1A10-9C88-4C4B-BCCF-4F98CDE863D3}.Release|x64.ActiveCfg = Release|Any CPU
     361    {D03B1A10-9C88-4C4B-BCCF-4F98CDE863D3}.Release|x86.ActiveCfg = Release|Any CPU
    348362  EndGlobalSection
    349363  GlobalSection(SolutionProperties) = preSolution
    350364    HideSolutionNode = FALSE
    351365  EndGlobalSection
     366  GlobalSection(ExtensibilityGlobals) = postSolution
     367    EnterpriseLibraryConfigurationToolBinariesPath = packages\Unity.2.1.505.2\lib\NET35;packages\Unity.Interception.2.1.505.2\lib\NET35;packages\EnterpriseLibrary.Common.5.0.505.0\lib\NET35;packages\EnterpriseLibrary.WindowsAzure.Autoscaling.5.0.1118.2\lib\NET4;packages\EnterpriseLibrary.WindowsAzure.Autoscaling.5.0.1118.2\DesignTime
     368  EndGlobalSection
    352369EndGlobal
  • branches/OaaS/HeuristicLab.Clients.Hive.Slave.Azure/ServiceConfiguration.Cloud.cscfg

    r9371 r9508  
    44    <Instances count="1" />
    55    <ConfigurationSettings>
    6       <Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" value="ADJUST_ME" />
    7       <Setting name="HiveServerAddress" value="http://optimization1.cloudapp.net/HiveService.svc" />
     6      <!--Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" value="UseDevelopmentStorage=true" />-->
     7      <Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" value="DefaultEndpointsProtocol=https;AccountName=ADJUST_ME;AccountKey=ADJUST_ME" />
     8      <Setting name="HiveServerAddress" value="http://optimization.cloudapp.net/HiveService.svc" />
    89      <Setting name="HiveServerCertifcateEncodedValue" value="ADJUST_ME" />
     10      <Setting name="HiveServerUsername" value="ADJUST_ME" />
     11      <Setting name="HiveServerPassword" value="ADJUST_ME" />
     12      <Setting name="HiveGroup" value="TESTAZURE" />
    913    </ConfigurationSettings>
     14    <Certificates>
     15    </Certificates>
    1016  </Role>
    1117</ServiceConfiguration>
  • branches/OaaS/HeuristicLab.Clients.Hive.Slave.Azure/ServiceConfiguration.Local.cscfg

    r9371 r9508  
    66      <Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" value="UseDevelopmentStorage=true" />
    77      <Setting name="HiveServerAddress" value="http://127.0.0.1:81/HiveService.svc" />
     8      <!--Setting name="HiveServerAddress" value="http://optimization1.cloudapp.net/HiveService.svc" />-->
    89      <Setting name="HiveServerCertifcateEncodedValue" value="ADJUST_ME" />
     10      <Setting name="HiveServerUsername" value="ADJUST_ME" />
     11      <Setting name="HiveServerPassword" value="ADJUST_ME" />
     12      <Setting name="HiveGroup" value="TESTAZURE" />
    913    </ConfigurationSettings>
     14    <Certificates>
     15    </Certificates>
    1016  </Role>
    1117</ServiceConfiguration>
  • branches/OaaS/HeuristicLab.Clients.Hive.Slave.Azure/ServiceDefinition.build.csdef

    r8251 r9508  
    1717      <Setting name="HiveServerAddress" />
    1818      <Setting name="HiveServerCertifcateEncodedValue" />
     19      <Setting name="HiveServerUsername" />
     20      <Setting name="HiveServerPassword" />
     21      <Setting name="HiveGroup" />
    1922    </ConfigurationSettings>
    2023  </WorkerRole>
  • branches/OaaS/HeuristicLab.Clients.Hive.Slave.Azure/ServiceDefinition.csdef

    r8251 r9508  
    88      <Setting name="HiveServerAddress" />
    99      <Setting name="HiveServerCertifcateEncodedValue" />
     10      <Setting name="HiveServerUsername" />
     11      <Setting name="HiveServerPassword" />
     12      <Setting name="HiveGroup" />
    1013    </ConfigurationSettings>
    1114  </WorkerRole>
  • branches/OaaS/HeuristicLab.Clients.Hive.Slave.AzureClient/3.3/HeuristicLab.Clients.Hive.Slave.AzureClient-3.3.csproj

    r8243 r9508  
    3939  </PropertyGroup>
    4040  <ItemGroup>
     41    <Reference Include="HeuristicLab.Clients.Hive-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
     42      <SpecificVersion>False</SpecificVersion>
     43      <HintPath>..\..\bin\HeuristicLab.Clients.Hive-3.3.dll</HintPath>
     44    </Reference>
     45    <Reference Include="HeuristicLab.Common-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
     46      <SpecificVersion>False</SpecificVersion>
     47      <HintPath>..\..\bin\HeuristicLab.Common-3.3.dll</HintPath>
     48    </Reference>
     49    <Reference Include="HeuristicLab.Core-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
     50      <SpecificVersion>False</SpecificVersion>
     51      <HintPath>..\..\bin\HeuristicLab.Core-3.3.dll</HintPath>
     52    </Reference>
    4153    <Reference Include="Microsoft.WindowsAzure.Configuration, Version=1.7.0.0, Culture=neutral, processorArchitecture=MSIL">
    4254      <HintPath>..\packages\Microsoft.WindowsAzure.ConfigurationManager.1.7.0.0\lib\net35-full\Microsoft.WindowsAzure.Configuration.dll</HintPath>
     
    5062    <Reference Include="System.Core" />
    5163    <Reference Include="System.Data.Services.Client" />
     64    <Reference Include="System.Runtime.Serialization" />
    5265    <Reference Include="System.Xml.Linq" />
    5366    <Reference Include="System.Data.DataSetExtensions" />
     
    5871  <ItemGroup>
    5972    <Compile Include="Constants.cs" />
     73    <Compile Include="HiveHelper.cs" />
    6074    <Compile Include="Properties\AssemblyInfo.cs" />
    6175    <Compile Include="WorkerRole.cs" />
  • branches/OaaS/HeuristicLab.Clients.Hive.Slave.AzureClient/3.3/WorkerRole.cs

    r9375 r9508  
    3434
    3535  public class WorkerRole : RoleEntryPoint {
    36     private Core core;
     36    private HeuristicLab.Clients.Hive.SlaveCore.Core core;
    3737    private Thread coreThread;
    3838
     
    4343      try {
    4444        LogError(new Exception("Starting Run()..."));
    45         core = new Core(false);
     45        core = new HeuristicLab.Clients.Hive.SlaveCore.Core(false);
    4646
    4747        string hiveServerAddress = RoleEnvironment.GetConfigurationSettingValue(HiveServerAddressSetting);
     
    5555        coreThread = new Thread(core.Start);
    5656        coreThread.Start();
     57
     58        WcfService.Instance.Connected += new EventHandler((sender, e) => {
     59          HiveHelper.RegisterSlaveToGroup(RoleEnvironment.GetConfigurationSettingValue("HiveGroup"));
     60        });
    5761
    5862        LogError(new Exception("Run(): Core started successfullly"));
  • branches/OaaS/HeuristicLab.Clients.Hive/3.3/ConcurrentTaskDownloader.cs

    r9363 r9508  
    3535    private Semaphore downloadSemaphore;
    3636    private Semaphore deserializeSemaphore;
     37    private IHiveServiceLocator locator;
    3738
    38     public ConcurrentTaskDownloader(int concurrentDownloads, int concurrentDeserializations) {
     39    public ConcurrentTaskDownloader(int concurrentDownloads, int concurrentDeserializations) : this(concurrentDownloads, concurrentDeserializations, HiveServiceLocator.Instance) {     
     40    }
     41
     42    public ConcurrentTaskDownloader(int concurrentDownloads, int concurrentDeserializations, IHiveServiceLocator locator) {
    3943      downloadSemaphore = new Semaphore(concurrentDownloads, concurrentDownloads);
     44      this.locator = locator;
    4045      deserializeSemaphore = new Semaphore(concurrentDeserializations, concurrentDeserializations);
    4146    }
     
    7075      Task t = null;
    7176      HiveClient.TryAndRepeat(() => {
    72         t = HiveServiceLocator.Instance.CallHiveService(s => s.GetTask((Guid)taskId));
     77        t = locator.CallHiveService(s => s.GetTask((Guid)taskId));
    7378      }, Settings.Default.MaxRepeatServiceCalls, "Failed to download task.");
    7479      return t;
     
    8590        if (abort) return null;
    8691        HiveClient.TryAndRepeat(() => {
    87           result = HiveServiceLocator.Instance.CallHiveService(s => s.GetTaskData(task.Id));
     92          result = locator.CallHiveService(s => s.GetTaskData(task.Id));
    8893        }, Settings.Default.MaxRepeatServiceCalls, "Failed to download task data.");
    8994      }
  • branches/OaaS/HeuristicLab.Clients.Hive/3.3/HiveClient.cs

    r9363 r9508  
    7474      set { isAllowedPrivileged = value; }
    7575    }
     76
     77    private IHiveServiceLocator serviceLocator;
     78    public IHiveServiceLocator ServiceLocator
     79    {
     80      get {
     81        if (serviceLocator == null)
     82          serviceLocator = HiveServiceLocator.Instance;
     83        return serviceLocator;
     84      }
     85      set { serviceLocator = value; }
     86    }
     87
    7688    #endregion
     89
     90
    7791
    7892    private HiveClient() {
     
    107121
    108122      try {
    109         IsAllowedPrivileged = HiveServiceLocator.Instance.CallHiveService((s) => s.IsAllowedPrivileged());
     123        IsAllowedPrivileged = ServiceLocator.CallHiveService((s) => s.IsAllowedPrivileged());
    110124
    111125        jobs = new HiveItemCollection<RefreshableJob>();
    112         var jobsLoaded = HiveServiceLocator.Instance.CallHiveService<IEnumerable<Job>>(s => s.GetJobs());
     126        var jobsLoaded = ServiceLocator.CallHiveService<IEnumerable<Job>>(s => s.GetJobs());
    113127
    114128        foreach (var j in jobsLoaded) {
     
    144158    #region Store
    145159    public static void Store(IHiveItem item, CancellationToken cancellationToken) {
     160      Store(item, cancellationToken, HiveServiceLocator.Instance);
     161    }
     162
     163    public static void Store(IHiveItem item, CancellationToken cancellationToken, IHiveServiceLocator locator) {
    146164      if (item.Id == Guid.Empty) {
    147165        if (item is RefreshableJob) {
    148           HiveClient.Instance.UploadJob((RefreshableJob)item, cancellationToken);
     166          HiveClient.Instance.UploadJob((RefreshableJob)item, cancellationToken, locator);
    149167        }
    150168        if (item is JobPermission) {
    151169          var hep = (JobPermission)item;
    152           hep.GrantedUserId = HiveServiceLocator.Instance.CallHiveService((s) => s.GetUserIdByUsername(hep.GrantedUserName));
     170          hep.GrantedUserId = locator.CallHiveService((s) => s.GetUserIdByUsername(hep.GrantedUserName));
    153171          if (hep.GrantedUserId == Guid.Empty) {
    154172            throw new ArgumentException(string.Format("The user {0} was not found.", hep.GrantedUserName));
    155173          }
    156           HiveServiceLocator.Instance.CallHiveService((s) => s.GrantPermission(hep.JobId, hep.GrantedUserId, hep.Permission));
     174          locator.CallHiveService((s) => s.GrantPermission(hep.JobId, hep.GrantedUserId, hep.Permission));
    157175        }
    158176      } else {
    159177        if (item is Job)
    160           HiveServiceLocator.Instance.CallHiveService(s => s.UpdateJob((Job)item));
    161       }
    162     }
     178          locator.CallHiveService(s => s.UpdateJob((Job)item));
     179      }
     180    }
     181
    163182    public static void StoreAsync(Action<Exception> exceptionCallback, IHiveItem item, CancellationToken cancellationToken) {
     183      StoreAsync(exceptionCallback, item, cancellationToken, HiveServiceLocator.Instance);
     184    }
     185
     186    public static void StoreAsync(Action<Exception> exceptionCallback, IHiveItem item, CancellationToken cancellationToken, IHiveServiceLocator locator) {
    164187      var call = new Func<Exception>(delegate() {
    165188        try {
    166           Store(item, cancellationToken);
     189          Store(item, cancellationToken, locator);
    167190        }
    168191        catch (Exception ex) {
     
    180203    #region Delete
    181204    public static void Delete(IHiveItem item) {
     205      Delete(item, HiveServiceLocator.Instance);
     206    }
     207
     208    public static void Delete(IHiveItem item, IHiveServiceLocator locator) {
    182209      if (item.Id == Guid.Empty && item.GetType() != typeof(JobPermission))
    183210        return;
    184211
    185212      if (item is Job)
    186         HiveServiceLocator.Instance.CallHiveService(s => s.DeleteJob(item.Id));
     213        locator.CallHiveService(s => s.DeleteJob(item.Id));
    187214      if (item is RefreshableJob) {
    188215        RefreshableJob job = (RefreshableJob)item;
     
    190217          job.StopResultPolling();
    191218        }
    192         HiveServiceLocator.Instance.CallHiveService(s => s.DeleteJob(item.Id));
     219        locator.CallHiveService(s => s.DeleteJob(item.Id));
    193220      }
    194221      if (item is JobPermission) {
    195222        var hep = (JobPermission)item;
    196         HiveServiceLocator.Instance.CallHiveService(s => s.RevokePermission(hep.JobId, hep.GrantedUserId));
     223        locator.CallHiveService(s => s.RevokePermission(hep.JobId, hep.GrantedUserId));
    197224      }
    198225      item.Id = Guid.Empty;
     
    219246
    220247    public static void StartJob(Action<Exception> exceptionCallback, RefreshableJob refreshableJob, CancellationToken cancellationToken) {
     248      StartJob(exceptionCallback, refreshableJob, cancellationToken, HiveServiceLocator.Instance);
     249    }
     250
     251    public static void StartJob(Action<Exception> exceptionCallback, RefreshableJob refreshableJob, CancellationToken cancellationToken, IHiveServiceLocator locator) {
    221252      HiveClient.StoreAsync(
    222253        new Action<Exception>((Exception ex) => {
    223254          refreshableJob.ExecutionState = ExecutionState.Prepared;
    224255          exceptionCallback(ex);
    225         }), refreshableJob, cancellationToken);
     256        }), refreshableJob, cancellationToken, locator);
    226257      refreshableJob.ExecutionState = ExecutionState.Started;
    227258    }
    228259
    229260    public static void PauseJob(RefreshableJob refreshableJob) {
    230       HiveServiceLocator.Instance.CallHiveService(service => {
     261      PauseJob(refreshableJob, HiveServiceLocator.Instance);
     262    }
     263
     264    public static void PauseJob(RefreshableJob refreshableJob, IHiveServiceLocator locator) {
     265      locator.CallHiveService(service => {
    231266        foreach (HiveTask task in refreshableJob.GetAllHiveTasks()) {
    232267          if (task.Task.State != TaskState.Finished && task.Task.State != TaskState.Aborted && task.Task.State != TaskState.Failed)
     
    238273
    239274    public static void StopJob(RefreshableJob refreshableJob) {
    240       HiveServiceLocator.Instance.CallHiveService(service => {
     275      StopJob(refreshableJob, HiveServiceLocator.Instance);
     276    }
     277
     278    public static void StopJob(RefreshableJob refreshableJob, IHiveServiceLocator locator) {
     279      locator.CallHiveService(service => {
    241280        foreach (HiveTask task in refreshableJob.GetAllHiveTasks()) {
    242281          if (task.Task.State != TaskState.Finished && task.Task.State != TaskState.Aborted && task.Task.State != TaskState.Failed)
     
    248287
    249288    public static void ResumeJob(RefreshableJob refreshableJob) {
    250       HiveServiceLocator.Instance.CallHiveService(service => {
     289      ResumeJob(refreshableJob, HiveServiceLocator.Instance);
     290    }
     291
     292    public static void ResumeJob(RefreshableJob refreshableJob, IHiveServiceLocator locator) {
     293      locator.CallHiveService(service => {
    251294        foreach (HiveTask task in refreshableJob.GetAllHiveTasks()) {
    252295          if (task.Task.State == TaskState.Paused) {
     
    262305    private static object jobCountLocker = new object();
    263306    private static object pluginLocker = new object();
    264     private void UploadJob(RefreshableJob refreshableJob, CancellationToken cancellationToken) {
     307    private void UploadJob(RefreshableJob refreshableJob, CancellationToken cancellationToken)
     308    {
     309      UploadJob(refreshableJob, cancellationToken, HiveServiceLocator.Instance);
     310    }
     311
     312    private void UploadJob(RefreshableJob refreshableJob, CancellationToken cancellationToken, IHiveServiceLocator locator) {
    265313      try {
    266314        refreshableJob.IsProgressing = true;
     
    269317        var resourceIds = new List<Guid>();
    270318        foreach (var resourceName in resourceNames) {
    271           Guid resourceId = HiveServiceLocator.Instance.CallHiveService((s) => s.GetResourceId(resourceName));
     319          Guid resourceId = locator.CallHiveService((s) => s.GetResourceId(resourceName));
    272320          if (resourceId == Guid.Empty) {
    273321            throw new ResourceNotFoundException(string.Format("Could not find the resource '{0}'", resourceName));
     
    282330        // upload Job
    283331        refreshableJob.Progress.Status = "Uploading Job...";
    284         refreshableJob.Job.Id = HiveServiceLocator.Instance.CallHiveService((s) => s.AddJob(refreshableJob.Job));
     332        refreshableJob.Job.Id = locator.CallHiveService((s) => s.AddJob(refreshableJob.Job));
    285333        bool isPrivileged = refreshableJob.Job.IsPrivileged;
    286         refreshableJob.Job = HiveServiceLocator.Instance.CallHiveService((s) => s.GetJob(refreshableJob.Job.Id)); // update owner and permissions
     334        refreshableJob.Job = locator.CallHiveService((s) => s.GetJob(refreshableJob.Job.Id)); // update owner and permissions
    287335        refreshableJob.Job.IsPrivileged = isPrivileged;
    288336        cancellationToken.ThrowIfCancellationRequested();
     
    294342        // upload plugins
    295343        refreshableJob.Progress.Status = "Uploading plugins...";
    296         this.OnlinePlugins = HiveServiceLocator.Instance.CallHiveService((s) => s.GetPlugins());
     344        this.OnlinePlugins = locator.CallHiveService((s) => s.GetPlugins());
    297345        this.AlreadyUploadedPlugins = new List<Plugin>();
    298         Plugin configFilePlugin = HiveServiceLocator.Instance.CallHiveService((s) => UploadConfigurationFile(s, onlinePlugins));
     346        Plugin configFilePlugin = locator.CallHiveService((s) => UploadConfigurationFile(s, onlinePlugins));
    299347        this.alreadyUploadedPlugins.Add(configFilePlugin);
    300348        cancellationToken.ThrowIfCancellationRequested();
     
    306354        foreach (HiveTask hiveTask in refreshableJob.HiveTasks) {
    307355          var task = TS.Task.Factory.StartNew((hj) => {
    308             UploadTaskWithChildren(refreshableJob.Progress, (HiveTask)hj, null, resourceIds, jobCount, totalJobCount, configFilePlugin.Id, refreshableJob.Job.Id, refreshableJob.Log, refreshableJob.Job.IsPrivileged, cancellationToken);
     356            UploadTaskWithChildren(refreshableJob.Progress, (HiveTask)hj, null, resourceIds, jobCount, totalJobCount, configFilePlugin.Id, refreshableJob.Job.Id, refreshableJob.Log, refreshableJob.Job.IsPrivileged, cancellationToken, locator);
    309357          }, hiveTask);
    310358          task.ContinueWith((x) => refreshableJob.Log.LogException(x.Exception), TaskContinuationOptions.OnlyOnFaulted);
     
    347395    }
    348396
     397    private void UploadTaskWithChildren(Progress progress, HiveTask hiveTask, HiveTask parentHiveTask, IEnumerable<Guid> groups, int[] taskCount, int totalJobCount, Guid configPluginId, Guid jobId, ILog log, bool isPrivileged, CancellationToken cancellationToken)
     398    {
     399      UploadTaskWithChildren(progress, hiveTask, parentHiveTask, groups, taskCount, totalJobCount, configPluginId, jobId, log, isPrivileged, cancellationToken, HiveServiceLocator.Instance);
     400    }
     401
    349402    /// <summary>
    350403    /// Uploads the given task and all its child-jobs while setting the proper parentJobId values for the childs
    351404    /// </summary>
    352405    /// <param name="parentHiveTask">shall be null if its the root task</param>
    353     private void UploadTaskWithChildren(Progress progress, HiveTask hiveTask, HiveTask parentHiveTask, IEnumerable<Guid> groups, int[] taskCount, int totalJobCount, Guid configPluginId, Guid jobId, ILog log, bool isPrivileged, CancellationToken cancellationToken) {
     406    private void UploadTaskWithChildren(Progress progress, HiveTask hiveTask, HiveTask parentHiveTask, IEnumerable<Guid> groups, int[] taskCount, int totalJobCount, Guid configPluginId, Guid jobId, ILog log, bool isPrivileged, CancellationToken cancellationToken, IHiveServiceLocator locator) {
    354407      taskUploadSemaphore.WaitOne();
    355408      bool semaphoreReleased = false;
     
    376429          if (!cancellationToken.IsCancellationRequested) {
    377430            lock (pluginLocker) {
    378               HiveServiceLocator.Instance.CallHiveService((s) => hiveTask.Task.PluginsNeededIds = PluginUtil.GetPluginDependencies(s, this.onlinePlugins, this.alreadyUploadedPlugins, plugins));
     431              locator.CallHiveService((s) => hiveTask.Task.PluginsNeededIds = PluginUtil.GetPluginDependencies(s, this.onlinePlugins, this.alreadyUploadedPlugins, plugins));
    379432            }
    380433          }
     
    389442          if (!cancellationToken.IsCancellationRequested) {
    390443            if (parentHiveTask != null) {
    391               hiveTask.Task.Id = HiveServiceLocator.Instance.CallHiveService((s) => s.AddChildTask(parentHiveTask.Task.Id, hiveTask.Task, taskData));
     444              hiveTask.Task.Id = locator.CallHiveService((s) => s.AddChildTask(parentHiveTask.Task.Id, hiveTask.Task, taskData));
    392445            } else {
    393               hiveTask.Task.Id = HiveServiceLocator.Instance.CallHiveService((s) => s.AddTask(hiveTask.Task, taskData, groups.ToList()));
     446              hiveTask.Task.Id = locator.CallHiveService((s) => s.AddTask(hiveTask.Task, taskData, groups.ToList()));
    394447            }
    395448          }
     
    406459          var task = TS.Task.Factory.StartNew((tuple) => {
    407460            var arguments = (Tuple<HiveTask, HiveTask>)tuple;
    408             UploadTaskWithChildren(progress, arguments.Item1, arguments.Item2, groups, taskCount, totalJobCount, configPluginId, jobId, log, isPrivileged, cancellationToken);
     461            UploadTaskWithChildren(progress, arguments.Item1, arguments.Item2, groups, taskCount, totalJobCount, configPluginId, jobId, log, isPrivileged, cancellationToken, locator);
    409462          }, new Tuple<HiveTask, HiveTask>(child, hiveTask));
    410463          task.ContinueWith((x) => log.LogException(x.Exception), TaskContinuationOptions.OnlyOnFaulted);
     
    421474
    422475    #region Download Experiment
    423     public static void LoadJob(RefreshableJob refreshableJob) {
     476    public static void LoadJob(RefreshableJob refreshableJob)
     477    {
     478      LoadJob(refreshableJob, HiveServiceLocator.Instance);
     479    }
     480
     481    public static void LoadJob(RefreshableJob refreshableJob, IHiveServiceLocator locator)
     482    {
    424483      var hiveExperiment = refreshableJob.Job;
    425484      refreshableJob.IsProgressing = true;
     
    434493        // fetch all task objects to create the full tree of tree of HiveTask objects
    435494        refreshableJob.Progress.Status = "Downloading list of tasks...";
    436         allTasks = HiveServiceLocator.Instance.CallHiveService(s => s.GetLightweightJobTasksWithoutStateLog(hiveExperiment.Id));
     495        allTasks = locator.CallHiveService(s => s.GetLightweightJobTasksWithoutStateLog(hiveExperiment.Id));
    437496        totalJobCount = allTasks.Count();
    438497
    439498        refreshableJob.Progress.Status = "Downloading tasks...";
    440         downloader = new TaskDownloader(allTasks.Select(x => x.Id));
     499        downloader = new TaskDownloader(allTasks.Select(x => x.Id), locator);
    441500        downloader.StartAsync();
    442501
     
    501560
    502561    public static ItemTask LoadItemJob(Guid jobId) {
    503       TaskData taskData = HiveServiceLocator.Instance.CallHiveService(s => s.GetTaskData(jobId));
     562      return LoadItemJob(jobId, HiveServiceLocator.Instance);
     563    }
     564
     565    public static ItemTask LoadItemJob(Guid jobId, IHiveServiceLocator locator) {
     566      TaskData taskData = locator.CallHiveService(s => s.GetTaskData(jobId));
    504567      try {
    505568        return PersistenceUtil.Deserialize<ItemTask>(taskData.Data);
     
    526589
    527590    public static HiveItemCollection<JobPermission> GetJobPermissions(Guid jobId) {
    528       return HiveServiceLocator.Instance.CallHiveService((service) => {
     591      return GetJobPermissions(jobId, HiveServiceLocator.Instance);
     592    }
     593
     594    public static HiveItemCollection<JobPermission> GetJobPermissions(Guid jobId, IHiveServiceLocator locator) {
     595      return locator.CallHiveService((service) => {
    529596        IEnumerable<JobPermission> jps = service.GetJobPermissions(jobId);
    530597        foreach (var hep in jps) {
  • branches/OaaS/HeuristicLab.Clients.Hive/3.3/TaskDownloader.cs

    r9363 r9508  
    7878    }
    7979
    80     public TaskDownloader(IEnumerable<Guid> jobIds) {
     80    public TaskDownloader(IEnumerable<Guid> jobIds, IHiveServiceLocator locator) {
    8181      this.taskIds = jobIds;
    82       this.taskDownloader = new ConcurrentTaskDownloader<ItemTask>(Settings.Default.MaxParallelDownloads, Settings.Default.MaxParallelDownloads);
    83       this.taskDownloader.ExceptionOccured += new EventHandler<EventArgs<Exception>>(taskDownloader_ExceptionOccured);
     82      this.taskDownloader = new ConcurrentTaskDownloader<ItemTask>(Settings.Default.MaxParallelDownloads, Settings.Default.MaxParallelDownloads, locator);
     83      this.taskDownloader.ExceptionOccured += new EventHandler<EventArgs<Exception>>(taskDownloader_ExceptionOccured);     
    8484      this.results = new Dictionary<Guid, HiveTask>();
    8585    }
  • branches/OaaS/HeuristicLab.Services.Optimization.Controller/Azure/DAL.cs

    r9395 r9508  
    225225    }
    226226
    227     //private Experiment Convert(ExperimentEntity entity, string entityJson) {
    228     //  // TODO: Read the whole experiment, not just the names!
    229     //  var exp = new Experiment() { Name = entity.RowKey.Split('_')[1] };
    230     //  foreach (var scenarioName in entity.Algorithms.Split(','))
    231     //    exp.Algorithm.Add(new Algorithm() { Name = scenarioName });
    232     //  return exp;
    233     //}
    234 
    235227    public IEnumerable<Model.Experiment> GetExperiments(string user, bool namesOnly=false) {
    236228      TableServiceContext serviceContext = TableClient.GetDataServiceContext();
  • branches/OaaS/HeuristicLab.Services.Optimization.Controller/HL/HLMapper.cs

    r9166 r9508  
    3737    public static DoubleMatrix ConvertToDoubleMatrix(Parameter parameter) {
    3838      var matrix = parameter.Value as DecimalMatrix;
    39       // TODO: Check for empty matrices
     39     
     40      if (matrix.Value.Length == 0 || matrix.Value[0].Length == 0) {
     41        return new DoubleMatrix(new double[0, 0]);
     42      }
     43
    4044      double[,] data = new double[matrix.Value.Length, matrix.Value[0].Length];
    4145      for (int i=0; i < matrix.Value.Length; i++) {
  • branches/OaaS/HeuristicLab.Services.Optimization.Controller/HL/HiveScenarioManager.cs

    r9395 r9508  
    8181
    8282    public bool DispatchExperiment(User user, Model.Experiment exp, JobExecutionDetails details) {
    83       // TODO: Determine how to build a tree of IAlgorithm
    8483      // For now the experiment will be flatened for execution
    8584      HeuristicLab.Optimization.Experiment hiveExperiment = new HeuristicLab.Optimization.Experiment(exp.Name);
     
    9493        var entry = stack.Pop();
    9594        // handle current entry
    96 
    97         // TODO: Store scenario name in entry.Child.Mapper when saving
    9895        foreach (var child in entry.Children) {
    9996          // This is a template experiment;
     
    215212      }     
    216213      job.HiveTasks.Add(new OptimizerHiveTask(exp));
    217       var service = ConfigureHive(user);
    218      
    219       // TODO: Fix HiveClient class to be not dependent on singleton HiveServiceLocator!!!
    220       HiveServiceLocator.Instance.Username = user.Username;
    221       HiveServiceLocator.Instance.Password = user.Password;
    222       HiveServiceLocator.Instance.EndpointConfigurationName = Configuration.HiveEndpointName;
    223       HiveClient.Store(job, new CancellationToken());
     214           
     215      var locator = ConfigureHive(user);
     216      HiveClient.Store(job, new CancellationToken(), locator);
    224217     
    225218      job.StopResultPolling();
     
    277270        taskIds.Add(task.Id);
    278271      }
    279 
    280       // TODO: Fix problems with the HiveServiceLocater singleton!!!
    281       HiveServiceLocator.Instance.Username = user.Username;
    282       HiveServiceLocator.Instance.Password = user.Password;
    283       HiveServiceLocator.Instance.EndpointConfigurationName = Configuration.HiveEndpointName;
    284       TaskDownloader downloader = new TaskDownloader(taskIds);
     272 
     273      TaskDownloader downloader = new TaskDownloader(taskIds, ConfigureHive(user));
    285274      downloader.StartAsync();
    286275      while (!downloader.IsFinished) {       
     
    291280        }
    292281      }
    293       //var experiment = dal.JobDao.FindByJobId(user.Username, id);
    294282
    295283      IDictionary<Guid, HiveTask> hiveTasks = downloader.Results;
     
    330318      return runs;
    331319    }
    332 
    333     //TODO: We might need images / +++
    334320   
    335321    private Parameter MapHiveDataType(string name, IItem item) {
     
    341327      var result = new Parameter();
    342328      result.Type = ParameterType.String;
    343       //TODO: How shall we handle dll specific datatypes?     
    344       //if (item is PathTSPTour) {
    345       //  var tour = item as PathTSPTour;           
    346       //}
    347       //else
    348329      if (item is IStringConvertibleValue) {
    349330        var value = (item as IStringConvertibleValue).GetValue();
     
    440421        result.Value = new HeuristicLab.Services.Optimization.ControllerService.Model.StringValue() { Name = name, Value = item.ItemName != null ? item.ItemName + " (Cannot be displayed properly as string)" : "Cannot be displayed properly as string" };
    441422      }
    442       // TODO: Add workaround for TSP
    443423      return result;
    444424    }
     
    541521
    542522    public Model.Task GetTaskData(User u, string jobId, string taskId) {
    543       ConfigureHive(u);
    544       HiveServiceLocator.Instance.Username = u.Username;
    545       HiveServiceLocator.Instance.Password = u.Password;
    546       HiveServiceLocator.Instance.EndpointConfigurationName = Configuration.HiveEndpointName;
    547       TaskDownloader downloader = new TaskDownloader(new List<Guid>(){Guid.Parse(taskId)});
     523      TaskDownloader downloader = new TaskDownloader(new List<Guid>(){Guid.Parse(taskId)}, ConfigureHive(u));
    548524      downloader.StartAsync();
    549525      while (!downloader.IsFinished) {
     
    583559      // push all elements to dictionary
    584560      foreach (var task in jobTasks) {
    585         // TODO: Crawl children + parent and create hierarchy!
    586561        var children = serviceLocator.CallHiveService<IEnumerable<HeuristicLab.Clients.Hive.LightweightTask>>(s => s.GetLightweightChildTasks(Guid.Parse(jobId), true, true));
    587562        foreach (var child in children) {
  • branches/OaaS/HeuristicLab.Services.Optimization.Controller/HeuristicLab.Services.Optimization.ControllerService.csproj

    r9350 r9508  
    177177    <Compile Include="Interfaces\IScenarioManager.cs" />
    178178    <Compile Include="Interfaces\Model\ControllerModel.cs" />
     179    <Compile Include="Logging\TableStorageTraceListener.cs" />
    179180    <Compile Include="Mockup\MockupDAL.cs" />
    180181    <Compile Include="Mockup\MockupScenarioManager.cs" />
  • branches/OaaS/HeuristicLab.Services.Optimization.Controller/Interfaces/IControllerService.cs

    r9395 r9508  
    88
    99namespace HeuristicLab.Services.Optimization.ControllerService {
     10  /// <summary>
     11  /// The ControllerService represents the entry point of
     12  /// the OaaS backend. It contains all possible operations
     13  /// of OaaS.
     14  /// </summary>
    1015  [ServiceContract(ProtectionLevel = ProtectionLevel.EncryptAndSign)]
    1116  public interface IControllerService {
     17    /// <summary>
     18    /// Retrieves all available scenarios, including all
     19    /// their information.
     20    /// </summary>
     21    /// <returns>All scenarios</returns>
    1222    [OperationContract]
    1323    IEnumerable<OptimizationScenario> GetOptimizationScenarios();
    1424
     25    /// <summary>
     26    /// Returns the names of all scenarios. This doesn't load
     27    /// parameters or other scenario specific data.
     28    /// </summary>
     29    /// <returns>
     30    /// The names of the scenarios,
     31    /// e. g. ["Benchmark Algorithm", "Genetic Algorithm - TSP"]
     32    /// </returns>
    1533    [OperationContract]
    1634    IEnumerable<string> GetOptimizationScenarioNames();
    1735
     36    /// <summary>
     37    /// Retrieves a scenario by a given name including all of
     38    /// it's data.
     39    /// </summary>
     40    /// <param name="name">
     41    /// The scenario to lookup, e. g. "Benchmark Algorithm"
     42    /// </param>
     43    /// <returns></returns>
    1844    [OperationContract]
    1945    OptimizationScenario GetOptimizationScenarioByName(string name);
    2046
     47    /// <summary>
     48    /// Schedules a scenario for certain user.   
     49    /// </summary>
     50    /// <param name="user">The user which wants to execute a scenario.</param>
     51    /// <param name="scenario">The scenario to execute.</param>
     52    /// <param name="details">The title of the job, the number of repititions of the scenario and the group of the job.</param>
     53    /// <returns>true, if the scenario has been successfully scheduled.</returns>
    2154    [OperationContract]
    2255    bool ScheduleOptimizationScenario(User user, OptimizationScenario scenario, JobExecutionDetails details);
    2356
     57    /// <summary>
     58    /// Schedules an experiment for a certain user.
     59    /// </summary>
     60    /// <param name="user">The user which wants to execute a scenario.</param>
     61    /// <param name="experiment">The name of the experiment to schedule.</param>
     62    /// <param name="details">The title of the job, the number of repititions of the experiment and the group of the job.</param>
     63    /// <returns></returns>
    2464    [OperationContract]
    2565    bool ScheduleExperiment(User user, string experiment, JobExecutionDetails details);
    2666
     67    /// <summary>
     68    /// Returns all available jobs of a user.
     69    /// </summary>
     70    /// <param name="user">The user to query the jobs for.</param>
     71    /// <returns>All jobs for a certain user.</returns>
    2772    [OperationContract]
    2873    IEnumerable<Job> GetJobs(User user);
    2974
     75    /// <summary>
     76    /// Retrievs a job by it's id.
     77    /// </summary>
     78    /// <param name="user">The owner of the job.</param>
     79    /// <param name="id">The id of the job.</param>
     80    /// <returns>The job with the given user and id.</returns>
    3081    [OperationContract]
    3182    Job GetJob(User user, string id);
    3283
     84    /// <summary>
     85    /// Deletes a job of a user.
     86    /// </summary>
     87    /// <param name="user">The owner of the job.</param>
     88    /// <param name="id">The job to delete.</param>
     89    /// <returns>true, if the job has been deleted.</returns>
    3390    [OperationContract]
    3491    bool DeleteJob(User user, string id);
    3592
     93    /// <summary>
     94    /// Returns the results of a job including the input parameters and result parameters.
     95    /// </summary>
     96    /// <param name="user">The owner of the job.</param>
     97    /// <param name="id">The id of the job.</param>
     98    /// <returns>The result and input parameters of the job.</returns>
    3699    [OperationContract]
    37100    IList<Model.Run> GetJobResults(User user, string id);
    38101
     102    /// <summary>   
     103    /// Adds a new scenario to the system. This has to include a valid scenario xml representing all necessary inputs
     104    /// for the new scenario and a scenario mapper which is capable of converting the OaaS-scenario-model into the
     105    /// hive specific version.
     106    /// Note: This method might be only usable by an underlying hive data access layer.
     107    /// </summary>
     108    /// <param name="user">The owner of the scenario (must have administrator privileges).</param>
     109    /// <param name="scenarioXml">The new scenario to upload.</param>
     110    /// <param name="scenarioMapper">The converter between OaaS-model and hive model.</param>
     111    /// <returns>true, if the scenario has been successfully saved.</returns>
    39112    [OperationContract]
    40113    bool AddHiveScenario(User user, string scenarioXml, string scenarioMapper);
    41 
     114   
     115    /// <summary>
     116    /// Deletes a stored scenario including its xml and mapper.
     117    /// </summary>
     118    /// <param name="user">An administrator of the system.</param>
     119    /// <param name="scenarioName">The name of the scenario.</param>
     120    /// <returns>true, if the scenario has been deleted.</returns>
    42121    [OperationContract]
    43122    bool DeleteHiveScenario(User user, string scenarioName);
    44123
     124    /// <summary>
     125    /// Stores an experiment which is a tree of experiments and scenarios.
     126    /// This method will schedule the experiment, if it contains job details.
     127    /// </summary>
     128    /// <param name="user">The owner of the experiment.</param>
     129    /// <param name="experiment">The experiment including all of it's details.</param>
     130    /// <returns>If scheduled it will return the job id. In every other case null will be returned.</returns>
    45131    [OperationContract]
    46132    string SaveExperiment(User user, Experiment experiment);
    47133
     134    /// <summary>
     135    /// Returns the names of the experiments for a certain user.
     136    /// </summary>
     137    /// <param name="user">The owner of the experiments.</param>
     138    /// <returns>A list of experiment names.</returns>
    48139    [OperationContract]
    49140    IEnumerable<string> GetExperimentNames(User user);
    50141
     142    /// <summary>
     143    /// Returns all experiments. If "namesOnly" is false, the experiments include all of their details.   
     144    /// </summary>
     145    /// <param name="user">The owner of the experiments.</param>
     146    /// <param name="namesOnly">If true, returns only a list of experiments where only the Name parameter is set.</param>
     147    /// <returns></returns>
    51148    [OperationContract]
    52149    IEnumerable<Experiment> GetExperiments(User user, bool namesOnly = false);
    53150
     151    /// <summary>
     152    /// TODO
     153    /// </summary>
     154    /// <param name="user"></param>
     155    /// <param name="experiment"></param>
     156    /// <returns></returns>
    54157    [OperationContract]
    55158    bool DeleteExperiment(User user, string experiment);
  • branches/OaaS/HeuristicLab.Services.Optimization.Web/Content/experiment.controller.js

    r9335 r9508  
    3636            loadingDialog.render();
    3737            // send experiment to server
    38             experimentModel.save({}, { success: function () {
    39                 loadingDialog.setLoading(false);
    40                 loadingDialog.text('Experiment successfully saved!');
    41                 loadingDialog.render();
    42                 if (availableExperiments)
    43                     availableExperiments.fetch({ cache: false, success: function (itm) {
    44                         selectableGroup.render();
    45                     }
    46                     });
    47             }
     38            experimentModel.save({}, {
     39                success: function () {
     40                    loadingDialog.setLoading(false);
     41                    loadingDialog.text('Experiment successfully saved!');
     42                    loadingDialog.render();
     43                    if (availableExperiments)
     44                        availableExperiments.fetch({ cache: false, success: function (itm) {
     45                            selectableGroup.render();
     46                        }
     47                        });
     48                },
     49                error: function (model, response, options) {
     50                    loadingDialog.setLoading(false);
     51                    loadingDialog.text('Failed to save Experiment - Please log off an and on and try again!');
     52                    loadingDialog.render();
     53                }
    4854            });
    4955            //loadingDialog.close();
  • branches/OaaS/HeuristicLab.Services.Optimization.Web/Content/experiment.view.js

    r9350 r9508  
    816816        },
    817817        render: function () {
     818            if (this.model.models.length == 0)
     819                return;
     820
    818821            var self = this;
    819822            var ele = $(_.template($('#runcollection_template').html(), {}));
     
    10391042                } else {
    10401043                    var valueProvider = _.find(this.model.models[i].get('results'), function (itm) { return itm.Name == self.bubbleSelect.val(); });
    1041                     if (!valueProvider) 
     1044                    if (!valueProvider)
    10421045                        valueProvider = _.find(this.model.models[i].get('params'), function (itm) { return itm.Name == self.bubbleSelect.val(); });
    10431046
    1044                     if (!valueProvider) {                       
     1047                    if (!valueProvider) {
    10451048                        size = this.options.bubbleSize;
    10461049                    } else {
  • branches/OaaS/HeuristicLab.Services.Optimization.Web/Content/job.controller.js

    r9395 r9508  
    22    my.JobVisualExtensionListener = function (model, element) {
    33        var extension = new OAAS_MODEL.VisualExtension({ id: model.get('algorithmName') });
    4         extension.fetch({ cache: true, success: function () {
    5             //eval extension.js -> execute addVisualExtension(model, element):
    6             var js = extension.get('ScenarioJs');
    7             if (js != null) {
    8                 (function (model, element) {
    9                     addExtension = undefined;
    10                     eval(js);
    11                     if (addExtension)
    12                         addExtension(model, element);
    13                 } (model, element));
     4        extension.fetch({ cache: true,
     5            success: function () {
     6                //eval extension.js -> execute addVisualExtension(model, element):
     7                var js = extension.get('ScenarioJs');
     8                if (js != null) {
     9                    (function (model, element) {
     10                        addExtension = undefined;
     11                        eval(js);
     12                        if (addExtension)
     13                            addExtension(model, element);
     14                    } (model, element));
     15                }
     16            },
     17            error: function (model, response, options) {
     18               
    1419            }
    15         }
    1620        });
    1721    },
     
    3539                var lv = new OAAS_VIEW.LoadingView({ el: $('#jobDetails'), model: 'Loading results of job...' });
    3640                lv.render();
    37                 runList.fetch({ cache: false, success: function () {
    38                     $('#jobDetails').empty();
    39                     var div = $('<div/>').appendTo($('#jobDetails'));
    40                     var rv = new OAAS_VIEW.ResultView({ model: runList, el: div });
    41                     listener.listenTo(rv, 'renderVisualExtension', my.JobVisualExtensionListener);
    42                     rv.render();
    43                     var av = new OAAS_VIEW.AccordionView({ el: div });
    44                     av.render();
    45                 }
     41                runList.fetch({ cache: false,
     42                    success: function () {
     43                        $('#jobDetails').empty();
     44                        var div = $('<div/>').appendTo($('#jobDetails'));
     45                        if (runList.models && runList.models.length == 0) {
     46                            $('<p/>').text('No job results available!').appendTo(div);
     47                            return;
     48                        }
     49                        // else draw the result view
     50                        var rv = new OAAS_VIEW.ResultView({ model: runList, el: div });
     51                        listener.listenTo(rv, 'renderVisualExtension', my.JobVisualExtensionListener);
     52                        rv.render();
     53                        var av = new OAAS_VIEW.AccordionView({ el: div });
     54                        av.render();
     55                    },
     56                    error: function (model, response, options) {
     57                        $('#jobDetails').empty();
     58                        var lv = new OAAS_VIEW.LoadingView({ el: $('#jobDetails'), model: 'Error during retrieval!' });
     59                        lv.render();
     60                    }
    4661                });
    4762            });
  • branches/OaaS/HeuristicLab.Services.Optimization.Web/HeuristicLab.Services.Optimization.Web.csproj

    r9370 r9508  
    120120    <Content Include="Content\experiment.view.js" />
    121121    <Content Include="Content\ExperimentSupport.js" />
    122     <Compile Include="Binders\AlgorithmJsonAttribute.cs" />
     122    <Compile Include="Binders\ExperimentJsonAttribute.cs" />
    123123    <Compile Include="Controllers\AccountController.cs" />
    124124    <Compile Include="Controllers\AdminController.cs" />
  • branches/OaaS/HeuristicLab.Services.Optimization.Web/Views/Shared/_Layout.cshtml

    r9335 r9508  
    1313    <script src="@Url.Content("~/Scripts/jquery-ui-1.9.2.min.js")" type="text/javascript"></script>
    1414    <script src="@Url.Content("~/Scripts/modernizr-1.7.min.js")" type="text/javascript"></script>
    15     <script src="@Url.Content("~/Content/Styling.js")" type="text/javascript"></script>
    1615
    1716    <!--[if lt IE 9]><script language="javascript" type="text/javascript" src="/Content/jqplot/src/excanvas.js"></script><![endif]-->
  • branches/OaaS/HeuristicLab.Services.Optimization/HeuristicLab.Services.Optimization.ccproj

    r8817 r9508  
    3838  </ItemGroup>
    3939  <ItemGroup>
     40    <ProjectReference Include="..\HeuristicLab.Services.Hive.Scaler\HeuristicLab.Services.Optimization.Scaler.csproj">
     41      <Name>HeuristicLab.Services.Optimization.Scaler</Name>
     42      <Project>{d03b1a10-9c88-4c4b-bccf-4f98cde863d3}</Project>
     43      <Private>True</Private>
     44      <RoleType>Worker</RoleType>
     45      <RoleName>HeuristicLab.Services.Optimization.Scaler</RoleName>
     46      <UpdateDiagnosticsConnectionStringOnPublish>True</UpdateDiagnosticsConnectionStringOnPublish>
     47    </ProjectReference>
    4048    <ProjectReference Include="..\HeuristicLab.Services.Hive.WebRole\HeuristicLab.Services.Hive.WebRole.csproj">
    4149      <Name>HeuristicLab.Services.Hive.WebRole</Name>
  • branches/OaaS/HeuristicLab.Services.Optimization/ServiceConfiguration.Cloud.cscfg

    r9371 r9508  
    11<?xml version="1.0" encoding="utf-8"?>
    22<ServiceConfiguration serviceName="HeuristicLab.Services.Optimization" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration" osFamily="1" osVersion="*" schemaVersion="2012-05.1.7">
    3   <Role name="HeuristicLab.Services.Hive.WebRole">
    4     <Instances count="1" />
    5     <ConfigurationSettings>
    6       <Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" value="ADJUST_ME" />
    7       <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.Enabled" value="true" />
    8       <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountUsername" value="ADJUST_ME" />
    9       <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountEncryptedPassword" value="ADJUST_ME" />
    10       <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountExpiration" value="ADJUST_ME" />
    11       <Setting name="Microsoft.WindowsAzure.Plugins.RemoteForwarder.Enabled" value="true" />
    12     </ConfigurationSettings>
    13     <Certificates>
    14       <Certificate name="ADJUST_ME" thumbprint="ADJUST_ME" thumbprintAlgorithm="sha1" />
    15       <Certificate name="Microsoft.WindowsAzure.Plugins.RemoteAccess.PasswordEncryption" thumbprint="ADJUST_ME" thumbprintAlgorithm="sha1" />
    16     </Certificates>
    17   </Role>
    183  <Role name="HeuristicLab.Services.Optimization.Web">
    194    <Instances count="1" />
    205    <ConfigurationSettings>
    21       <Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" value="ADJUST_ME" />
     6      <Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" value="DefaultEndpointsProtocol=https;AccountName=ADJUST_ME;AccountKey=ADJUST_ME"/>
    227      <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.Enabled" value="true" />
    238      <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountUsername" value="hive" />
    249      <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountEncryptedPassword" value="ADJUST_ME" />
    2510      <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountExpiration" value="ADJUST_ME" />
    26       <Setting name="Cloudia.WindowsAzure.Storage" value="ADUST_ME" />
     11      <Setting name="Cloudia.WindowsAzure.Storage" value="DefaultEndpointsProtocol=https;AccountName=ADJUST_ME;AccountKey=ADJUST_ME" />
    2712      <Setting name="HiveEndpointName" value="WSHttpBinding_Remote_IHiveService" />
    2813      <Setting name="ControllerEndpointName" value="WSHttpBinding_Remote_IControllerService" />
     
    3015    <Certificates>
    3116      <Certificate name="Microsoft.WindowsAzure.Plugins.RemoteAccess.PasswordEncryption" thumbprint="ADJUST_ME" thumbprintAlgorithm="sha1" />
    32       <Certificate name="ADJUST_ME" thumbprint="ADJUST_ME" thumbprintAlgorithm="sha1" />
     17      <Certificate name="localhost" thumbprint="ADJUST_ME" thumbprintAlgorithm="sha1" />
     18    </Certificates>
     19  </Role>
     20  <Role name="HeuristicLab.Services.Optimization.Scaler">
     21    <Instances count="1" />
     22    <ConfigurationSettings>
     23      <Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" value="DefaultEndpointsProtocol=https;AccountName=ADJUST_ME;AccountKey=ADJUST_ME" />
     24      <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.Enabled" value="true" />
     25      <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountUsername" value="hive" />
     26      <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountEncryptedPassword" value="ADJUST_ME" />
     27      <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountExpiration" value="ADJUST_ME" />
     28      <Setting name="Microsoft.WindowsAzure.Plugins.RemoteForwarder.Enabled" value="true" />
     29      <Setting name="StorageConnectionString" value="DefaultEndpointsProtocol=https;AccountName=ADJUST_ME;AccountKey=ADJUST_ME" />
     30      <Setting name="TraceTable" value="ScalerTraceTable" />
     31      <Setting name="TraceTableEnabled" value="false" />
     32    </ConfigurationSettings>
     33    <Certificates>
     34      <Certificate name="Microsoft.WindowsAzure.Plugins.RemoteAccess.PasswordEncryption" thumbprint="ADJUST_ME" thumbprintAlgorithm="sha1" />
     35      <Certificate name="Azure Service Management" thumbprint="ADJUST_ME" thumbprintAlgorithm="sha1" />
     36    </Certificates>
     37  </Role>
     38  <Role name="HeuristicLab.Services.Hive.WebRole">
     39    <Instances count="1" />
     40    <ConfigurationSettings>
     41      <Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" value="DefaultEndpointsProtocol=https;AccountName=ADJUST_ME;AccountKey=ADJUST_ME" />
     42      <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.Enabled" value="true" />
     43      <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountUsername" value="hive" />
     44      <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountEncryptedPassword" value="ADJUST_ME" />
     45      <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountExpiration" value="ADJUST_ME" />
     46    </ConfigurationSettings>
     47    <Certificates>
     48      <Certificate name="Microsoft.WindowsAzure.Plugins.RemoteAccess.PasswordEncryption" thumbprint="ADJUST_ME" thumbprintAlgorithm="sha1" />
     49      <Certificate name="localhost" thumbprint="ADJUST_ME" thumbprintAlgorithm="sha1" />
    3350    </Certificates>
    3451  </Role>
  • branches/OaaS/HeuristicLab.Services.Optimization/ServiceConfiguration.Local.cscfg

    r9371 r9508  
    11<?xml version="1.0" encoding="utf-8"?>
    22<ServiceConfiguration serviceName="HeuristicLab.Services.Optimization" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration" osFamily="1" osVersion="*" schemaVersion="2012-05.1.7">
     3  <Role name="HeuristicLab.Services.Optimization.Web">
     4    <Instances count="1" />
     5    <ConfigurationSettings>
     6      <Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" value="UseDevelopmentStorage=true" />
     7      <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.Enabled" value="true" />
     8      <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountUsername" value="hive" />
     9      <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountEncryptedPassword" value="ADJUST_ME" />
     10      <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountExpiration" value="ADJUST_ME" />
     11      <Setting name="Cloudia.WindowsAzure.Storage" value="DefaultEndpointsProtocol=https;AccountName=ADJUST_ME;AccountKey=ADJUST_ME" />
     12      <Setting name="HiveEndpointName" value="WSHttpBinding_Local_IHiveService" />
     13      <Setting name="ControllerEndpointName" value="WSHttpBinding_Local_IControllerService" />
     14    </ConfigurationSettings>
     15    <Certificates>
     16      <Certificate name="Microsoft.WindowsAzure.Plugins.RemoteAccess.PasswordEncryption" thumbprint="ADJUST_ME" thumbprintAlgorithm="sha1" />
     17      <Certificate name="localhost" thumbprint="ADJUST_ME" thumbprintAlgorithm="sha1" />
     18    </Certificates>
     19  </Role>
     20  <Role name="HeuristicLab.Services.Optimization.Scaler">
     21    <Instances count="1" />
     22    <ConfigurationSettings>
     23      <Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" value="DefaultEndpointsProtocol=https;AccountName=ADJUST_ME;AccountKey=ADJUST_ME" />
     24      <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.Enabled" value="true" />
     25      <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountUsername" value="hive" />
     26      <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountEncryptedPassword" value="ADJUST_ME" />
     27      <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountExpiration" value="ADJUST_ME" />
     28      <Setting name="Microsoft.WindowsAzure.Plugins.RemoteForwarder.Enabled" value="true" />
     29      <Setting name="StorageConnectionString" value="DefaultEndpointsProtocol=https;AccountName=ADJUST_ME;AccountKey=ADJUST_ME" />
     30      <Setting name="TraceTable" value="ScalerTraceTable" />
     31      <Setting name="TraceTableEnabled" value="true" />
     32    </ConfigurationSettings>
     33    <Certificates>
     34      <Certificate name="Microsoft.WindowsAzure.Plugins.RemoteAccess.PasswordEncryption" thumbprint="ADJUST_ME" thumbprintAlgorithm="sha1" />
     35      <Certificate name="Azure Service Management" thumbprint="ADJUST_ME" thumbprintAlgorithm="sha1" />
     36    </Certificates>
     37  </Role>
    338  <Role name="HeuristicLab.Services.Hive.WebRole">
    439    <Instances count="1" />
     
    944      <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountEncryptedPassword" value="ADJUST_ME" />
    1045      <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountExpiration" value="ADJUST_ME" />
    11       <Setting name="Microsoft.WindowsAzure.Plugins.RemoteForwarder.Enabled" value="true" />
    12     </ConfigurationSettings>
    13     <Certificates>
    14       <Certificate name="ADJUST_ME" thumbprint="ADJUST_ME" thumbprintAlgorithm="sha1" />
    15       <Certificate name="Microsoft.WindowsAzure.Plugins.RemoteAccess.PasswordEncryption" thumbprint="ADJUST_ME" thumbprintAlgorithm="sha1" />
    16     </Certificates>
    17   </Role>
    18   <Role name="HeuristicLab.Services.Optimization.Web">
    19     <Instances count="1" />
    20     <ConfigurationSettings>
    21       <Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" value="UseDevelopmentStorage=true" />
    22       <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.Enabled" value="true" />
    23       <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountUsername" value="hive" />
    24       <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountEncryptedPassword" value="ADJUST_ME" />
    25       <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountExpiration" value="ADJUST_ME" />
    26       <Setting name="Cloudia.WindowsAzure.Storage" value="ADJUST_ME" />
    27       <Setting name="HiveEndpointName" value="WSHttpBinding_Local_IHiveService" />
    28       <Setting name="ControllerEndpointName" value="WSHttpBinding_Local_IControllerService" />
    2946    </ConfigurationSettings>
    3047    <Certificates>
    3148      <Certificate name="Microsoft.WindowsAzure.Plugins.RemoteAccess.PasswordEncryption" thumbprint="ADJUST_ME" thumbprintAlgorithm="sha1" />
    32       <Certificate name="ADJUST_ME" thumbprint="ADJUST_ME" thumbprintAlgorithm="sha1" />
     49      <Certificate name="localhost" thumbprint="ADJUST_ME" thumbprintAlgorithm="sha1" />
    3350    </Certificates>
    3451  </Role>
  • branches/OaaS/HeuristicLab.Services.Optimization/ServiceDefinition.build.csdef

    r9363 r9508  
    1010-->
    1111<ServiceDefinition name="HeuristicLab.Services.Optimization" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition" schemaVersion="2012-05.1.7">
    12   <WebRole name="HeuristicLab.Services.Hive.WebRole" vmsize="Small">
    13     <Sites>
    14       <Site name="Web">
    15         <Bindings>
    16           <Binding name="HttpIn" endpointName="HttpIn" />
    17         </Bindings>
    18       </Site>
    19     </Sites>
    20     <Endpoints>
    21       <InputEndpoint name="HttpIn" protocol="http" port="80" localPort="80" />
    22     </Endpoints>
    23     <Imports>
    24       <Import moduleName="Diagnostics" />
    25       <Import moduleName="RemoteAccess" />
    26       <Import moduleName="RemoteForwarder" />
    27     </Imports>
    28     <LocalResources>
    29       <LocalStorage name="HeuristicLab.Services.Hive.WebRole.svclog" sizeInMB="1000" cleanOnRoleRecycle="false" />
    30     </LocalResources>
    31     <Certificates>
    32       <Certificate name="localhost" storeLocation="LocalMachine" storeName="My" />
    33     </Certificates>
    34     <Contents>
    35       <Content destination=".\">
    36         <SourceDirectory path="rcf/Debug/HeuristicLab.Services.Hive.WebRoleContent\" />
    37       </Content>
    38     </Contents>
    39   </WebRole>
    4012  <WebRole name="HeuristicLab.Services.Optimization.Web" vmsize="Small">
    4113    <Sites>
     
    6234    </ConfigurationSettings>
    6335  </WebRole>
     36  <WorkerRole name="HeuristicLab.Services.Optimization.Scaler" vmsize="Small">
     37    <Runtime executionContext="elevated" />
     38    <Imports>
     39      <Import moduleName="Diagnostics" />
     40      <Import moduleName="RemoteAccess" />
     41      <Import moduleName="RemoteForwarder" />
     42    </Imports>
     43    <ConfigurationSettings>
     44      <Setting name="StorageConnectionString" />
     45      <Setting name="TraceTable" />
     46      <Setting name="TraceTableEnabled" />
     47    </ConfigurationSettings>
     48    <Certificates>
     49      <Certificate name="Azure Service Management" storeLocation="CurrentUser" storeName="My" />
     50    </Certificates>
     51  </WorkerRole>
     52  <WebRole name="HeuristicLab.Services.Hive.WebRole" vmsize="Small">
     53    <Sites>
     54      <Site name="Web">
     55        <Bindings>
     56          <Binding name="Endpoint1" endpointName="Endpoint1" />
     57        </Bindings>
     58      </Site>
     59    </Sites>
     60    <Endpoints>
     61      <InputEndpoint name="Endpoint1" protocol="http" port="80" />
     62    </Endpoints>
     63    <Imports>
     64      <Import moduleName="Diagnostics" />
     65      <Import moduleName="RemoteAccess" />
     66    </Imports>
     67    <Certificates>
     68      <Certificate name="localhost" storeLocation="LocalMachine" storeName="My" />
     69    </Certificates>
     70    <Contents>
     71      <Content destination=".\">
     72        <SourceDirectory path="rcf/Debug/HeuristicLab.Services.Hive.WebRoleContent\" />
     73      </Content>
     74    </Contents>
     75  </WebRole>
    6476</ServiceDefinition>
  • branches/OaaS/HeuristicLab.Services.Optimization/ServiceDefinition.csdef

    r9166 r9508  
    11<?xml version="1.0" encoding="utf-8"?>
    22<ServiceDefinition name="HeuristicLab.Services.Optimization" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition" schemaVersion="2012-05.1.7">
    3   <WebRole name="HeuristicLab.Services.Hive.WebRole" vmsize="Small">
    4     <Sites>
    5       <Site name="Web">
    6         <Bindings>
    7           <Binding name="HttpIn" endpointName="HttpIn" />
    8         </Bindings>
    9       </Site>
    10     </Sites>
    11     <Endpoints>
    12       <InputEndpoint name="HttpIn" protocol="http" port="80" localPort="80" />
    13     </Endpoints>
    14     <Imports>
    15       <Import moduleName="Diagnostics" />
    16       <Import moduleName="RemoteAccess" />
    17       <Import moduleName="RemoteForwarder" />
    18     </Imports>
    19     <LocalResources>
    20       <LocalStorage name="HeuristicLab.Services.Hive.WebRole.svclog" sizeInMB="1000" cleanOnRoleRecycle="false" />
    21     </LocalResources>
    22     <Certificates>
    23       <Certificate name="localhost" storeLocation="LocalMachine" storeName="My" />
    24     </Certificates>
    25   </WebRole>
    263  <WebRole name="HeuristicLab.Services.Optimization.Web" vmsize="Small">
    274    <Sites>
     
    4825    </ConfigurationSettings>
    4926  </WebRole>
     27  <WorkerRole name="HeuristicLab.Services.Optimization.Scaler" vmsize="Small">
     28    <Runtime executionContext="elevated" />
     29    <Imports>
     30      <Import moduleName="Diagnostics" />
     31      <Import moduleName="RemoteAccess" />
     32      <Import moduleName="RemoteForwarder" />
     33    </Imports>
     34    <ConfigurationSettings>
     35      <Setting name="StorageConnectionString" />
     36      <Setting name="TraceTable" />
     37      <Setting name="TraceTableEnabled" />
     38    </ConfigurationSettings>
     39    <Certificates>
     40      <Certificate name="Azure Service Management" storeLocation="CurrentUser" storeName="My" />
     41    </Certificates>
     42  </WorkerRole>
     43  <WebRole name="HeuristicLab.Services.Hive.WebRole" vmsize="Small">
     44    <Sites>
     45      <Site name="Web">
     46        <Bindings>
     47          <Binding name="Endpoint1" endpointName="Endpoint1" />
     48        </Bindings>
     49      </Site>
     50    </Sites>
     51    <Endpoints>
     52      <InputEndpoint name="Endpoint1" protocol="http" port="80" />
     53    </Endpoints>
     54    <Imports>
     55      <Import moduleName="Diagnostics" />
     56      <Import moduleName="RemoteAccess" />
     57    </Imports>
     58    <Certificates>
     59      <Certificate name="localhost" storeLocation="LocalMachine" storeName="My" />
     60    </Certificates>
     61  </WebRole>
    5062</ServiceDefinition>
  • branches/OaaS/packages/repositories.config

    r9254 r9508  
    11<?xml version="1.0" encoding="utf-8"?>
    22<repositories>
     3  <repository path="..\HeuristicLab.Services.Hive.Scaler\packages.config" />
     4  <repository path="..\HeuristicLab.Services.Hive.WebRole\packages.config" />
     5  <repository path="..\HeuristicLab.Services.Optimization.Controller\packages.config" />
    36  <repository path="..\HeuristicLab.Services.Optimization.Web\packages.config" />
    4   <repository path="..\HeuristicLab.Services.Optimization.Controller\packages.config" />
    57</repositories>
Note: See TracChangeset for help on using the changeset viewer.