Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/28/09 18:38:46 (15 years ago)
Author:
svonolfe
Message:

Large amounts of data are now transferred streamed (fixed ticket #660)

Location:
trunk/sources/HeuristicLab.Hive.Server.Core/3.2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Hive.Server.Core/3.2/ClientCommunicator.cs

    r1928 r1939  
    451451        JobResult jobResult =
    452452          new JobResult();
    453         jobResult.Client = client;
    454         jobResult.Job = job;
     453        jobResult.ClientId = client.Id;
     454        jobResult.JobId = job.Id;
    455455        jobResult.Result = result;
    456456        jobResult.Percentage = percentage;
  • trunk/sources/HeuristicLab.Hive.Server.Core/3.2/ClientFacade.cs

    r1600 r1939  
    2828using HeuristicLab.Hive.Contracts;
    2929using HeuristicLab.PluginInfrastructure;
     30using System.IO;
     31using System.Runtime.Serialization.Formatters.Binary;
    3032
    3133namespace HeuristicLab.Hive.Server.Core {
     
    7476
    7577    #endregion
     78
     79    #region IClientFacade Members
     80
     81    public Stream SendStreamedJob(Guid clientId) {
     82      return
     83        new StreamedObject<ResponseJob>(
     84          this.SendJob(clientId));
     85    }
     86
     87    public Stream SendStreamedPlugins(List<HivePluginInfo> pluginList) {
     88      return
     89        new StreamedObject<ResponsePlugin>(
     90          this.SendPlugins(pluginList));
     91    }
     92
     93    public ResponseResultReceived StoreFinishedJobResultStreamed(Stream stream) {
     94      BinaryFormatter formatter =
     95          new BinaryFormatter();
     96      JobResult result = (JobResult)formatter.Deserialize(stream);
     97
     98      return this.StoreFinishedJobResult(
     99          result.ClientId,
     100          result.JobId,
     101          result.Result,
     102          result.Percentage,
     103          result.Exception);
     104    }
     105
     106    public ResponseResultReceived ProcessSnapshotStreamed(Stream stream) {
     107      BinaryFormatter formatter =
     108          new BinaryFormatter();
     109      JobResult result = (JobResult)formatter.Deserialize(stream);
     110
     111      return this.ProcessSnapshot(
     112          result.ClientId,
     113          result.JobId,
     114          result.Result,
     115          result.Percentage,
     116          result.Exception);
     117    }
     118
     119    #endregion
    76120  }
    77121}
Note: See TracChangeset for help on using the changeset viewer.