Changeset 1340
- Timestamp:
- 03/13/09 11:59:36 (16 years ago)
- Location:
- trunk/sources
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Hive.Client.Communication/WcfService.cs
r1271 r1340 89 89 if (Connected != null) 90 90 Connected(this, new EventArgs()); 91 91 //Todo: This won't be hit. EVER 92 92 if (ConnState == NetworkEnum.WcfConnState.Failed) 93 93 ConnectionRestored(this, new EventArgs()); 94 94 } 95 95 catch (Exception ex) { 96 //Todo: Rename to HandleNetworkError 96 97 NetworkErrorHandling(ex); 97 98 } -
trunk/sources/HeuristicLab.Hive.Client.Core/Core.cs
r1260 r1340 52 52 public class Core: MarshalByRefObject { 53 53 public delegate string GetASnapshotDelegate(); 54 54 //Todo: private + getter/setter removen. 55 55 public static Object Locker { get; set; } 56 56 //Todo: ev. Rename to "abortRequested" 57 57 public static bool ShutdownFlag { get; set; } 58 58 59 //Todo: Access modifier 59 60 Dictionary<long, Executor> engines = new Dictionary<long, Executor>(); 60 61 Dictionary<long, AppDomain> appDomains = new Dictionary<long, AppDomain>(); … … 98 99 MessageQueue queue = MessageQueue.GetInstance(); 99 100 100 //Main processing loop 101 //Main processing loop 102 //Todo: own thread for message handling 101 103 while (!ShutdownFlag) { 102 104 MessageContainer container = queue.GetMessage(); … … 112 114 /// <param name="container">The Container, containing the message</param> 113 115 private void DetermineAction(MessageContainer container) { 116 //Todo: Threads aus Threadpool verwenden 117 114 118 switch (container.Message) { 115 119 //Server requests to abort a job … … 152 156 private void GetFinishedJob(object jobId) { 153 157 long jId = (long)jobId; 158 //Todo: Don't return null, throw exception! 154 159 byte[] sJob = engines[jId].GetFinishedJob(); 155 160 … … 162 167 true); 163 168 } else { 169 //Todo: locking 164 170 JobStorrageManager.PersistObjectToDisc(wcfService.ServerIP, wcfService.ServerPort, jId, sJob); 165 171 AppDomain.Unload(appDomains[jId]); … … 219 225 } 220 226 227 //Todo: Remove intellgent stuff from the async event and move it to the main thread (message queue) 228 //Todo: Seperate this method into 2: Finished jobs and Snapshots 221 229 void wcfService_SendJobResultCompleted(object sender, SendJobResultCompletedEventArgs e) { 222 230 if (e.Result.Success) { … … 237 245 } 238 246 } else { 247 //Todo: don't Java Style! IT'S EVIL! 239 248 Logging.GetInstance().Error(this.ToString(), "Sending of job " + e.Result.JobId + " failed"); 240 249 } 241 250 } 242 251 252 //Todo: First stop all threads, then terminate 243 253 void wcfService_ServerChanged(object sender, EventArgs e) { 244 254 Logging.GetInstance().Info(this.ToString(), "ServerChanged has been called"); -
trunk/sources/HeuristicLab.Hive.Client.Core/Heartbeat.cs
r1255 r1340 73 73 Console.WriteLine("tick"); 74 74 ClientInfo info = ConfigManager.Instance.GetClientInfo(); 75 // Todo: remove tempfix for free cores. 75 // Todo: remove tempfix for free cores. Fix spelling of freeCores (uppercase) 76 76 77 77 HeartBeatData heartBeatData = new HeartBeatData { -
trunk/sources/HeuristicLab.Hive.Client.Core/JobStorrage/JobStorrageManager.cs
r1271 r1340 13 13 14 14 private static List<JobStorrageInfo> storedJobsList = new List<JobStorrageInfo>(); 15 //Todo: execution path 16 //Todo: Choose a better directory name 15 17 private static String path = "C:\\Program Files\\HeuristicLab 3.0\\plugins\\jobStorrage\\"; 16 18 … … 19 21 20 22 JobStorrageInfo info = new JobStorrageInfo { JobID = jobId, ServerIP = serverIP, ServerPort = serverPort, TimeFinished = DateTime.Now }; 23 24 //Todo: Filestream won't be closed if exception occurs 21 25 try { 22 26 Stream jobstream = File.Create(path + filename + ".dat"); … … 27 31 } 28 32 catch (Exception e) { 33 //Todo: Change to logging.exception! 29 34 Console.WriteLine(e); 30 35 } … … 37 42 Logging.GetInstance().Info("JobStorrageManager", "Sending stored job " + storedJobsList[index-1].JobID + " to the server"); 38 43 byte[] job = File.ReadAllBytes(path + filename + ".dat"); 44 45 //Todo: ask server first if he really wants the job... 39 46 ResponseResultReceived res = WcfService.Instance.SendStoredJobResultsSync(ConfigManager.Instance.GetClientInfo().ClientId, storedJobsList[index-1].JobID, job, 1.00, null, true); 40 47 //TODO: has to be fixed from server side -
trunk/sources/HeuristicLab.Hive.Server.ADODataAccess/dsHiveServer.cs
r995 r1340 14 14 } 15 15 } 16 17 namespace dsHiveServerTableAdapters { 18 19 20 public partial class HiveUserTableAdapter { 21 } 22 } -
trunk/sources/HeuristicLab.Hive.Server.Core/ClientCommunicator.cs
r1334 r1340 46 46 new ReaderWriterLockSlim(LockRecursionPolicy.SupportsRecursion); 47 47 48 // todo: access modifier! 48 49 IClientAdapter clientAdapter; 49 50 IJobAdapter jobAdapter; … … 143 144 heartbeatLock.ExitWriteLock(); 144 145 146 // todo: allClients legacy ? 145 147 ICollection<ClientInfo> allClients = clientAdapter.GetAll(); 146 148 ClientInfo client = clientAdapter.GetById(clientInfo.ClientId); … … 165 167 /// <param name="hbData"></param> 166 168 /// <returns></returns> 169 // todo: new name for "SendHeartBeat" e.g. ProcessHeartBeat 167 170 public ResponseHB SendHeartBeat(HeartBeatData hbData) { 168 171 ResponseHB response = new ResponseHB();
Note: See TracChangeset
for help on using the changeset viewer.