Free cookie consent management tool by TermsFeed Policy Generator

source: branches/OaaS/HeuristicLab.Services.Optimization.Controller/Interfaces/IControllerService.cs @ 12012

Last change on this file since 12012 was 9508, checked in by fschoepp, 12 years ago

#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.
File size: 7.3 KB
RevLine 
[8384]1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using System.ServiceModel;
6using System.Net.Security;
7using HeuristicLab.Services.Optimization.ControllerService.Model;
8
9namespace HeuristicLab.Services.Optimization.ControllerService {
[9508]10  /// <summary>
11  /// The ControllerService represents the entry point of
12  /// the OaaS backend. It contains all possible operations
13  /// of OaaS.
14  /// </summary>
[8384]15  [ServiceContract(ProtectionLevel = ProtectionLevel.EncryptAndSign)]
16  public interface IControllerService {
[9508]17    /// <summary>
18    /// Retrieves all available scenarios, including all
19    /// their information.
20    /// </summary>
21    /// <returns>All scenarios</returns>
[8384]22    [OperationContract]
23    IEnumerable<OptimizationScenario> GetOptimizationScenarios();
24
[9508]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>
[8384]33    [OperationContract]
[8958]34    IEnumerable<string> GetOptimizationScenarioNames();
35
[9508]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>
[8958]44    [OperationContract]
[8384]45    OptimizationScenario GetOptimizationScenarioByName(string name);
[8506]46
[9508]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>
[8506]54    [OperationContract]
[9215]55    bool ScheduleOptimizationScenario(User user, OptimizationScenario scenario, JobExecutionDetails details);
[8545]56
[9508]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>
[8545]64    [OperationContract]
[9227]65    bool ScheduleExperiment(User user, string experiment, JobExecutionDetails details);
66
[9508]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>
[9227]72    [OperationContract]
[8545]73    IEnumerable<Job> GetJobs(User user);
74
[9508]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>
[8545]81    [OperationContract]
82    Job GetJob(User user, string id);
83
[9508]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>
[8545]90    [OperationContract]
[9215]91    bool DeleteJob(User user, string id);
[8545]92
[9508]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>
[8545]99    [OperationContract]
100    IList<Model.Run> GetJobResults(User user, string id);
[8958]101
[9508]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>
[8958]112    [OperationContract]
113    bool AddHiveScenario(User user, string scenarioXml, string scenarioMapper);
[9508]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>
[8958]121    [OperationContract]
122    bool DeleteHiveScenario(User user, string scenarioName);
[9215]123
[9508]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>
[9215]131    [OperationContract]
[9305]132    string SaveExperiment(User user, Experiment experiment);
[9215]133
[9508]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>
[9215]139    [OperationContract]
[9305]140    IEnumerable<string> GetExperimentNames(User user);
[9215]141
[9508]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>
[9215]148    [OperationContract]
[9324]149    IEnumerable<Experiment> GetExperiments(User user, bool namesOnly = false);
[9305]150
[9508]151    /// <summary>
152    /// TODO
153    /// </summary>
154    /// <param name="user"></param>
155    /// <param name="experiment"></param>
156    /// <returns></returns>
[9305]157    [OperationContract]
[9215]158    bool DeleteExperiment(User user, string experiment);
159
160    [OperationContract]
161    Job GetTasks(User u, string jobId);
162
163    [OperationContract]
164    Task GetTaskData(User u, string jobId, string taskId);
[9227]165
166    [OperationContract]
167    Experiment GetExperimentByName(User user, string scenario);
[9305]168
169    [OperationContract]
170    Experiment GetExperimentById(User u, string nodeId);
[9362]171
172    [OperationContract]
[9395]173    VisualExtension GetVisualExtension(string algorithmId);
[9362]174
175    [OperationContract]
176    bool AddVisualExtension(string algorithmId, string script);
177
178    [OperationContract]
179    bool DeleteVisualExtension(string algorithmId);
[9395]180
181    [OperationContract]
182    bool ExistsVisualExtension(string algorithmId);
[8384]183  }
184}
Note: See TracBrowser for help on using the repository browser.