Skip to main content


Creating an Offloading Target

The OffloadTarget needs to accept HTTP POSTs. If coded in .NET, it would typically be a WebApi application.

The DLL provided by the SDK is named Tachyon.SDK.Offloading.dll. After referencing the DLL from the WebApi project and importing the Tachyon.SDK.Offloading namespace, an action method that receives the posts can be as short as this:

Offloading target

        public HttpResponseMessage Post([CustomBody]byte[] responses)
            if (responses == null)
                return new HttpResponseMessage(HttpStatusCode.BadRequest);
            ResponseRaw[] responseRaws = JsonResponseDeserializer.DeserializeObject(responses);
            return new HttpResponseMessage(HttpStatusCode.Accepted);

The most important line is:


     ResponseRaw[] responseRaws = JsonResponseDeserializer.DeserializeObject(responses);
  • ResponseRaw - defined in the SDK DLL encapsulating raw responses offloaded from Tachyon

  • JsonResponseDeserializer.DeserializeObject - converts bytes received into raw responses, and handles decompression as required

  • [CustomBody] - captures raw posted data so it can be passed into DeserializeObject for decompression

For an explanation of why [CustomBody] is needed and why the default WebApi binding won't work as expected, read:

Accepting Raw Request Body Content with ASP.NET Web API -

In the above example, the method ProcessResponses would contain the custom code that processes the data received from Tachyon.