Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/07/10 10:22:27 (14 years ago)
Author:
cneumuel
Message:
  • created HiveClient which shows an overview over all submitted HiveExperiments
  • its possible to download all submitted HiveExperiments including results
  • Experiments are now sent as a whole to the Hive and the Hive-Slaves take care of creating child-jobs (if necessary). The parent job is then paused and will be reactivated when all child-jobs are finished
  • WcfService-Clients are now consistently managed by WcfServicePool which allows to use IDisposable-Pattern and always keeps exactly one proxy-object until all callers disposed them.
  • created ProgressView which is able to lock a View and display progress of an action. It also allows to simulate progress if no progress-information is available so that users don't get too nervous while waiting.
Location:
branches/3.3-Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/Facades
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/3.3-Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/Facades/ClientFacade.cs

    r4333 r4368  
    6969    [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Administrator)]
    7070    [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Client)]
    71     public ResponseObject<SerializedJob> GetLastSerializedResult(Guid jobId, bool requested, bool snapshot) {
     71    public ResponseObject<SerializedJob> GetLastSerializedResult(Guid jobId) {
    7272      using (contextFactory.GetContext(false)) {
    7373        ServiceLocator.GetAuthorizationManager().AuthorizeForJobs(jobId);
    74         return jobManager.GetLastSerializedResult(jobId, requested, snapshot);
     74        return jobManager.GetLastSerializedResult(jobId);
     75      }
     76    }
     77
     78    [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Administrator)]
     79    [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Client)]
     80    public ResponseObject<SerializedJob> GetSnapshotResult(Guid jobId) {
     81      using (contextFactory.GetContext(false)) {
     82        ServiceLocator.GetAuthorizationManager().AuthorizeForJobs(jobId);
     83        return jobManager.GetSnapshotResult(jobId);
    7584      }
    7685    }
     
    103112    }
    104113
     114    [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Administrator)]
     115    [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Client)]
     116    public ResponseObject<JobResultList> GetChildJobResults(Guid? parentJobId, bool recursive, bool includeParent) {
     117      using (contextFactory.GetContext(false)) {
     118        if (parentJobId.HasValue) {
     119          ServiceLocator.GetAuthorizationManager().AuthorizeForJobs(parentJobId.Value);
     120        }
     121        // If parentJobId is null, GetChildJobResults will filter the results for the current user
     122        return jobManager.GetChildJobResults(parentJobId, recursive, includeParent);
     123      }
     124    }
    105125    #endregion
     126
     127
    106128  }
    107129}
  • branches/3.3-Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/Facades/ServerConsoleFacade.cs

    r4333 r4368  
    3232using HeuristicLab.Hive.Contracts.ResponseObjects;
    3333using System.Security.Permissions;
     34using HeuristicLab.Hive.JobBase;
    3435
    3536namespace HeuristicLab.Hive.Server.Core {
     
    4647    }
    4748
     49    [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Administrator)]
    4850    public Response Login() {
    4951      Response resp = new Response();
     
    129131
    130132    [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Administrator)]
    131     public ResponseObject<SerializedJob> GetLastSerializedResult(Guid jobId, bool requested, bool snapshot) {
    132       using (contextFactory.GetContext(false)) {
    133         return jobManager.GetLastSerializedResult(jobId, requested, snapshot);
     133    public ResponseObject<SerializedJob> GetLastSerializedResult(Guid jobId) {
     134      using (contextFactory.GetContext(false)) {
     135        return jobManager.GetLastSerializedResult(jobId);
     136      }
     137    }
     138
     139    [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Administrator)]
     140    public ResponseObject<SerializedJob> GetSnapshotResult(Guid jobId) {
     141      using (contextFactory.GetContext(false)) {
     142        return jobManager.GetSnapshotResult(jobId);
    134143      }
    135144    }
     
    223232      using (contextFactory.GetContext()) {
    224233        return jobManager.AddJobWithGroupStrings(job, resources);
     234      }
     235    }
     236
     237    [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Administrator)]
     238    public ResponseObject<JobResultList> GetChildJobResults(Guid? parentJobId, bool recursive, bool includeParent) {
     239      using (contextFactory.GetContext()) {
     240        return jobManager.GetChildJobResults(parentJobId, recursive, includeParent);
     241      }
     242    }
     243
     244    [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Administrator)]
     245    public ResponseObject<JobDto> AddChildJob(Guid parentJobId, SerializedJob serializedJob) {
     246      using (contextFactory.GetContext()) {
     247        return jobManager.AddChildJob(parentJobId, serializedJob);
     248      }
     249    }
     250
     251    [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Administrator)]
     252    public ResponseObject<JobDto> PauseJob(SerializedJob serializedJob) {
     253      using (contextFactory.GetContext()) {
     254        return jobManager.PauseJob(serializedJob);
    225255      }
    226256    }
  • branches/3.3-Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/Facades/SlaveFacade.cs

    r4337 r4368  
    3737using HeuristicLab.Hive.Contracts.ResponseObjects;
    3838using System.Security.Permissions;
     39using HeuristicLab.Hive.JobBase;
    3940
    4041namespace HeuristicLab.Hive.Server.Core {
     
    4243  public class SlaveFacade : ISlaveFacade {
    4344    private ISlaveCommunicator slaveCommunicator = ServiceLocator.GetSlaveCommunicator();
     45    private IJobManager jobManager = ServiceLocator.GetJobManager();
    4446    private IContextFactory contextFactory = ServiceLocator.GetContextFactory();
    4547
     
    126128      using (contextFactory.GetContext()) {
    127129        return slaveCommunicator.SetCalendarStatus(slaveId, state);
     130      }
     131    }
     132
     133    [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Administrator)]
     134    [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Slave)]
     135    public ResponseObject<JobDto> AddChildJob(Guid parentJobId, SerializedJob serializedJob) {
     136      using (contextFactory.GetContext()) {
     137        return jobManager.AddChildJob(parentJobId, serializedJob);
     138       
    128139      }
    129140    }
     
    186197      }
    187198    }
     199
     200    [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Administrator)]
     201    [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Slave)]
     202    public ResponseObject<JobDto> PauseJob(SerializedJob serializedJob) {
     203      using (contextFactory.GetContext()) {
     204        return jobManager.PauseJob(serializedJob);
     205      }
     206    }
     207
     208    [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Administrator)]
     209    [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Slave)]
     210    public JobResultList GetChildJobResults(Guid? parentJobId, bool recursive, bool includeParent) {
     211      using (contextFactory.GetContext(false)) {
     212        return jobManager.GetChildJobResults(parentJobId, recursive, includeParent).Obj;
     213      }
     214    }
     215
     216    [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Administrator)]
     217    [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Slave)]
     218    public SerializedJob GetLastSerializedResult(Guid jobId) {
     219      using (contextFactory.GetContext(false)) {
     220        return jobManager.GetLastSerializedResult(jobId).Obj;
     221      }
     222    }
    188223    #endregion
    189224  }
Note: See TracChangeset for help on using the changeset viewer.