Changeset 1147
- Timestamp:
- 01/15/09 16:28:23 (16 years ago)
- Location:
- trunk/sources
- Files:
-
- 1 added
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/sources/HeuristicLab.Hive.Client.Communication/HeuristicLab.Hive.Client.Communication.csproj ¶
r1103 r1147 119 119 <None Include="Properties\DataSources\HeuristicLab.Hive.Contracts.ResponseJob.datasource" /> 120 120 <None Include="Properties\DataSources\HeuristicLab.Hive.Contracts.ResponseResultReceived.datasource" /> 121 <None Include="Service References\ServerService\Arrays.xsd" /> 121 122 <None Include="Service References\ServerService\HeuristicLab.Hive.Contracts.BusinessObjects1.xsd" /> 122 123 <None Include="Service References\ServerService\HeuristicLab.Hive.Contracts1.xsd" /> -
TabularUnified trunk/sources/HeuristicLab.Hive.Client.Communication/Service References/ServerService/HeuristicLab.Hive.Contracts.BusinessObjects1.xsd ¶
r1103 r1147 2 2 <xs:schema xmlns:tns="http://schemas.datacontract.org/2004/07/HeuristicLab.Hive.Contracts.BusinessObjects" xmlns:ser="http://schemas.microsoft.com/2003/10/Serialization/" elementFormDefault="qualified" targetNamespace="http://schemas.datacontract.org/2004/07/HeuristicLab.Hive.Contracts.BusinessObjects" xmlns:xs="http://www.w3.org/2001/XMLSchema"> 3 3 <xs:import namespace="http://schemas.microsoft.com/2003/10/Serialization/" /> 4 <xs:import namespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays" /> 4 5 <xs:complexType name="ClientInfo"> 5 6 <xs:complexContent mixed="false"> … … 49 50 <xs:element minOccurs="0" name="freeCores" type="xs:int" /> 50 51 <xs:element minOccurs="0" name="freeMemory" type="xs:int" /> 51 <xs:element minOccurs="0" name="jobProgress" type="xs:int" />52 <xs:element xmlns:q1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" minOccurs="0" name="jobProgress" nillable="true" type="q1:ArrayOfKeyValueOflongdouble" /> 52 53 </xs:sequence> 53 54 </xs:complexType> … … 59 60 <xs:element minOccurs="0" name="ParentJob" nillable="true" type="tns:Job" /> 60 61 <xs:element minOccurs="0" name="Percentage" type="xs:double" /> 62 <xs:element minOccurs="0" name="SerializedJob" nillable="true" type="xs:base64Binary" /> 61 63 <xs:element minOccurs="0" name="State" type="tns:State" /> 62 64 </xs:sequence> -
TabularUnified trunk/sources/HeuristicLab.Hive.Client.Communication/Service References/ServerService/HeuristicLab.Hive.Contracts1.xsd ¶
r1103 r1147 50 50 <xs:sequence> 51 51 <xs:element xmlns:q1="http://schemas.datacontract.org/2004/07/HeuristicLab.Hive.Contracts.BusinessObjects" minOccurs="0" name="Job" nillable="true" type="q1:Job" /> 52 <xs:element minOccurs="0" name="SerializedJob" nillable="true" type="xs:base64Binary" />53 52 </xs:sequence> 54 53 </xs:extension> -
TabularUnified trunk/sources/HeuristicLab.Hive.Client.Communication/Service References/ServerService/Reference.cs ¶
r1103 r1147 44 44 45 45 [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IClientCommunicator/SendJobResult", ReplyAction="http://tempuri.org/IClientCommunicator/SendJobResultResponse")] 46 HeuristicLab.Hive.Contracts.ResponseResultReceived SendJobResult(System.Guid clientId, long jobId, byte[] result, System.Exception exception, bool finished);46 HeuristicLab.Hive.Contracts.ResponseResultReceived SendJobResult(System.Guid clientId, long jobId, byte[] result, double percentage, System.Exception exception, bool finished); 47 47 48 48 [System.ServiceModel.OperationContractAttribute(AsyncPattern=true, Action="http://tempuri.org/IClientCommunicator/SendJobResult", ReplyAction="http://tempuri.org/IClientCommunicator/SendJobResultResponse")] 49 System.IAsyncResult BeginSendJobResult(System.Guid clientId, long jobId, byte[] result, System.Exception exception, bool finished, System.AsyncCallback callback, object asyncState);49 System.IAsyncResult BeginSendJobResult(System.Guid clientId, long jobId, byte[] result, double percentage, System.Exception exception, bool finished, System.AsyncCallback callback, object asyncState); 50 50 51 51 HeuristicLab.Hive.Contracts.ResponseResultReceived EndSendJobResult(System.IAsyncResult result); … … 375 375 } 376 376 377 public HeuristicLab.Hive.Contracts.ResponseResultReceived SendJobResult(System.Guid clientId, long jobId, byte[] result, System.Exception exception, bool finished) {378 return base.Channel.SendJobResult(clientId, jobId, result, exception, finished);379 } 380 381 [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] 382 public System.IAsyncResult BeginSendJobResult(System.Guid clientId, long jobId, byte[] result, System.Exception exception, bool finished, System.AsyncCallback callback, object asyncState) {383 return base.Channel.BeginSendJobResult(clientId, jobId, result, exception, finished, callback, asyncState);377 public HeuristicLab.Hive.Contracts.ResponseResultReceived SendJobResult(System.Guid clientId, long jobId, byte[] result, double percentage, System.Exception exception, bool finished) { 378 return base.Channel.SendJobResult(clientId, jobId, result, percentage, exception, finished); 379 } 380 381 [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] 382 public System.IAsyncResult BeginSendJobResult(System.Guid clientId, long jobId, byte[] result, double percentage, System.Exception exception, bool finished, System.AsyncCallback callback, object asyncState) { 383 return base.Channel.BeginSendJobResult(clientId, jobId, result, percentage, exception, finished, callback, asyncState); 384 384 } 385 385 … … 393 393 long jobId = ((long)(inValues[1])); 394 394 byte[] result = ((byte[])(inValues[2])); 395 System.Exception exception = ((System.Exception)(inValues[3])); 396 bool finished = ((bool)(inValues[4])); 397 return this.BeginSendJobResult(clientId, jobId, result, exception, finished, callback, asyncState); 395 double percentage = ((double)(inValues[3])); 396 System.Exception exception = ((System.Exception)(inValues[4])); 397 bool finished = ((bool)(inValues[5])); 398 return this.BeginSendJobResult(clientId, jobId, result, percentage, exception, finished, callback, asyncState); 398 399 } 399 400 … … 411 412 } 412 413 413 public void SendJobResultAsync(System.Guid clientId, long jobId, byte[] result, System.Exception exception, bool finished) {414 this.SendJobResultAsync(clientId, jobId, result, exception, finished, null);415 } 416 417 public void SendJobResultAsync(System.Guid clientId, long jobId, byte[] result, System.Exception exception, bool finished, object userState) {414 public void SendJobResultAsync(System.Guid clientId, long jobId, byte[] result, double percentage, System.Exception exception, bool finished) { 415 this.SendJobResultAsync(clientId, jobId, result, percentage, exception, finished, null); 416 } 417 418 public void SendJobResultAsync(System.Guid clientId, long jobId, byte[] result, double percentage, System.Exception exception, bool finished, object userState) { 418 419 if ((this.onBeginSendJobResultDelegate == null)) { 419 420 this.onBeginSendJobResultDelegate = new BeginOperationDelegate(this.OnBeginSendJobResult); … … 429 430 jobId, 430 431 result, 432 percentage, 431 433 exception, 432 434 finished}, this.onEndSendJobResultDelegate, this.onSendJobResultCompletedDelegate, userState); -
TabularUnified trunk/sources/HeuristicLab.Hive.Client.Communication/Service References/ServerService/Reference.svcmap ¶
r1103 r1147 18 18 </ClientOptions> 19 19 <MetadataSources> 20 <MetadataSource Address="net.tcp://10. 0.2.15:9000/HiveServer/mex" Protocol="mex" SourceId="1" />20 <MetadataSource Address="net.tcp://10.20.53.3:9000/HiveServer/mex" Protocol="mex" SourceId="1" /> 21 21 </MetadataSources> 22 22 <Metadata> 23 <MetadataFile FileName="service1.wsdl" MetadataType="Wsdl" ID="f56a21ec-7556-4b53-99e2-b57b466f64ad" SourceId="1" SourceUrl="net.tcp://10.0.2.15:9000/HiveServer/mex" /> 24 <MetadataFile FileName="service2.xsd" MetadataType="Schema" ID="c9a3854c-4c5f-46e4-acdd-a9380cdfb904" SourceId="1" SourceUrl="net.tcp://10.0.2.15:9000/HiveServer/mex" /> 25 <MetadataFile FileName="service3.xsd" MetadataType="Schema" ID="d9a1099b-776f-4c24-9125-15644863eedf" SourceId="1" SourceUrl="net.tcp://10.0.2.15:9000/HiveServer/mex" /> 26 <MetadataFile FileName="HeuristicLab.Hive.Contracts.BusinessObjects1.xsd" MetadataType="Schema" ID="5fda1f4a-d579-4445-b291-a6168caf9e83" SourceId="1" SourceUrl="net.tcp://10.0.2.15:9000/HiveServer/mex" /> 27 <MetadataFile FileName="HeuristicLab.Hive.Contracts1.xsd" MetadataType="Schema" ID="b7112dc7-0c1d-40c9-b95f-3a2834972fce" SourceId="1" SourceUrl="net.tcp://10.0.2.15:9000/HiveServer/mex" /> 28 <MetadataFile FileName="System1.xsd" MetadataType="Schema" ID="68a8f9e6-4f06-449e-8cdb-6e89a6323964" SourceId="1" SourceUrl="net.tcp://10.0.2.15:9000/HiveServer/mex" /> 23 <MetadataFile FileName="service1.wsdl" MetadataType="Wsdl" ID="fe9629c2-8699-40ca-940b-00c73e66938c" SourceId="1" SourceUrl="net.tcp://10.20.53.3:9000/HiveServer/mex" /> 24 <MetadataFile FileName="service2.xsd" MetadataType="Schema" ID="b7f8f39d-0e7c-422d-a294-433f875d2939" SourceId="1" SourceUrl="net.tcp://10.20.53.3:9000/HiveServer/mex" /> 25 <MetadataFile FileName="service3.xsd" MetadataType="Schema" ID="b050808b-3024-4a8d-be89-ceaf0ee6e420" SourceId="1" SourceUrl="net.tcp://10.20.53.3:9000/HiveServer/mex" /> 26 <MetadataFile FileName="HeuristicLab.Hive.Contracts.BusinessObjects1.xsd" MetadataType="Schema" ID="c15efe09-2f39-4cb9-b819-746aa9ca6c7c" SourceId="1" SourceUrl="net.tcp://10.20.53.3:9000/HiveServer/mex" /> 27 <MetadataFile FileName="HeuristicLab.Hive.Contracts1.xsd" MetadataType="Schema" ID="7746324c-e22e-448e-af4f-50af43b9079f" SourceId="1" SourceUrl="net.tcp://10.20.53.3:9000/HiveServer/mex" /> 28 <MetadataFile FileName="Arrays.xsd" MetadataType="Schema" ID="5dee5984-4a46-4cb4-a8ce-1721442c3342" SourceId="1" SourceUrl="net.tcp://10.20.53.3:9000/HiveServer/mex" /> 29 <MetadataFile FileName="System1.xsd" MetadataType="Schema" ID="1e3d4c2c-afbc-4828-aa3d-9fed927b6606" SourceId="1" SourceUrl="net.tcp://10.20.53.3:9000/HiveServer/mex" /> 29 30 </Metadata> 30 31 <Extensions> -
TabularUnified trunk/sources/HeuristicLab.Hive.Client.Communication/Service References/ServerService/configuration.svcinfo ¶
r1103 r1147 6 6 </bindings> 7 7 <endpoints> 8 <endpoint normalizedDigest="<?xml version="1.0" encoding="utf-16"?><Data address="net.tcp://10. 0.2.15:9000/HiveServer/ClientCommunicator" binding="netTcpBinding" bindingConfiguration="NetTcpBinding_IClientCommunicator" contract="ServerService.IClientCommunicator" name="NetTcpBinding_IClientCommunicator"><identity><userPrincipalName value="STEFAN-4710DBDB\Stefan" /></identity></Data>" digest="<?xml version="1.0" encoding="utf-16"?><Data address="net.tcp://10.0.2.15:9000/HiveServer/ClientCommunicator" binding="netTcpBinding" bindingConfiguration="NetTcpBinding_IClientCommunicator" contract="ServerService.IClientCommunicator" name="NetTcpBinding_IClientCommunicator"><identity><userPrincipalName value="STEFAN-4710DBDB\Stefan" /></identity></Data>" contractName="ServerService.IClientCommunicator" name="NetTcpBinding_IClientCommunicator" />8 <endpoint normalizedDigest="<?xml version="1.0" encoding="utf-16"?><Data address="net.tcp://10.20.53.3:9000/HiveServer/ClientCommunicator" binding="netTcpBinding" bindingConfiguration="NetTcpBinding_IClientCommunicator" contract="ServerService.IClientCommunicator" name="NetTcpBinding_IClientCommunicator"><identity><userPrincipalName value="mse08003@fhs-hagenberg.ac.at" /></identity></Data>" digest="<?xml version="1.0" encoding="utf-16"?><Data address="net.tcp://10.20.53.3:9000/HiveServer/ClientCommunicator" binding="netTcpBinding" bindingConfiguration="NetTcpBinding_IClientCommunicator" contract="ServerService.IClientCommunicator" name="NetTcpBinding_IClientCommunicator"><identity><userPrincipalName value="mse08003@fhs-hagenberg.ac.at" /></identity></Data>" contractName="ServerService.IClientCommunicator" name="NetTcpBinding_IClientCommunicator" /> 9 9 </endpoints> 10 10 </configurationSnapshot> -
TabularUnified trunk/sources/HeuristicLab.Hive.Client.Communication/Service References/ServerService/configuration91.svcinfo ¶
r1103 r1147 1 1 <?xml version="1.0" encoding="utf-8"?> 2 <SavedWcfConfigurationInformation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Version="9.1" CheckSum=" SA5Nbw12eg0h/lght5fpEmtG/7E=">2 <SavedWcfConfigurationInformation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Version="9.1" CheckSum="kpA4Ej4a4mSz8NqKwKcNB68tDr0="> 3 3 <bindingConfigurations> 4 4 <bindingConfiguration bindingType="netTcpBinding" name="NetTcpBinding_IClientCommunicator"> … … 107 107 </bindingConfigurations> 108 108 <endpoints> 109 <endpoint name="NetTcpBinding_IClientCommunicator" contract="ServerService.IClientCommunicator" bindingType="netTcpBinding" address="net.tcp://10. 0.2.15:9000/HiveServer/ClientCommunicator" bindingConfiguration="NetTcpBinding_IClientCommunicator">109 <endpoint name="NetTcpBinding_IClientCommunicator" contract="ServerService.IClientCommunicator" bindingType="netTcpBinding" address="net.tcp://10.20.53.3:9000/HiveServer/ClientCommunicator" bindingConfiguration="NetTcpBinding_IClientCommunicator"> 110 110 <properties> 111 111 <property path="/address" isComplexType="false" isExplicitlyDefined="true" clrType="System.Uri, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 112 <serializedValue>net.tcp://10. 0.2.15:9000/HiveServer/ClientCommunicator</serializedValue>112 <serializedValue>net.tcp://10.20.53.3:9000/HiveServer/ClientCommunicator</serializedValue> 113 113 </property> 114 114 <property path="/behaviorConfiguration" isComplexType="false" isExplicitlyDefined="false" clrType="System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> … … 137 137 </property> 138 138 <property path="/identity/userPrincipalName/value" isComplexType="false" isExplicitlyDefined="true" clrType="System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 139 <serializedValue> STEFAN-4710DBDB\Stefan</serializedValue>139 <serializedValue>mse08003@fhs-hagenberg.ac.at</serializedValue> 140 140 </property> 141 141 <property path="/identity/servicePrincipalName" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.ServicePrincipalNameElement, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> -
TabularUnified trunk/sources/HeuristicLab.Hive.Client.Communication/Service References/ServerService/service1.wsdl ¶
r1103 r1147 40 40 <xsd:import namespace="http://schemas.datacontract.org/2004/07/HeuristicLab.Hive.Contracts.BusinessObjects" /> 41 41 <xsd:import namespace="http://schemas.datacontract.org/2004/07/HeuristicLab.Hive.Contracts" /> 42 <xsd:import namespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays" /> 42 43 <xsd:import namespace="http://schemas.datacontract.org/2004/07/System" /> 43 44 </xsd:schema> … … 147 148 <wsdl:service name="ClientFacade"> 148 149 <wsdl:port name="NetTcpBinding_IClientCommunicator" binding="tns:NetTcpBinding_IClientCommunicator"> 149 <soap12:address location="net.tcp://10. 0.2.15:9000/HiveServer/ClientCommunicator" />150 <soap12:address location="net.tcp://10.20.53.3:9000/HiveServer/ClientCommunicator" /> 150 151 <wsa10:EndpointReference> 151 <wsa10:Address>net.tcp://10. 0.2.15:9000/HiveServer/ClientCommunicator</wsa10:Address>152 <wsa10:Address>net.tcp://10.20.53.3:9000/HiveServer/ClientCommunicator</wsa10:Address> 152 153 <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> 153 <Upn> STEFAN-4710DBDB\Stefan</Upn>154 <Upn>mse08003@fhs-hagenberg.ac.at</Upn> 154 155 </Identity> 155 156 </wsa10:EndpointReference> -
TabularUnified trunk/sources/HeuristicLab.Hive.Client.Communication/Service References/ServerService/service2.xsd ¶
r1103 r1147 53 53 <xs:element minOccurs="0" name="jobId" type="xs:long" /> 54 54 <xs:element minOccurs="0" name="result" nillable="true" type="xs:base64Binary" /> 55 <xs:element minOccurs="0" name="percentage" type="xs:double" /> 55 56 <xs:element xmlns:q8="http://schemas.datacontract.org/2004/07/System" minOccurs="0" name="exception" nillable="true" type="q8:Exception" /> 56 57 <xs:element minOccurs="0" name="finished" type="xs:boolean" /> -
TabularUnified trunk/sources/HeuristicLab.Hive.Client.Communication/WcfService.cs ¶
r1132 r1147 184 184 #region SendJobResults 185 185 public event System.EventHandler<SendJobResultCompletedEventArgs> SendJobResultCompleted; 186 public void SendJobResultAsync(Guid clientId, 187 long jobId, 188 byte[] result, 189 Exception exception, 190 bool finished) { 186 public void SendJobResultAsync(Guid clientId, long jobId, byte[] result, double percentage, Exception exception, bool finished) { 191 187 if (ConnState == NetworkEnum.WcfConnState.Connected) 192 proxy.SendJobResultAsync(clientId, 193 jobId, 194 result, 195 exception, 196 finished); 188 proxy.SendJobResultAsync(clientId, jobId, result, percentage, exception, finished); 197 189 } 198 190 private void proxy_SendJobResultCompleted(object sender, SendJobResultCompletedEventArgs e) { -
TabularUnified trunk/sources/HeuristicLab.Hive.Client.Communication/app.config ¶
r1103 r1147 22 22 </bindings> 23 23 <client> 24 <endpoint address="net.tcp://10. 0.2.15:9000/HiveServer/ClientCommunicator"24 <endpoint address="net.tcp://10.20.53.3:9000/HiveServer/ClientCommunicator" 25 25 binding="netTcpBinding" bindingConfiguration="NetTcpBinding_IClientCommunicator" 26 26 contract="ServerService.IClientCommunicator" name="NetTcpBinding_IClientCommunicator"> 27 27 <identity> 28 <userPrincipalName value=" STEFAN-4710DBDB\Stefan" />28 <userPrincipalName value="mse08003@fhs-hagenberg.ac.at" /> 29 29 </identity> 30 30 </endpoint> -
TabularUnified trunk/sources/HeuristicLab.Hive.Client.Core/Core.cs ¶
r1132 r1147 156 156 jId, 157 157 sJob, 158 1, 158 159 null, 159 160 true); … … 163 164 long jId = (long)jobId; 164 165 byte[] obj = engines[jId].GetSnapshot(); 166 wcfService.SendJobResultAsync(ConfigManager.Instance.GetClientInfo().ClientId, 167 jId, 168 obj, 169 engines[jId].Progress, 170 null, 171 false); 165 172 } 166 173 … … 204 211 205 212 void wcfService_SendJobResultCompleted(object sender, SendJobResultCompletedEventArgs e) { 206 if (e.Result.Success) { 213 if (e.Result.Success) { 207 214 lock (Locker) { 208 AppDomain.Unload(appDomains[e.Result.JobId]); 209 appDomains.Remove(e.Result.JobId); 210 engines.Remove(e.Result.JobId); 211 jobs.Remove(e.Result.JobId); 212 ClientStatusInfo.JobsProcessed++; 213 } 214 Debug.WriteLine("ProcessedJobs to:" + ClientStatusInfo.JobsProcessed); 215 //if the engine is running again -> we sent an snapshot. Otherwise the job was finished 216 //this method has a risk concerning race conditions. 217 //better expand the sendjobresultcompltedeventargs with a boolean "snapshot?" flag 218 if (e.Result.finished == false) { 219 Logging.GetInstance().Info(this.ToString(), "Snapshot for Job " + e.Result.JobId + " transmitted"); 220 } else { 221 AppDomain.Unload(appDomains[e.Result.JobId]); 222 appDomains.Remove(e.Result.JobId); 223 engines.Remove(e.Result.JobId); 224 jobs.Remove(e.Result.JobId); 225 ClientStatusInfo.JobsProcessed++; 226 Debug.WriteLine("ProcessedJobs to:" + ClientStatusInfo.JobsProcessed); 227 } 228 } 215 229 } else { 216 Debug.WriteLine("Job sending FAILED!");230 Logging.GetInstance().Error(this.ToString(), "Sending of job " + e.Result.JobId + " failed"); 217 231 } 218 232 }
Note: See TracChangeset
for help on using the changeset viewer.