Changeset 4333 for branches/3.3-HiveMigration/sources/HeuristicLab.Hive
- Timestamp:
- 08/27/10 08:35:43 (14 years ago)
- Location:
- branches/3.3-HiveMigration/sources/HeuristicLab.Hive
- Files:
-
- 6 added
- 28 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Calendar/3.3/Properties/AssemblyInfo.cs
r4320 r4333 58 58 // [assembly: AssemblyVersion("1.0.*")] 59 59 [assembly: AssemblyVersion("3.3.0.0")] 60 [assembly: AssemblyFileVersion("3.3.0.43 16")]60 [assembly: AssemblyFileVersion("3.3.0.4320")] -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/BusinessObjects/JobDto.cs
r4267 r4333 41 41 [Storable] 42 42 [DataMember] 43 public GuidUserId { get; set; }43 public string UserId { get; set; } 44 44 [Storable] 45 45 [DataMember] -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment.Views/3.3/HiveExperimentView.cs
r4305 r4333 122 122 Invoke(new EventHandler(Content_ExecutionStateChanged), sender, e); 123 123 else 124 startButton.Enabled = pauseButton.Enabled = stopButton.Enabled = resetButton.Enabled = false;124 SetEnabledStateOfExecutableButtons(); 125 125 } 126 126 private void Content_Prepared(object sender, EventArgs e) { -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment/3.3/HiveExperiment.cs
r4316 r4333 67 67 private Semaphore fetchJobSemaphore = new Semaphore(2, 2); 68 68 69 private static object pendingOptimizerMappingsLocker = new object(); 70 69 71 private bool stopResultsPollingPending = false; 70 72 … … 197 199 clone.pendingOptimizersByJobId = new Dictionary<Guid, IOptimizer>(); 198 200 199 foreach (var pair in this.pendingOptimizersByJobId) 200 clone.pendingOptimizersByJobId[pair.Key] = (IOptimizer)cloner.Clone(pair.Value); 201 202 foreach (var pair in this.parentOptimizersByPendingOptimizer) 203 clone.parentOptimizersByPendingOptimizer[(IOptimizer)cloner.Clone(pair.Key)] = (IOptimizer)cloner.Clone(pair.Value); 204 201 lock (pendingOptimizerMappingsLocker) { 202 foreach (var pair in this.pendingOptimizersByJobId) 203 clone.pendingOptimizersByJobId[pair.Key] = (IOptimizer)cloner.Clone(pair.Value); 204 205 foreach (var pair in this.parentOptimizersByPendingOptimizer) 206 clone.parentOptimizersByPendingOptimizer[(IOptimizer)cloner.Clone(pair.Key)] = (IOptimizer)cloner.Clone(pair.Value); 207 } 205 208 clone.log = (ILog)cloner.Clone(log); 206 209 clone.stopPending = this.stopPending; … … 243 246 if (experiment != null) { 244 247 StopResultPolling(); 245 lock (pendingOptimizer sByJobId) {248 lock (pendingOptimizerMappingsLocker) { 246 249 pendingOptimizersByJobId.Clear(); 247 }248 parentOptimizersByPendingOptimizer.Clear();250 parentOptimizersByPendingOptimizer.Clear(); 251 } 249 252 lock (jobItems) { 250 253 jobItems.Clear(); … … 275 278 276 279 IEnumerable<string> groups = ResourceGroups; 277 278 foreach (IOptimizer optimizer in parentOptimizersByPendingOptimizer.Keys) { 279 SerializedJob serializedJob = CreateSerializedJob(optimizer); 280 ResponseObject<JobDto> response = clientFacade.AddJobWithGroupStrings(serializedJob, groups); 281 lock (pendingOptimizersByJobId) { 280 lock (pendingOptimizerMappingsLocker) { 281 foreach (IOptimizer optimizer in parentOptimizersByPendingOptimizer.Keys) { 282 SerializedJob serializedJob = CreateSerializedJob(optimizer); 283 ResponseObject<JobDto> response = clientFacade.AddJobWithGroupStrings(serializedJob, groups); 282 284 pendingOptimizersByJobId.Add(response.Obj.Id, optimizer); 285 286 JobItem jobItem = new JobItem() { 287 JobDto = response.Obj, 288 LatestSnapshot = null, 289 Optimizer = optimizer 290 }; 291 lock (jobItems) { 292 jobItems.Add(jobItem); 293 } 294 LogMessage(jobItem.JobDto.Id, "Job sent to Hive"); 283 295 } 284 285 JobItem jobItem = new JobItem() {286 JobDto = response.Obj,287 LatestSnapshot = null,288 Optimizer = optimizer289 };290 lock (jobItems) {291 jobItems.Add(jobItem);292 }293 LogMessage(jobItem.JobDto.Id, "Job sent to Hive");294 296 } 295 297 } … … 396 398 397 399 private bool NoMorePendingOptimizers() { 398 lock (pendingOptimizer sByJobId) {400 lock (pendingOptimizerMappingsLocker) { 399 401 return pendingOptimizersByJobId.Count == 0; 400 402 } … … 408 410 /// <param name="jobId"></param> 409 411 private void DisposeOptimizerMappings(Guid jobId) { 410 lock (pendingOptimizersByJobId) {411 LogMessage(jobId, "Disposing Optimizer Mappings");412 LogMessage(jobId, "Disposing Optimizer Mappings"); 413 lock (pendingOptimizerMappingsLocker) { 412 414 parentOptimizersByPendingOptimizer.Remove(pendingOptimizersByJobId[jobId]); 413 415 pendingOptimizersByJobId.Remove(jobId); … … 436 438 private void JobItem_JobStateChanged(object sender, EventArgs e) { 437 439 JobItem jobItem = (JobItem)sender; 440 438 441 Thread t = new Thread(() => { 439 if (jobItem.State == JobState.Finished) { 440 FetchAndUpdateJob(jobItem.JobDto.Id); 441 DisposeOptimizerMappings(jobItem.JobDto.Id); 442 } else if (jobItem.State == JobState.Failed) { 443 DisposeOptimizerMappings(jobItem.JobDto.Id); 444 } 445 446 if (NoMorePendingOptimizers()) { 447 StopResultPolling(); 448 this.ExecutionState = Core.ExecutionState.Stopped; 449 OnStopped(); 442 try { 443 if (jobItem.State == JobState.Finished) { 444 FetchAndUpdateJob(jobItem.JobDto.Id); 445 DisposeOptimizerMappings(jobItem.JobDto.Id); 446 } else if (jobItem.State == JobState.Failed) { 447 DisposeOptimizerMappings(jobItem.JobDto.Id); 448 } 449 450 if (NoMorePendingOptimizers()) { 451 StopResultPolling(); 452 this.ExecutionState = Core.ExecutionState.Stopped; 453 OnStopped(); 454 } 455 } 456 catch (Exception ex) { 457 Logger.Error("JobItem_JobStateChanged failed badly: " + ex.Message); 458 LogMessage("JobItem_JobStateChanged failed badly: " + ex.Message); 450 459 } 451 460 }); … … 457 466 /// </summary> 458 467 private void FetchAndUpdateJob(Guid jobId) { 468 bool tryagain = false; 459 469 LogMessage(jobId, "FetchAndUpdateJob started"); 460 IClientFacade clientFacade = CreateStreamedClientFacade(); 461 IOptimizer originalOptimizer; 462 lock (pendingOptimizersByJobId) { 463 originalOptimizer = pendingOptimizersByJobId[jobId]; 464 } 465 466 fetchJobSemaphore.WaitOne(); 467 ResponseObject<SerializedJob> jobResponse = clientFacade.GetLastSerializedResult(jobId, false, false); 468 ServiceLocator.DisposeClientFacade(clientFacade); 469 IJob restoredObject = XmlParser.Deserialize<IJob>(new MemoryStream(jobResponse.Obj.SerializedJobData)); 470 IOptimizer restoredOptimizer = ((OptimizerJob)restoredObject).Optimizer; 471 472 ReplaceOptimizer(parentOptimizersByPendingOptimizer[originalOptimizer], originalOptimizer, restoredOptimizer); 473 fetchJobSemaphore.Release(); 474 LogMessage(jobId, "FetchAndUpdateJob ended"); 470 if (fetchJobSemaphore.WaitOne(new TimeSpan(0, 2, 0))) { 471 IClientFacade clientFacade = null; 472 try { 473 clientFacade = CreateStreamedClientFacade(); 474 IOptimizer originalOptimizer; 475 originalOptimizer = pendingOptimizersByJobId[jobId]; 476 477 ResponseObject<SerializedJob> jobResponse = clientFacade.GetLastSerializedResult(jobId, false, false); 478 IJob restoredObject = XmlParser.Deserialize<IJob>(new MemoryStream(jobResponse.Obj.SerializedJobData)); 479 IOptimizer restoredOptimizer = ((OptimizerJob)restoredObject).Optimizer; 480 ReplaceOptimizer(parentOptimizersByPendingOptimizer[originalOptimizer], originalOptimizer, restoredOptimizer); 481 LogMessage(jobId, "FetchAndUpdateJob ended"); 482 } 483 catch (Exception e) { 484 LogMessage(jobId, "FetchAndUpdateJob failed: " + e.Message + ". Will try again!"); 485 tryagain = true; 486 } 487 finally { 488 ServiceLocator.DisposeClientFacade(clientFacade); 489 fetchJobSemaphore.Release(); 490 } 491 } else { 492 LogMessage(jobId, "FetchAndUpdateJob timed out. Will try again!"); 493 tryagain = true; 494 } 495 496 if (tryagain) { 497 FetchAndUpdateJob(jobId); 498 } 475 499 } 476 500 … … 509 533 PluginsNeeded = pluginsNeeded, 510 534 State = JobState.Offline, 511 MemoryNeeded = 0, 512 UserId = Guid.Empty // [chn] set real userid here! 535 MemoryNeeded = 0 513 536 }; 514 537 … … 537 560 public void StopResultPolling() { 538 561 this.stopResultsPollingPending = true; 539 resultPollingThread.Interrupt(); 562 if (resultPollingThread != null && resultPollingThread.ThreadState == System.Threading.ThreadState.WaitSleepJoin) { 563 resultPollingThread.Interrupt(); 564 } 540 565 this.stopResultsPollingPending = false; 541 566 } … … 581 606 // thread has been interuppted 582 607 } 608 catch (Exception e) { 609 LogMessage("Result Polling Thread failed badly: " + e.Message); 610 Logger.Error("Result Polling Thread failed badly: " + e.Message); 611 } 583 612 finally { 584 613 this.IsPollingResults = false; … … 598 627 public void RequestSnapshot(Guid jobId) { 599 628 Thread t = new Thread(() => { 600 IClientFacade clientFacade = CreateStreamedClientFacade();629 IClientFacade clientFacade = null; 601 630 try { 631 clientFacade = CreateStreamedClientFacade(); 632 602 633 ResponseObject<SerializedJob> response; 603 634 int retryCount = 0; … … 633 664 } 634 665 } 666 catch (Exception e) { 667 LogMessage("RequestSnapshot Thread failed badly: " + e.Message); 668 Logger.Error("RequestSnapshot Thread failed badly: " + e.Message); 669 } 635 670 finally { 636 671 ServiceLocator.DisposeClientFacade(clientFacade); … … 885 920 clientFacade = ServiceLocator.CreateClientFacade(Settings.Default.HiveServerIp); 886 921 887 } catch (EndpointNotFoundException exception) { 922 } 923 catch (EndpointNotFoundException exception) { 888 924 LogMessage("Could not connect to Server: " + exception.Message + ". Will try again in " + (resultPollingIntervalMs / 1000) + " sec."); 889 925 Thread.Sleep(resultPollingIntervalMs); … … 899 935 //clientFacade = ServiceLocator.CreateStreamedClientFacade(string.Format("http://{0}:{1}/{2}", Settings.Default.HiveServerIp, Settings.Default.HiveServerPort, WcfSettings.ClientStreamedServiceName)); 900 936 clientFacade = ServiceLocator.CreateStreamedClientFacade(Settings.Default.HiveServerIp); 901 } catch (EndpointNotFoundException exception) { 937 } 938 catch (EndpointNotFoundException exception) { 902 939 LogMessage("Could not connect to Server: " + exception.Message + ". Will try again in " + (resultPollingIntervalMs / 1000) + " sec."); 903 940 Thread.Sleep(resultPollingIntervalMs); -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment/3.3/app.config
r4316 r4333 32 32 openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:10:00" 33 33 transactionFlow="false" transferMode="Streamed" transactionProtocol="OleTransactions" 34 hostNameComparisonMode="StrongWildcard" listenBacklog="10 "35 maxBufferPoolSize="104857600" maxBufferSize="104857600" maxConnections="10 "34 hostNameComparisonMode="StrongWildcard" listenBacklog="100" 35 maxBufferPoolSize="104857600" maxBufferSize="104857600" maxConnections="100" 36 36 maxReceivedMessageSize="104857600"> 37 37 <readerQuotas maxDepth="32" maxStringContentLength="104857600" maxArrayLength="104857600" … … 47 47 openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" 48 48 transactionFlow="false" transferMode="Buffered" transactionProtocol="OleTransactions" 49 hostNameComparisonMode="StrongWildcard" listenBacklog="10 "50 maxBufferPoolSize="524288" maxBufferSize="65536" maxConnections="10 "49 hostNameComparisonMode="StrongWildcard" listenBacklog="100" 50 maxBufferPoolSize="524288" maxBufferSize="65536" maxConnections="100" 51 51 maxReceivedMessageSize="65536"> 52 52 <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/Facades/ClientFacade.cs
r4302 r4333 62 62 public Response RequestSnapshot(Guid jobId) { 63 63 using (contextFactory.GetContext()) { 64 ServiceLocator.GetAuthorizationManager().AuthorizeForJobs(jobId); 64 65 return jobManager.RequestSnapshot(jobId); 65 66 } … … 70 71 public ResponseObject<SerializedJob> GetLastSerializedResult(Guid jobId, bool requested, bool snapshot) { 71 72 using (contextFactory.GetContext(false)) { 73 ServiceLocator.GetAuthorizationManager().AuthorizeForJobs(jobId); 72 74 return jobManager.GetLastSerializedResult(jobId, requested, snapshot); 73 75 } … … 78 80 public ResponseObject<JobDto> GetJobById(Guid jobId) { 79 81 using (contextFactory.GetContext(false)) { 82 ServiceLocator.GetAuthorizationManager().AuthorizeForJobs(jobId); 80 83 return jobManager.GetJobById(jobId); 81 84 } … … 86 89 public Response AbortJob(Guid jobId) { 87 90 using (contextFactory.GetContext()) { 91 ServiceLocator.GetAuthorizationManager().AuthorizeForJobs(jobId); 88 92 return jobManager.AbortJob(jobId); 89 93 } … … 94 98 public ResponseObject<JobResultList> GetJobResults(IEnumerable<Guid> jobIds) { 95 99 using (contextFactory.GetContext(false)) { 100 ServiceLocator.GetAuthorizationManager().AuthorizeForJobs(jobIds.ToArray()); 96 101 return jobManager.GetJobResults(jobIds); 97 102 } -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/Facades/ServerConsoleFacade.cs
r4302 r4333 33 33 using System.Security.Permissions; 34 34 35 //IIdentity id = ServiceSecurityContext.Current.PrimaryIdentity;36 //if (!Thread.CurrentPrincipal.IsInRole("Administrator")) {37 38 //} else {39 // // access denied40 // throw new SecurityException();41 //}42 43 35 namespace HeuristicLab.Hive.Server.Core { 44 36 public class ServerConsoleFacade : IServerConsoleFacade { -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/Facades/SlaveFacade.cs
r4305 r4333 77 77 public ResponseResultReceived StoreFinishedJobResult(Guid slaveId, Guid jobId, byte[] result, double percentage, string exception) { 78 78 using (contextFactory.GetContext()) { 79 ServiceLocator.GetAuthorizationManager().AuthorizeForJobs(jobId); 79 80 return slaveCommunicator.StoreFinishedJobResult(slaveId, jobId, result, percentage, exception); 80 81 } … … 93 94 public Response IsJobStillNeeded(Guid jobId) { 94 95 using (contextFactory.GetContext()) { 95 return slaveCommunicator.IsJobStillNeeded(jobId); 96 ServiceLocator.GetAuthorizationManager().AuthorizeForJobs(jobId); 97 return slaveCommunicator.IsJobStillNeeded(jobId); 96 98 } 97 99 } … … 100 102 [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Slave)] 101 103 public ResponseList<CachedHivePluginInfoDto> GetPlugins(List<HivePluginInfoDto> pluginList) { 102 return slaveCommunicator.GetPlugins(pluginList); 104 return slaveCommunicator.GetPlugins(pluginList); 103 105 } 104 106 … … 107 109 public ResponseResultReceived ProcessSnapshot(Guid slaveId, Guid jobId, byte[] result, double percentage, string exception) { 108 110 using (contextFactory.GetContext()) { 109 return slaveCommunicator.ProcessSnapshot(slaveId, jobId, result, percentage, exception); 111 ServiceLocator.GetAuthorizationManager().AuthorizeForJobs(jobId); 112 return slaveCommunicator.ProcessSnapshot(slaveId, jobId, result, percentage, exception); 110 113 } 111 114 } … … 115 118 public ResponseCalendar GetCalendar(Guid slaveId) { 116 119 using (contextFactory.GetContext()) { 117 return slaveCommunicator.GetCalendar(slaveId); 120 return slaveCommunicator.GetCalendar(slaveId); 118 121 } 119 122 } … … 121 124 [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Administrator)] 122 125 [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Slave)] 123 public Response SetCalendarStatus(Guid slaveId, CalendarState state) { 126 public Response SetCalendarStatus(Guid slaveId, CalendarState state) { 124 127 using (contextFactory.GetContext()) { 125 128 return slaveCommunicator.SetCalendarStatus(slaveId, state); … … 137 140 public Stream GetStreamedJob(Guid slaveId) { 138 141 using (contextFactory.GetContext(false)) { 142 ResponseObject<JobDto> job = null; 139 143 MultiStream stream = new MultiStream(); 140 141 ResponseObject<JobDto> job = null;142 143 144 job = ServiceLocator.GetSlaveCommunicator().GetJob(slaveId); 144 145 … … 183 184 public ResponseResultReceived ProcessSnapshotStreamed(Stream stream) { 184 185 using (contextFactory.GetContext()) { 185 return ((IInternalSlaveCommunicator)slaveCommunicator).ProcessJobResult(stream, false); 186 return ((IInternalSlaveCommunicator)slaveCommunicator).ProcessJobResult(stream, false); 186 187 } 187 188 } -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/HeuristicLab.Hive.Server.Core-3.3.csproj
r4302 r4333 114 114 </ItemGroup> 115 115 <ItemGroup> 116 <Compile Include="Authorization\AuthorizationManager.cs" /> 116 117 <Compile Include="CreateHiveDatabaseApplication.cs" /> 117 118 <Compile Include="SlaveCommunicator.cs" /> … … 122 123 <Compile Include="Facades\ClientFacade.cs" /> 123 124 <Compile Include="HeuristicLabHiveServerCorePlugin.cs" /> 124 <Compile Include="InternalInterfaces\I HivePermissionManager.cs" />125 <Compile Include="InternalInterfaces\IAuthorizationManager.cs" /> 125 126 <Compile Include="InternalInterfaces\IInternalSlaveCommunicator.cs" /> 126 127 <Compile Include="InternalInterfaces\IInternalJobManager.cs" /> … … 158 159 </ProjectReference> 159 160 </ItemGroup> 160 <ItemGroup> 161 <Folder Include="Authorization\" /> 162 </ItemGroup> 161 <ItemGroup /> 163 162 <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> 164 163 <ProjectExtensions> -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/InternalInterfaces/IInternalSlaveCommunicator.cs
r4263 r4333 31 31 namespace HeuristicLab.Hive.Server.Core.InternalInterfaces { 32 32 interface IInternalSlaveCommunicator { 33 ResponseResultReceived ProcessJobResult( 34 Stream stream, 35 bool finished); 33 ResponseResultReceived ProcessJobResult(Stream stream, bool finished); 36 34 } 37 35 } -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/JobManager.cs
r4267 r4333 167 167 168 168 job.JobInfo.DateCreated = DateTime.Now; 169 job.JobInfo.UserId = ServiceLocator.GetAuthorizationManager().UserId; 169 170 DaoLocator.JobDao.InsertWithAttachedJob(job); 170 171 DaoLocator.PluginInfoDao.InsertPluginDependenciesForJob(job.JobInfo); -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/ServiceLocator.cs
r4302 r4333 42 42 43 43 private static ILifecycleManager lifecycleManager = null; 44 45 private static ISessionFactory sessionFactory = null; 46 44 47 45 private static IScheduler scheduler = null; 48 46 49 //private static IPermissionManager permManager = null; 50 51 private static IHivePermissionManager hivePermManager = null; 52 47 private static IAuthorizationManager authorizationManager = null; 48 53 49 private static IContextFactory contextFactory = null; 54 50 … … 118 114 /// </summary> 119 115 /// <returns></returns> 120 //[MethodImpl(MethodImplOptions.Synchronized)] 121 //public static IPermissionManager GetPermissionManager() { 122 // if (permManager == null) 123 // permManager = ApplicationManager.Manager.GetInstances<IPermissionManager>().First(); 124 // return permManager; 125 126 //} 127 128 ///// <summary> 129 ///// Gets the permission manager 130 ///// </summary> 131 ///// <returns></returns> 132 //[MethodImpl(MethodImplOptions.Synchronized)] 133 //public static IHivePermissionManager GetHivePermissionManager() { 134 // if (hivePermManager == null) 135 // hivePermManager = ApplicationManager.Manager.GetInstances<IHivePermissionManager>().First(); 136 // return hivePermManager; 137 138 //} 116 [MethodImpl(MethodImplOptions.Synchronized)] 117 public static IAuthorizationManager GetAuthorizationManager() { 118 if (authorizationManager == null) 119 authorizationManager = ApplicationManager.Manager.GetInstances<IAuthorizationManager>().First(); 120 return authorizationManager; 121 } 139 122 140 123 /// <summary> -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/SlaveCommunicator.cs
r4305 r4333 247 247 /// check if there is work for the slave and send the slave a response if he should pull a job 248 248 /// </summary> 249 /// <param name="h bData"></param>249 /// <param name="heartbeatData"></param> 250 250 /// <returns></returns> 251 public ResponseHeartBeat ProcessHeartBeat(HeartBeatData h bData) {252 Logger.Debug("BEGIN Processing Heartbeat for Slave " + h bData.SlaveId);251 public ResponseHeartBeat ProcessHeartBeat(HeartBeatData heartbeatData) { 252 Logger.Debug("BEGIN Processing Heartbeat for Slave " + heartbeatData.SlaveId); 253 253 254 254 ResponseHeartBeat response = new ResponseHeartBeat(); … … 256 256 257 257 Logger.Debug("BEGIN Started Slave Fetching"); 258 SlaveDto slave = DaoLocator.SlaveDao.FindById(h bData.SlaveId);258 SlaveDto slave = DaoLocator.SlaveDao.FindById(heartbeatData.SlaveId); 259 259 Logger.Debug("END Finished Slave Fetching"); 260 260 261 slave.NrOfFreeCores = h bData.FreeCores;262 slave.FreeMemory = h bData.FreeMemory;263 slave.IsAllowedToCalculate = h bData.IsAllowedToCalculate;261 slave.NrOfFreeCores = heartbeatData.FreeCores; 262 slave.FreeMemory = heartbeatData.FreeMemory; 263 slave.IsAllowedToCalculate = heartbeatData.IsAllowedToCalculate; 264 264 265 265 // check if the slave is logged in … … 275 275 heartbeatLock.EnterWriteLock(); 276 276 Logger.Debug("END Locked for Heartbeats"); 277 if (lastHeartbeats.ContainsKey(h bData.SlaveId)) {278 lastHeartbeats[h bData.SlaveId] = DateTime.Now;277 if (lastHeartbeats.ContainsKey(heartbeatData.SlaveId)) { 278 lastHeartbeats[heartbeatData.SlaveId] = DateTime.Now; 279 279 } else { 280 lastHeartbeats.Add(h bData.SlaveId, DateTime.Now);280 lastHeartbeats.Add(heartbeatData.SlaveId, DateTime.Now); 281 281 } 282 282 heartbeatLock.ExitWriteLock(); 283 283 284 284 Logger.Debug("BEGIN Processing Heartbeat Jobs"); 285 ProcessJobProcess(h bData, response);285 ProcessJobProcess(heartbeatData, response); 286 286 Logger.Debug("END Processed Heartbeat Jobs"); 287 287 … … 296 296 // if true, ask scheduler for a new job for this slave 297 297 Logger.Debug(" BEGIN Looking for Slave Jobs"); 298 if (slave.IsAllowedToCalculate && h bData.FreeCores > 0 && scheduler.ExistsJobForSlave(hbData)) {298 if (slave.IsAllowedToCalculate && heartbeatData.FreeCores > 0 && scheduler.ExistsJobForSlave(heartbeatData)) { 299 299 response.ActionRequest.Add(new MessageContainer(MessageContainer.MessageType.FetchJob)); 300 300 } else { … … 306 306 307 307 //tx.Commit(); 308 Logger.Debug(" END Processed Heartbeat for Slave " + h bData.SlaveId);308 Logger.Debug(" END Processed Heartbeat for Slave " + heartbeatData.SlaveId); 309 309 return response; 310 310 } … … 341 341 if (hbData.JobProgress != null && hbData.JobProgress.Count > 0) { 342 342 if (jobsOfSlave == null || jobsOfSlave.Count == 0) { 343 //response.Success = false;344 //response.StatusMessage = ApplicationConstants.RESPONSE_COMMUNICATOR_JOB_IS_NOT_BEEING_CALCULATED;345 346 343 foreach (Guid jobId in hbData.JobProgress.Keys) { 347 344 response.ActionRequest.Add(new MessageContainer(MessageContainer.MessageType.AbortJob, jobId)); … … 354 351 foreach (KeyValuePair<Guid, double> jobProgress in hbData.JobProgress) { 355 352 JobDto curJob = DaoLocator.JobDao.FindById(jobProgress.Key); 353 if (curJob == null) { 354 response.StatusMessage = ResponseStatus.ProcessJobResult_JobDoesNotExist; 355 response.ActionRequest.Add(new MessageContainer(MessageContainer.MessageType.AbortJob, jobProgress.Key)); 356 Logger.Error("Job does not exist in DB: " + jobProgress.Key); 357 return; 358 } 356 359 curJob.Slave = DaoLocator.SlaveDao.GetSlaveForJob(curJob.Id); 357 360 if (curJob.Slave == null || curJob.Slave.Id != hbData.SlaveId) { 358 //response.Success = false;359 //response.StatusMessage = ApplicationConstants.RESPONSE_COMMUNICATOR_JOB_IS_NOT_BEEING_CALCULATED;360 361 response.ActionRequest.Add(new MessageContainer(MessageContainer.MessageType.AbortJob, curJob.Id)); 361 362 Logger.Error("There is no job calculated by this user " + hbData.SlaveId + " Job: " + curJob); -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/app.config
r4320 r4333 1 1 <?xml version="1.0" encoding="utf-8" ?> 2 2 <configuration> 3 <system.diagnostics> 4 <sources> 5 <source name="Warnings" switchValue="Warning, ActivityTracing"> 6 <listeners> 7 <add type="System.Diagnostics.DefaultTraceListener" name="Default"> 8 <filter type="" /> 9 </add> 10 </listeners> 11 </source> 12 </sources> 13 <sharedListeners> 14 <add type="System.Diagnostics.EventLogTraceListener, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" 15 name="EventLogTracer" traceOutputOptions="LogicalOperationStack, DateTime, Timestamp, ProcessId, ThreadId, Callstack"> 16 <filter type="" /> 17 </add> 18 </sharedListeners> 19 </system.diagnostics> 3 20 <connectionStrings> 4 21 <add name="HeuristicLab.Authentication" … … 26 43 27 44 <system.serviceModel> 28 45 46 <diagnostics> 47 <messageLogging logEntireMessage="true" logMalformedMessages="true" 48 logMessagesAtServiceLevel="true" logMessagesAtTransportLevel="true" 49 maxMessagesToLog="3000" /> 50 </diagnostics> 29 51 <bindings> 30 52 <netTcpBinding> 31 53 <binding name="TcpStreamedBinding" sendTimeout="00:10:00" transferMode="Streamed" 32 maxBufferPoolSize="104857600" maxBufferSize="104857600" maxReceivedMessageSize="104857600"> 54 maxBufferPoolSize="104857600" maxBufferSize="104857600" 55 maxReceivedMessageSize="104857600" maxConnections="100" listenBacklog="100"> 33 56 <readerQuotas maxStringContentLength="104857600" maxArrayLength="104857600" /> 34 57 <security mode="TransportWithMessageCredential"> 35 <transport clientCredentialType="Certificate" 58 <transport clientCredentialType="Certificate"/> 36 59 <message clientCredentialType="UserName" /> 37 60 </security> … … 39 62 </netTcpBinding> 40 63 <wsHttpBinding> 41 <binding name="H ttpBinding">64 <binding name="HiveServerHttpBinding"> 42 65 <security mode="Message"> 66 <transport/> 43 67 <message clientCredentialType="UserName" /> 44 68 </security> … … 60 84 <serviceSecurityAudit auditLogLocation="Application" suppressAuditFailure="false" 61 85 messageAuthenticationAuditLevel="SuccessOrFailure" /> 86 <serviceThrottling maxConcurrentCalls="100"/> 62 87 </behavior> 63 88 </serviceBehaviors> … … 65 90 <services> 66 91 <service behaviorConfiguration="ServiceBehaviour" name="HeuristicLab.Hive.Server.Core.SlaveFacade"> 67 <endpoint address="" binding="wsHttpBinding" bindingConfiguration="H ttpBinding"92 <endpoint address="" binding="wsHttpBinding" bindingConfiguration="HiveServerHttpBinding" 68 93 name="SlaveHttpEndpoint" contract="HeuristicLab.Hive.Contracts.Interfaces.ISlaveFacade" /> 69 <endpoint address="mex" binding="mexHttpBinding" name="SlaveMexEndpoint" 94 <endpoint address="mex" binding="mexHttpBinding" name="SlaveMexEndpoint" bindingConfiguration="" 70 95 contract="HeuristicLab.Hive.Contracts.Interfaces.ISlaveFacade" /> 71 96 <endpoint binding="netTcpBinding" bindingConfiguration="TcpStreamedBinding" … … 81 106 </service> 82 107 <service behaviorConfiguration="ServiceBehaviour" name="HeuristicLab.Hive.Server.Core.ServerConsoleFacade"> 83 <endpoint address="" binding="wsHttpBinding" bindingConfiguration="H ttpBinding"108 <endpoint address="" binding="wsHttpBinding" bindingConfiguration="HiveServerHttpBinding" 84 109 name="ServerConsoleHttpEndpoint" contract="HeuristicLab.Hive.Contracts.Interfaces.IServerConsoleFacade" /> 85 110 <endpoint address="mex" binding="mexHttpBinding" name="ServerConsoleMexEndpoint" … … 96 121 <endpoint address="mex" binding="mexTcpBinding" bindingConfiguration="" 97 122 name="ClientTcpMexEndpoint" contract="IMetadataExchange" /> 98 <endpoint binding="wsHttpBinding" bindingConfiguration="H ttpBinding"123 <endpoint binding="wsHttpBinding" bindingConfiguration="HiveServerHttpBinding" 99 124 name="ClientHttpEndpoint" contract="HeuristicLab.Hive.Contracts.Interfaces.IClientFacade" /> 100 125 <endpoint address="mex" binding="mexHttpBinding" bindingConfiguration="" … … 108 133 </service> 109 134 </services> 110 135 111 136 </system.serviceModel> 112 137 113 138 </configuration> -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/IJobDao.cs
r4267 r4333 20 20 21 21 IEnumerable<JobDto> FindFittingJobsForSlave(JobState state, int freeCores, int freeMemory, Guid slaveGuid); 22 22 23 Stream GetSerializedJobStream(Guid jobId); 23 24 … … 27 28 28 29 IEnumerable<JobDto> FindJobsById(IEnumerable<Guid> jobIds); 30 31 bool IsUserAuthorizedForJobs(string userId, params Guid[] jobIds); 29 32 } 30 33 } -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.LINQDataAccess/3.3/HeuristicLab.Hive.Server.LINQDataAccess-3.3.csproj
r4296 r4333 128 128 <None Include="HeuristicLab.snk" /> 129 129 <None Include="Properties\AssemblyInfo.frame" /> 130 <None Include="Scripts\UpdateContext.bat" /> 130 131 </ItemGroup> 131 132 <ItemGroup> … … 156 157 <SubType>Designer</SubType> 157 158 </Content> 159 <Content Include="Scripts\cleanHiveDatabase.sql" /> 160 <Content Include="Scripts\prepareHiveDatabase.sql" /> 158 161 </ItemGroup> 159 162 <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.LINQDataAccess/3.3/HiveDataContext.cs
r4267 r4333 1979 1979 private System.Nullable<System.Guid> _ProjectId; 1980 1980 1981 private System.Nullable<System.Guid>_UserId;1981 private string _UserId; 1982 1982 1983 1983 private int _CoresNeeded; … … 2025 2025 partial void OnProjectIdChanging(System.Nullable<System.Guid> value); 2026 2026 partial void OnProjectIdChanged(); 2027 partial void OnUserIdChanging( System.Nullable<System.Guid>value);2027 partial void OnUserIdChanging(string value); 2028 2028 partial void OnUserIdChanged(); 2029 2029 partial void OnCoresNeededChanging(int value); … … 2296 2296 } 2297 2297 2298 [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserId", DbType=" UniqueIdentifier")]2299 public System.Nullable<System.Guid>UserId2298 [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserId", DbType="VarChar(MAX)")] 2299 public string UserId 2300 2300 { 2301 2301 get -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.LINQDataAccess/3.3/HiveDataContext.xml
r4267 r4333 107 107 <Column Name="Priority" Member="Priority" DbType="Int NOT NULL" Type="System.Int32"/> 108 108 <Column Name="ProjectId" Member="ProjectId" DbType="UniqueIdentifier" Type="System.Guid" CanBeNull="true"/> 109 <Column Name="UserId" Member="UserId" DbType=" UniqueIdentifier" Type="System.Guid" CanBeNull="true"/>109 <Column Name="UserId" Member="UserId" DbType="VarChar(MAX)" Type="System.String" CanBeNull="true"/> 110 110 <Column Name="CoresNeeded" Member="CoresNeeded" DbType="Int NOT NULL" Type="System.Int32"/> 111 111 <Column Name="MemoryNeeded" Member="MemoryNeeded" DbType="Int NOT NULL" Type="System.Int32"/> -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.LINQDataAccess/3.3/JobDao.cs
r4267 r4333 150 150 where jobIds.Contains(job.JobId) 151 151 select EntityToDto(job, null); 152 153 152 return jobs.ToList(); 153 } 154 155 public bool IsUserAuthorizedForJobs(string userId, params Guid[] jobIds) { 156 var jobs = from job in Context.Jobs 157 where jobIds.Contains(job.JobId) 158 select job; 159 return jobs.All(job => job.UserId == userId); 154 160 } 155 161 #endregion … … 174 180 target.Priority = source.Priority; 175 181 target.JobState = Enum.GetName(typeof(JobState), source.State); 182 target.UserId = source.UserId; 176 183 return target; 177 184 } … … 185 192 target = new JobDto(); 186 193 187 //target.ParentJob = null;188 //target.PluginsNeeded = null;189 //target.Slave = null;190 //target.Project = null;191 192 194 target.CoresNeeded = source.CoresNeeded; 193 195 target.MemoryNeeded = source.MemoryNeeded; … … 197 199 target.DateFinished = source.DateFinished; 198 200 target.Id = source.JobId; 199 201 200 202 target.Exception = source.Exception; 201 203 target.Percentage = source.Percentage; … … 203 205 target.Priority = source.Priority; 204 206 target.State = (JobState)Enum.Parse(typeof(JobState), source.JobState, true); 207 target.UserId = source.UserId; 205 208 return target; 206 209 } -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server/3.3/HeuristicLabHiveServerApplication.cs
r4316 r4333 35 35 [Application("Hive Server", "Server application for the distributed hive engine.", false)] 36 36 public class HeuristicLabHiveServerApplication : ApplicationBase { 37 //private Dictionary<string, Uri> baseAddrDict = new Dictionary<string, Uri>();38 37 private IDictionary<string, ServiceHost> serviceHosts = new Dictionary<string, ServiceHost>(); 39 38 ILifecycleManager lifecycleManager = null; -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Communication/3.3/WcfService.cs
r4316 r4333 103 103 proxy.Open(); 104 104 Logger.Debug("Opened the Connection"); 105 105 106 106 ConnState = NetworkEnum.WcfConnState.Connected; 107 107 ConnectedSince = DateTime.Now; -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Communication/3.3/app.config
r4316 r4333 23 23 openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:10:00" 24 24 transactionFlow="false" transferMode="Streamed" transactionProtocol="OleTransactions" 25 hostNameComparisonMode="StrongWildcard" listenBacklog="10"maxBufferPoolSize="104857600"26 maxBufferSize="104857600" maxConnections="10 " maxReceivedMessageSize="104857600">25 hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="104857600" 26 maxBufferSize="104857600" maxConnections="100" listenBacklog="100" maxReceivedMessageSize="104857600"> 27 27 <readerQuotas maxDepth="32" maxStringContentLength="104857600" maxArrayLength="104857600" 28 28 maxBytesPerRead="4096" maxNameTableCharCount="16384" /> … … 37 37 receiveTimeout="00:10:00" sendTimeout="00:01:00" transactionFlow="false" 38 38 transferMode="Buffered" transactionProtocol="OleTransactions" 39 hostNameComparisonMode="StrongWildcard" listenBacklog="10"maxBufferPoolSize="524288"40 maxBufferSize="65536" maxConnections="10 " maxReceivedMessageSize="65536">39 hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" 40 maxBufferSize="65536" maxConnections="100" listenBacklog="100" maxReceivedMessageSize="65536"> 41 41 <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" 42 42 maxBytesPerRead="4096" maxNameTableCharCount="16384" /> -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Console/3.3/app.config
r4320 r4333 19 19 openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" 20 20 transactionFlow="false" transferMode="Buffered" transactionProtocol="OleTransactions" 21 hostNameComparisonMode="StrongWildcard" listenBacklog="10 " maxBufferPoolSize="524288"22 maxBufferSize="65536" maxConnections="10 " maxReceivedMessageSize="65536">21 hostNameComparisonMode="StrongWildcard" listenBacklog="100" maxBufferPoolSize="524288" 22 maxBufferSize="65536" maxConnections="100" maxReceivedMessageSize="65536"> 23 23 <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" 24 24 maxBytesPerRead="4096" maxNameTableCharCount="16384" /> -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Core/3.3/ConfigurationManager/ConfigManager.cs
r4320 r4333 114 114 st.JobsFetched = SlaveStatusInfo.JobsFetched; 115 115 116 Dictionary<Guid, Executor> engines = Core. GetExecutionEngines();116 Dictionary<Guid, Executor> engines = Core.ExecutionEngines; 117 117 st.Jobs = new List<JobStatus>(); 118 118 … … 128 128 public Dictionary<Guid, double> GetProgressOfAllJobs() { 129 129 Dictionary<Guid, double> prog = new Dictionary<Guid, double>(); 130 Dictionary<Guid, Executor> engines = Core. GetExecutionEngines();130 Dictionary<Guid, Executor> engines = Core.ExecutionEngines; 131 131 lock (engines) { 132 132 foreach (KeyValuePair<Guid, Executor> kvp in engines) { … … 140 140 141 141 public int GetUsedCores() { 142 Dictionary<Guid, Executor> engines = Core. GetExecutionEngines();143 Dictionary<Guid, JobDto> jobs = Core. GetJobs();142 Dictionary<Guid, Executor> engines = Core.ExecutionEngines; 143 Dictionary<Guid, JobDto> jobs = Core.Jobs; 144 144 int usedCores = 0; 145 145 lock (engines) { -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Core/3.3/Core.cs
r4320 r4333 44 44 public static bool abortRequested { get; set; } 45 45 46 private bool _currentlyFetching;46 private bool currentlyFetching; 47 47 private bool CurrentlyFetching { 48 48 get { 49 return _currentlyFetching;49 return currentlyFetching; 50 50 } 51 51 set { 52 _currentlyFetching = value;53 Logger.Debug("Set CurrentlyFetching to " + _currentlyFetching);52 currentlyFetching = value; 53 Logger.Debug("Set CurrentlyFetching to " + currentlyFetching); 54 54 } 55 55 } … … 69 69 Logger.Info("Hive Slave started"); 70 70 SlaveConsoleServer server = new SlaveConsoleServer(); 71 server.Start ClientConsoleServer();71 server.Start(); 72 72 73 73 ConfigManager manager = ConfigManager.Instance; 74 74 manager.Core = this; 75 75 76 //Register all Wcf Service references77 76 wcfService = WcfService.Instance; 77 RegisterServiceEvents(); 78 79 RecoverSettings(); // recover server IP from the settings framework 80 StartHeartbeats(); // Start heartbeats thread 81 DispatchMessageQueue(); // dispatch messages until abortRequested 82 83 DeRegisterServiceEvents(); 84 server.Close(); 85 Logger.Info("Program shutdown"); 86 } 87 88 private void RecoverSettings() { 89 ConnectionContainer cc = ConfigManager.Instance.GetServerIP(); 90 if (cc.IPAdress != String.Empty) { 91 wcfService.SetIP(cc.IPAdress); 92 } 93 } 94 95 private void StartHeartbeats() { 96 //Initialize the heartbeat 97 beat = new HeartbeatManager { Interval = new TimeSpan(0, 0, 10) }; 98 beat.StartHeartbeat(); 99 } 100 101 private void DispatchMessageQueue() { 102 MessageQueue queue = MessageQueue.GetInstance(); 103 while (!abortRequested) { 104 MessageContainer container = queue.GetMessage(); 105 DetermineAction(container); 106 } 107 } 108 109 private void RegisterServiceEvents() { 78 110 wcfService.GetJobCompleted += new EventHandler<GetJobCompletedEventArgs>(wcfService_GetJobCompleted); 79 111 wcfService.GetFinishedJobResultCompleted += new EventHandler<StoreFinishedJobResultCompletedEventArgs>(wcfService_StoreFinishedJobResultCompleted); … … 82 114 wcfService.ServerChanged += new EventHandler(wcfService_ServerChanged); 83 115 wcfService.Connected += new EventHandler(wcfService_Connected); 84 85 //Recover Server IP and Port from the Settings Framework 86 ConnectionContainer cc = ConfigManager.Instance.GetServerIP(); 87 if (cc.IPAdress != String.Empty) 88 wcfService.SetIP(cc.IPAdress); 89 90 //Initialize the heartbeat 91 beat = new HeartbeatManager { Interval = new TimeSpan(0, 0, 10) }; 92 beat.StartHeartbeat(); 93 94 MessageQueue queue = MessageQueue.GetInstance(); 95 96 //Main processing loop 97 //Todo: own thread for message handling 98 //Rly?! 99 while (!abortRequested) { 100 MessageContainer container = queue.GetMessage(); 101 DetermineAction(container); 102 } 103 Logger.Info("Program shutdown"); 116 } 117 118 private void DeRegisterServiceEvents() { 119 wcfService.GetJobCompleted -= new EventHandler<GetJobCompletedEventArgs>(wcfService_GetJobCompleted); 120 wcfService.GetFinishedJobResultCompleted -= new EventHandler<StoreFinishedJobResultCompletedEventArgs>(wcfService_StoreFinishedJobResultCompleted); 121 wcfService.ProcessSnapshotCompleted -= new EventHandler<ProcessSnapshotCompletedEventArgs>(wcfService_ProcessSnapshotCompleted); 122 wcfService.ConnectionRestored -= new EventHandler(wcfService_ConnectionRestored); 123 wcfService.ServerChanged -= new EventHandler(wcfService_ServerChanged); 124 wcfService.Connected -= new EventHandler(wcfService_Connected); 104 125 } 105 126 … … 433 454 #endregion 434 455 435 public Dictionary<Guid, Executor> GetExecutionEngines() { 436 return engines; 456 public Dictionary<Guid, Executor> ExecutionEngines { 457 get { return engines; } 458 } 459 460 internal Dictionary<Guid, JobDto> Jobs { 461 get { return jobs; } 437 462 } 438 463 439 464 void appDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e) { 440 465 Logger.Error("Exception in AppDomain: " + e.ExceptionObject.ToString()); 441 }442 443 internal Dictionary<Guid, JobDto> GetJobs() {444 return jobs;445 466 } 446 467 -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Core/3.3/SlaveConsoleService/SlaveConsoleServer.cs
r4320 r4333 11 11 namespace HeuristicLab.Hive.Slave.Core.SlaveConsoleService { 12 12 public class SlaveConsoleServer { 13 public ServiceHost StartClientConsoleServer() { 14 ServiceHost host = new ServiceHost(ApplicationManager.Manager.GetTypes(typeof(ISlaveConsoleCommunicator)).First()); 13 ServiceHost host = null; 14 15 public void Start() { 16 host = new ServiceHost(ApplicationManager.Manager.GetTypes(typeof(ISlaveConsoleCommunicator)).First()); 15 17 host.Open(); 16 return host; 18 } 19 20 public void Close() { 21 host.Close(); 17 22 } 18 23 } -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Core/3.3/app.config
r4320 r4333 26 26 <bindings> 27 27 <netTcpBinding> 28 <binding name="SlaveConsoleTcpBinding" >28 <binding name="SlaveConsoleTcpBinding" listenBacklog="100" maxConnections="100"> 29 29 <security mode="None"> 30 <transport> 31 <extendedProtectionPolicy policyEnforcement="Never" /> 32 </transport> 30 <transport/> 33 31 </security> 34 32 </binding> … … 41 39 name="SlaveConsoleTcpEndpoint" contract="HeuristicLab.Hive.Slave.Core.SlaveConsoleService.Interfaces.ISlaveConsoleCommunicator" /> 42 40 <endpoint address="mex" binding="mexTcpBinding" bindingConfiguration="" 43 name="SlaveConsoleTcpMex Binding" contract="IMetadataExchange" />41 name="SlaveConsoleTcpMexEndpoint" contract="IMetadataExchange" /> 44 42 <host> 45 43 <baseAddresses> -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive/3.3/HeuristicLab.Hive-3.3.dll.config
r4302 r4333 10 10 <gcServer enabled="true"/> 11 11 </runtime> 12 13 12 </configuration>
Note: See TracChangeset
for help on using the changeset viewer.