Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/11/13 10:15:52 (12 years ago)
Author:
fschoepp
Message:

#1888:

  • Janitor is now working as expected in Windows Azure
  • Added basic support for experiments (draggable experiments)
  • Added methods to save/read experiments from TableStorage
  • The job status can now be retrieved by using the GetTasks/GetTaskData methods
  • Added a class to convert JSON-objects to Algorithm instances
  • Web page: Added experiment button to navigation
Location:
branches/OaaS/HeuristicLab.Services.Optimization.Controller
Files:
3 added
1 deleted
10 edited

Legend:

Unmodified
Added
Removed
  • branches/OaaS/HeuristicLab.Services.Optimization.Controller/Azure/DAL.cs

    r9166 r9215  
    88using Microsoft.WindowsAzure.ServiceRuntime;
    99using System.Diagnostics;
     10using HeuristicLab.Services.Optimization.ControllerService.Model;
    1011
    1112namespace HeuristicLab.Services.Optimization.ControllerService.Azure {
     
    1314    public static readonly string SCENARIO_TABLE = "Scenario";
    1415    public static readonly string SCENARIO_BLOB_CONTAINER = "scenario";
     16    public static readonly string EXPERIMENT_TABLE = "Experiment";
    1517    public static readonly string CLOUD_SETTINGS_KEY = "Cloudia.WindowsAzure.Storage";
    1618  }
     
    9193  }
    9294
     95  internal sealed class ExperimentEntity : TableServiceEntity {
     96    public ExperimentEntity() {
     97    }
     98
     99    public ExperimentEntity(string user, Experiment experiment) {
     100      PartitionKey = "ScenarioPartition";
     101      RowKey = user + "_" + experiment.Name;
     102      var scenarios = "";
     103      foreach (var scen in experiment.Scenarios) {
     104        scenarios += scen.Id + ",";
     105      }
     106      Scenarios = scenarios.Remove(scenarios.Length - 1);
     107      User = user;
     108    }
     109
     110    public string User { get; set; }
     111
     112    public string Scenarios { get; set; }
     113
     114  }
     115
     116  public class ExperimentDao : IExperimentDao {
     117    public CloudBlobClient BlobClient { get; set; }
     118    public CloudTableClient TableClient { get; set; }
     119
     120    public bool Add(string username, Model.Experiment experiment) {
     121      if (FindByName(username, experiment.Name) != null)
     122        return false;
     123
     124      TableServiceContext serviceContext = TableClient.GetDataServiceContext();
     125      TableClient.CreateTableIfNotExist(AzureConstants.EXPERIMENT_TABLE);
     126      var entity = new ExperimentEntity(username, experiment);
     127      serviceContext.AddObject(AzureConstants.EXPERIMENT_TABLE, entity);
     128      serviceContext.SaveChangesWithRetries();
     129      return true;
     130    }
     131
     132    public bool DeleteByName(string username, string experiment) {
     133      TableServiceContext serviceContext = TableClient.GetDataServiceContext();
     134      TableClient.CreateTableIfNotExist(AzureConstants.EXPERIMENT_TABLE);
     135      var entity = (from e in serviceContext.CreateQuery<ExperimentEntity>(AzureConstants.EXPERIMENT_TABLE)
     136                    where e.RowKey == (username + "_" + experiment)
     137                    select e).FirstOrDefault();
     138     
     139      if (entity == null)
     140        return false;
     141
     142      serviceContext.DeleteObject(entity);
     143      serviceContext.SaveChangesWithRetries();
     144      return true;
     145    }
     146
     147    public Model.Experiment FindByName(string username, string experiment) {
     148      TableServiceContext serviceContext = TableClient.GetDataServiceContext();
     149      TableClient.CreateTableIfNotExist(AzureConstants.EXPERIMENT_TABLE);
     150      var entity = (from e in serviceContext.CreateQuery<ExperimentEntity>(AzureConstants.EXPERIMENT_TABLE)
     151                    where e.RowKey == (username + "_" + experiment)
     152                    select e).FirstOrDefault();
     153     
     154      if (entity == null) {
     155        return null;
     156      }
     157
     158      var exp = Convert(entity);
     159      return exp;
     160    }
     161
     162    private Experiment Convert(ExperimentEntity entity) {
     163      var exp = new Experiment() { Name = entity.RowKey.Split('_')[1] };
     164      foreach (var scenarioName in entity.Scenarios.Split(','))
     165        exp.Scenarios.Add(new OptimizationScenario() { Id = scenarioName });
     166      return exp;
     167    }
     168
     169    public IEnumerable<Model.Experiment> GetExperiments(string user) {
     170      TableServiceContext serviceContext = TableClient.GetDataServiceContext();
     171      TableClient.CreateTableIfNotExist(AzureConstants.EXPERIMENT_TABLE);
     172      var entites = (from e in serviceContext.CreateQuery<ExperimentEntity>(AzureConstants.EXPERIMENT_TABLE)
     173                    where e.User == user
     174                    select e).ToList();
     175      var experiments = new List<Experiment>();
     176      foreach (var entity in entites) {
     177        experiments.Add(Convert(entity));
     178      }
     179      return experiments;
     180    }
     181  }
     182
    93183  public class AzureDataAccessLayer : IDataAccessLayer {
    94184    private IScenarioDao scenarioDao;
    95185    private IBlobDao blobDao;
     186    private IExperimentDao expDao;
    96187
    97188    private CloudStorageAccount storageAccount;
     
    115206      get {
    116207        if (scenarioDao == null) {
    117           scenarioDao = new ScenarioDao();
     208          scenarioDao = new ScenarioDao() { TableClient = StorageAccount.CreateCloudTableClient() };
    118209        }
    119210        return scenarioDao;
     
    124215      get {
    125216        if (blobDao == null) {
    126           blobDao = new BlobDao();
     217          blobDao = new BlobDao() { BlobClient = StorageAccount.CreateCloudBlobClient() };
    127218        }
    128219        return blobDao;
     
    130221    }
    131222
    132     public IScenarioDao CreateScenarioDao() {
    133       return new ScenarioDao() { TableClient = StorageAccount.CreateCloudTableClient() };
    134     }
    135 
    136     public IBlobDao CreateBlobDao() {
    137       return new BlobDao() { BlobClient = StorageAccount.CreateCloudBlobClient() };
     223    public IExperimentDao ExperimentDao {
     224      get {
     225        if (expDao == null) {
     226          expDao = new ExperimentDao() { TableClient = StorageAccount.CreateCloudTableClient() };
     227        }
     228        return expDao;
     229      }
    138230    }
    139231  }
  • branches/OaaS/HeuristicLab.Services.Optimization.Controller/HL/HiveScenarioManager.cs

    r9166 r9215  
    5252    }
    5353
    54     public void DispatchScenario(Model.User user, Model.OptimizationScenario scenario, JobExecutionDetails details) {
     54    public string DispatchScenario(Model.User user, Model.OptimizationScenario scenario, JobExecutionDetails details) {
    5555      // Experiment experiment = new Experiment();
    5656      // var problem = new TravelingSalesmanProblem();
     
    6666        br.Optimizer = algo;       
    6767        br.Repetitions = details.Repititions;
    68         SendExperimentToHive(user, br, details);
     68        return SendExperimentToHive(user, br, details);
    6969      }
    7070      else {       
    71         SendExperimentToHive(user, algo, details);
     71        return SendExperimentToHive(user, algo, details);
    7272      }
    7373    }
     
    141141    }
    142142
    143     private void SendExperimentToHive(Model.User user, IOptimizer exp, JobExecutionDetails details) {     
     143    private string SendExperimentToHive(Model.User user, IOptimizer exp, JobExecutionDetails details) {     
    144144      var job = new RefreshableJob();
    145145      job.IsAllowedPrivileged = true;     
     
    156156        Console.WriteLine(ex.StackTrace);
    157157      }, job, new CancellationToken());
    158 
     158     
    159159      job.StopResultPolling();
     160      return job.Id != null ? job.Id.ToString() : null;
    160161    }
    161162
     
    168169      foreach (var job in jobsLoaded) {
    169170        jobs.Add(ConvertJob(user, job));
    170       }
     171      }     
    171172      return jobs;
    172173    }
     
    182183      else
    183184        state = JobState.Waiting;
     185
    184186      return new Model.Job() { Id = job.Id.ToString(), Name = job.Name, Resource = job.ResourceNames, State = state.Value, DateCreated = job.DateCreated };
    185187    }
     
    193195
    194196
    195     public void DeleteJob(User user, string id) {
     197    public bool DeleteJob(User user, string id) {
    196198      ConfigureHive(user);
    197       var guid = Guid.Parse(id);
    198       HiveServiceLocator.Instance.CallHiveService(s => s.DeleteJob(guid));     
     199      var guid = Guid.Parse(id);     
     200      HiveServiceLocator.Instance.CallHiveService(s => s.DeleteJob(guid));
     201      return true;
    199202    }
    200203
     
    344347     
    345348      // insert into table & blob store
    346       var scenDao = dal.CreateScenarioDao();
    347       var blobDao = dal.CreateBlobDao();
     349      var scenDao = dal.ScenarioDao;
     350      var blobDao = dal.BlobDao;
    348351     
    349352      Guid scenarioXmlGuid = Guid.NewGuid();
     
    369372
    370373    private string GetMapperFromBlobStore(string scenarioName) {
    371       var scenarioDao = dal.CreateScenarioDao();
    372       var blobDao = dal.CreateBlobDao();
     374      var scenarioDao = dal.ScenarioDao;
     375      var blobDao = dal.BlobDao;
    373376      var entity = scenarioDao.FindByName(scenarioName);
    374377      if (entity == null)
     
    383386    public bool DeleteScenario(User user, string scenarioName) {
    384387      // delete from table & blob store
    385       var scenarioDao = dal.CreateScenarioDao();
    386       var blobDao = dal.CreateBlobDao();
     388      var scenarioDao = dal.ScenarioDao;
     389      var blobDao = dal.BlobDao;
    387390
    388391      var entity = scenarioDao.FindByName(scenarioName);
     
    395398      return true;
    396399    }
     400
     401    public bool SaveExperiment(User user, Model.Experiment experiment) {
     402      return dal.ExperimentDao.Add(user.Username, experiment);
     403    }
     404
     405    public IEnumerable<string> GetExperiments(User user) {
     406      return (from exp in dal.ExperimentDao.GetExperiments(user.Username)
     407              select exp.Name);
     408    }
     409
     410
     411    public bool DeleteExperiment(User user, string experiment) {
     412      return dal.ExperimentDao.DeleteByName(user.Username, experiment);
     413    }
     414
     415
     416    public Model.Task GetTaskData(User u, string jobId, string taskId) {
     417      ConfigureHive(u);
     418      TaskDownloader downloader = new TaskDownloader(new List<Guid>(){Guid.Parse(taskId)});
     419      downloader.StartAsync();
     420      while (!downloader.IsFinished) {
     421        Thread.Sleep(250);
     422        if (downloader.IsFaulted) {
     423          throw downloader.Exception;
     424        }
     425      }
     426     
     427      IDictionary<Guid, HiveTask> hiveTasks = downloader.Results;
     428      var task = hiveTasks[Guid.Parse(taskId)];
     429      if (task == null)
     430        return null;
     431     
     432      return new Model.Task() {
     433        State = new Model.TaskState() {
     434          DateCreated = task.Task.DateCreated.ToString(),
     435          DateFinished = task.Task.DateFinished.ToString(),
     436          ExecutionTime = task.Task.ExecutionTime.ToString(),
     437          State = task.Task.State.ToString()
     438        },
     439        General = new Model.General() {
     440          Id = task.Task.Id.ToString(),
     441          LastChanged = task.Task.Modified.ToString(),
     442          Name = task.ItemTask.Name
     443        }
     444      };
     445    }
     446
     447    public Model.Job GetTasks(User u, string jobId) {
     448      ConfigureHive(u);
     449      var jobTasks = HiveServiceLocator.Instance.CallHiveService<IEnumerable<HeuristicLab.Clients.Hive.LightweightTask>>(s => s.GetLightweightJobTasks(Guid.Parse(jobId)));
     450     
     451      var job = new Model.Job();
     452      job.Id = jobId;
     453      var tasks = new Dictionary<Guid, Model.Task>();
     454      // push all elements to dictionary
     455      foreach (var task in jobTasks) {
     456        // TODO: Crawl children + parent and create hierarchy!
     457        var children = HiveServiceLocator.Instance.CallHiveService<IEnumerable<HeuristicLab.Clients.Hive.LightweightTask>>(s => s.GetLightweightChildTasks(Guid.Parse(jobId), true, true));
     458        foreach (var child in children) {
     459          tasks[child.Id] = new Model.Task() {
     460            State = new Model.TaskState() {
     461              DateCreated = child.DateCreated.ToString(),
     462              DateFinished = child.DateFinished.ToString(),
     463              ExecutionTime = child.ExecutionTime.ToString(),
     464              State = child.State.ToString()
     465            },
     466            General = new Model.General() {
     467              Id = child.Id.ToString(),
     468              LastChanged = child.Modified.ToString(),
     469              Name = child.ItemName
     470            }
     471          };
     472        }
     473      }
     474
     475      // traverse all tasks again and create tree of tasks
     476      foreach (var task in jobTasks) {
     477        if (task.ParentTaskId.HasValue)
     478          tasks[task.Id].Children.Add(tasks[task.ParentTaskId.Value]);
     479        else // its a root task
     480          job.Tasks.Add(tasks[task.Id]);
     481      }
     482
     483      return job;
     484    }
    397485  }
    398486}
  • branches/OaaS/HeuristicLab.Services.Optimization.Controller/HeuristicLab.Services.Optimization.ControllerService.csproj

    r9166 r9215  
    151151    <Reference Include="Microsoft.WindowsAzure.ServiceRuntime, Version=1.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
    152152    <Reference Include="Microsoft.WindowsAzure.StorageClient, Version=1.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
     153    <Reference Include="Newtonsoft.Json">
     154      <HintPath>..\packages\Newtonsoft.Json.4.5.11\lib\net40\Newtonsoft.Json.dll</HintPath>
     155    </Reference>
    153156    <Reference Include="System" />
    154157    <Reference Include="System.configuration" />
     
    175178    <Compile Include="Mockup\MockupDAL.cs" />
    176179    <Compile Include="Mockup\MockupScenarioManager.cs" />
     180    <Compile Include="Parsers\AlgorithmConverter.cs" />
    177181    <Compile Include="PlaceholderControllerService.cs" />
    178182    <Compile Include="Properties\AssemblyInfo.cs" />
    179     <Compile Include="HL\ScenarioParser.cs" />
     183    <Compile Include="Parsers\ScenarioParser.cs" />
    180184    <Compile Include="Utility.cs" />
    181185  </ItemGroup>
     
    186190    <None Include="packages.config" />
    187191  </ItemGroup>
    188   <ItemGroup />
    189192  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
    190193  <PropertyGroup>
  • branches/OaaS/HeuristicLab.Services.Optimization.Controller/Interfaces/DAL.cs

    r9166 r9215  
    33using System.Linq;
    44using System.Text;
     5using HeuristicLab.Services.Optimization.ControllerService.Model;
    56
    67namespace HeuristicLab.Services.Optimization.ControllerService.Interfaces {
     
    1718  }
    1819
     20  public interface IExperimentDao {
     21    bool Add(string username, Experiment experiment);
     22    bool DeleteByName(string username, string experiment);
     23    Experiment FindByName(string username, string experiment);
     24    IEnumerable<Experiment> GetExperiments(string user);
     25  }
     26
    1927  public interface IBlobDao {
    2028    bool Add(StringEntry entry);
     
    2432
    2533  public interface IDataAccessLayer {
    26     IScenarioDao CreateScenarioDao();
    27     IBlobDao CreateBlobDao();
     34    IScenarioDao ScenarioDao { get; }
     35    IBlobDao BlobDao { get; }
     36    IExperimentDao ExperimentDao { get; }   
    2837  }
    2938
  • branches/OaaS/HeuristicLab.Services.Optimization.Controller/Interfaces/IControllerService.cs

    r9166 r9215  
    2020
    2121    [OperationContract]
    22     void ScheduleOptimizationScenario(User user, OptimizationScenario scenario, JobExecutionDetails details);
     22    bool ScheduleOptimizationScenario(User user, OptimizationScenario scenario, JobExecutionDetails details);
    2323
    2424    [OperationContract]
     
    2929
    3030    [OperationContract]
    31     void DeleteJob(User user, string id);
     31    bool DeleteJob(User user, string id);
    3232
    3333    [OperationContract]
     
    3939    [OperationContract]
    4040    bool DeleteHiveScenario(User user, string scenarioName);
     41
     42    [OperationContract]
     43    bool SaveExperiment(User user, Experiment experiment);
     44
     45    [OperationContract]
     46    IEnumerable<string> GetExperiments(User user);
     47
     48    [OperationContract]
     49    bool DeleteExperiment(User user, string experiment);
     50
     51    [OperationContract]
     52    Job GetTasks(User u, string jobId);
     53
     54    [OperationContract]
     55    Task GetTaskData(User u, string jobId, string taskId);
    4156  }
    4257}
  • branches/OaaS/HeuristicLab.Services.Optimization.Controller/Interfaces/IScenarioManager.cs

    r9166 r9215  
    77namespace HeuristicLab.Services.Optimization.ControllerService.Interfaces {
    88  public interface IScenarioManager {
    9     void DispatchScenario(User user, OptimizationScenario scenario, JobExecutionDetails details);
     9    string DispatchScenario(User user, OptimizationScenario scenario, JobExecutionDetails details);
    1010    IList<Job> GetJobs(User user);
    1111    Job GetJob(User user, string id);
    12     void DeleteJob(User user, string id);
     12    bool DeleteJob(User user, string id);
    1313    IList<Model.Run> GetJobResults(User user, string id);
    1414    bool AddScenario(User user, string scenarioName, string scenarioXml, string scenarioMapper);
    1515    bool DeleteScenario(User user, string scenarioName);
     16
     17    bool SaveExperiment(User user, Experiment experiment);
     18    IEnumerable<string> GetExperiments(User user);
     19    bool DeleteExperiment(User user, string experiment);
     20
     21    Task GetTaskData(User u, string jobId, string taskId);
     22    Job GetTasks(User u, string jobId);
    1623  }
    1724}
  • branches/OaaS/HeuristicLab.Services.Optimization.Controller/Interfaces/Model/ControllerModel.cs

    r9166 r9215  
    306306  public class Experiment {
    307307    [DataMember]
     308    public string Name { get; set; }
     309
     310    [DataMember]
    308311    public IList<OptimizationScenario> Scenarios { get; set; }
    309312
     
    340343
    341344  [DataContract]
     345  public class Property {
     346    [DataMember]
     347    public string Key { get; set; }
     348    [DataMember]
     349    public string Value { get; set; }
     350  }
     351 
     352  [DataContract]
     353  public class General {
     354    [DataMember]
     355    public string Name { get { return GetValue("Name"); } set { SetValue("Name", value); } }
     356    [DataMember]
     357    public string Id { get { return GetValue("Id"); } set { SetValue("Id", value); } }
     358    [DataMember]
     359    public string Priority { get { return GetValue("Priority"); } set { SetValue("Priority", value); } }
     360    [DataMember]
     361    public string LastChanged { get { return GetValue("LastChanged"); } set { SetValue("LastChanged", value); } }
     362
     363   
     364    private IList<Property> properties = new List<Property>();
     365    [DataMember]
     366    public IList<Property> Properties
     367    {
     368      get {
     369        if (properties == null)
     370          properties = new List<Property>();
     371        return properties;
     372      }
     373      set { properties = value;}
     374    }
     375
     376    private string GetValue(string key) {     
     377      return (from p in Properties where p.Key == key select p.Value).FirstOrDefault();
     378    }
     379
     380    private void SetValue(string key, string value) {
     381      var prop = (from p in Properties where p.Key == key select p).FirstOrDefault();
     382      if (prop == null) {
     383        prop = new Property();
     384        Properties.Add(prop);
     385      }
     386      prop.Key = key;
     387      prop.Value = value;
     388    }
     389  }
     390
     391  [DataContract]
     392  public class TaskState {
     393    [DataMember]
     394    public string State { get; set; }
     395    [DataMember]
     396    public string ExecutionTime { get; set; }
     397    [DataMember]
     398    public string DateCreated { get; set; }
     399    [DataMember]
     400    public string DateFinished { get; set; }
     401  }
     402
     403  [DataContract]
     404  public class Task {
     405    private General general = new General();
     406    [DataMember]
     407    public General General {
     408      get { return general; }
     409      set { general = value; }
     410    }
     411
     412    private IList<Task> tasks = new List<Task>();
     413    [DataMember]
     414    public IList<Task> Children {
     415      get { return tasks; }
     416      set { tasks = value; }
     417    }
     418   
     419    private TaskState state = new TaskState();
     420
     421    [DataMember]
     422    public TaskState State {
     423      get { return state; }
     424      set { state = value; }
     425    }
     426  }
     427
     428  [DataContract]
    342429  public class Job {
    343430    [DataMember]
     
    355442    [DataMember]
    356443    public DateTime DateCreated { get; set; }
     444
     445    private IList<Task> tasks = new List<Task>();
     446
     447    [DataMember]
     448    public IList<Task> Tasks {
     449      get { return tasks; }
     450      set { tasks = value; }
     451    }
     452
    357453  }
    358454
  • branches/OaaS/HeuristicLab.Services.Optimization.Controller/Mockup/MockupDAL.cs

    r9166 r9215  
    246246    }
    247247
    248     public IScenarioDao CreateScenarioDao() {
    249       return new ScenarioDao();
    250     }
    251 
    252     public IBlobDao CreateBlobDao() {
    253       return new BlobDao();
    254     }
     248    private IExperimentDao experimentDao;
     249
     250    public IExperimentDao ExperimentDao {
     251      get {         
     252        return null;
     253      }     
     254    }
     255
    255256  }
    256257}
  • branches/OaaS/HeuristicLab.Services.Optimization.Controller/Mockup/MockupScenarioManager.cs

    r9166 r9215  
    131131    }
    132132
    133     public void DispatchScenario(Model.User user, Model.OptimizationScenario scenario, JobExecutionDetails details) {
    134       // does nothign
     133    public string DispatchScenario(Model.User user, Model.OptimizationScenario scenario, JobExecutionDetails details) {
     134      // does nothing
     135      return "guid";
    135136    }
    136137
     
    144145
    145146
    146     public void DeleteJob(User user, string id) {
     147    public bool DeleteJob(User user, string id) {
    147148      jobs.RemoveAll(j => j.Id == id);
     149      return true;
    148150    }
    149151
     
    199201     
    200202      // insert into table & blob store
    201       var scenDao = dal.CreateScenarioDao();
    202       var blobDao = dal.CreateBlobDao();
     203      var scenDao = dal.ScenarioDao;
     204      var blobDao = dal.BlobDao;
    203205     
    204206      Guid scenarioXmlGuid = Guid.NewGuid();
     
    225227    public bool DeleteScenario(User user, string scenarioName) {
    226228      // delete from table & blob store
    227       var scenarioDao = dal.CreateScenarioDao();
    228       var blobDao = dal.CreateBlobDao();
     229      var scenarioDao = dal.ScenarioDao;
     230      var blobDao = dal.BlobDao;
    229231
    230232      var entity = scenarioDao.FindByName(scenarioName);
     
    237239      return true;
    238240    }
     241
     242
     243    public bool SaveExperiment(User user, Model.Experiment experiment) {
     244      throw new NotImplementedException();
     245    }
     246
     247
     248    public IEnumerable<string> GetExperiments(User user) {
     249      throw new NotImplementedException();
     250    }
     251
     252
     253    public bool DeleteExperiment(User user, string experiment) {
     254      throw new NotImplementedException();
     255    }
     256
     257
     258    public Model.Task GetTaskData(User u, string jobId, string taskId) {
     259      throw new NotImplementedException();
     260    }
     261
     262    public Model.Job GetTasks(User u, string jobId) {
     263      throw new NotImplementedException();
     264    }
    239265  }
    240266}
  • branches/OaaS/HeuristicLab.Services.Optimization.Controller/PlaceholderControllerService.cs

    r9166 r9215  
    6969    }
    7070
    71     public void ScheduleOptimizationScenario(Model.User user, Model.OptimizationScenario scenario, JobExecutionDetails details) {
     71    public bool ScheduleOptimizationScenario(Model.User user, Model.OptimizationScenario scenario, JobExecutionDetails details) {
    7272      hiveManager.DispatchScenario(user, scenario, details);
     73      return true;
    7374    }
    7475
     
    8384
    8485
    85     public void DeleteJob(Model.User user, string id) {
    86       hiveManager.DeleteJob(user, id);
     86    public bool DeleteJob(Model.User user, string id) {
     87      return hiveManager.DeleteJob(user, id);
    8788    }
    8889
     
    117118              select e.Id).AsEnumerable();     
    118119    }
     120
     121
     122    public bool SaveExperiment(User user, Experiment experiment) {
     123      return hiveManager.SaveExperiment(user, experiment);
     124    }
     125
     126
     127    public IEnumerable<string> GetExperiments(User user) {
     128      return hiveManager.GetExperiments(user);
     129    }
     130
     131
     132    public bool DeleteExperiment(User user, string experiment) {
     133      return hiveManager.DeleteExperiment(user, experiment);
     134    }
     135
     136
     137    public Job GetTasks(User u, string jobId) {
     138      return hiveManager.GetTasks(u, jobId);
     139    }
     140
     141    public Task GetTaskData(User u, string jobId, string taskId) {
     142      return hiveManager.GetTaskData(u, jobId, taskId);
     143    }
    119144  }
    120145}
Note: See TracChangeset for help on using the changeset viewer.