Free cookie consent management tool by TermsFeed Policy Generator

source: branches/OaaS/HeuristicLab.Services.Optimization.Web/WebRole.cs @ 9166

Last change on this file since 9166 was 9166, checked in by fschoepp, 11 years ago

#1888:

  • Model: OptimizationScenario may be a tree of algorithms (and problems)
  • Model: Renamed InputParameters to ProblemParameters (as they are the parameters of a problem)
  • Model: Added JobExecutionDetails which contain Repetitions + Group (resource to use)
  • ScenarioParser parses the new XML scenario files
  • Website + Model: You are now able to add/remove rows from a table (no JavaScript involved yet)
  • Website + Controller: Added repetitions (enables batch jobs) and group (resource to use) to OaaS which will be used by the controller to schedule the job
  • Website: Updated templates to use new model structure
  • Website + Scenarios: Added the new algorithm Benchmark Algorithm
  • Controller: Added a singleton to make the (Azure/Mockup)-DAL exchangeable
  • Controller: Added mockup classes for DAL + IScenarioManager
  • Website/Result Page: Line Diagrams will be added via JavaScript, crawling their data using AJAX
  • Website: Most configuration parameters can be set in the ServiceDefinition directly
  • Added a mockup for the Membership classes: These can be used if no network connection is available or if other parts of the app shall be tested
  • Scenarios: Updated TSP mappings to new xsd
File size: 1.5 KB
Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using Microsoft.WindowsAzure;
5using Microsoft.WindowsAzure.Diagnostics;
6using Microsoft.WindowsAzure.ServiceRuntime;
7
8namespace HeuristicLab.Services.Optimization.Web {
9  public static class Constants {
10    public const string DiagnosticsConnectionString = "Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString";
11  }
12
13  public class WebRole : RoleEntryPoint {
14    public override bool OnStart() {
15      // For information on handling configuration changes
16      // see the MSDN topic at http://go.microsoft.com/fwlink/?LinkId=166357.     
17      try {
18        if (!String.IsNullOrEmpty(RoleEnvironment.GetConfigurationSettingValue(Constants.DiagnosticsConnectionString))) {
19          DiagnosticMonitorConfiguration dmc = DiagnosticMonitor.GetDefaultInitialConfiguration();
20          dmc.Logs.ScheduledTransferPeriod = TimeSpan.FromMinutes(1);
21          dmc.Logs.ScheduledTransferLogLevelFilter = LogLevel.Verbose;
22          DiagnosticMonitor.Start(Constants.DiagnosticsConnectionString, dmc);
23        }
24      }
25      catch (RoleEnvironmentException ex) {
26        // diagnostics connection string not in configuration
27        // -> diagnostics disabled
28        // nothing more to do
29      }
30
31      RoleEnvironment.Changed += RoleEnvironmentChanged;
32
33      return base.OnStart();
34    }
35
36    private void RoleEnvironmentChanged(object sender, RoleEnvironmentChangedEventArgs e) {
37    }
38  }
39}
Note: See TracBrowser for help on using the repository browser.