Micro-batch Processing

Micro-batch processing is a technique where you include more than one record in a single service request. By including multiple records in a request instead of issuing separate requests for each record, you can significantly improve performance when processing a large collection of records through a service. Spectrum Technology Platform supports micro-batch processing for REST and SOAP web services.

Micro-batch end point

For AMER, use amer-microbatch.precisely.com. It has a 5 minute timeout allowing larger micro-batch sizes.
For APAC and EMEA, use the standard endpoint as they do not have a special micro-batch endpoint. This endpoint has a 30 second timeout, so the number of records in a micro-batch will need to be smaller.

Micro-Batch Size

For AMER using the special micro-batch endpoint, you may put as many records as can fit within a 5 minute timeout. You are charged for each record in the request even if it times out, so it is recommended to choose the number of records that can be processed in 4 minutes in case processing takes longer.

For APAC and EMEA using the standard endpoint, the maximum number of records allowed in a request depends on the service's category.

Using a Record ID

You may find it helpful to assign an ID to each record in a micro-batch so that you can correlate the records in the request with the records returned in the response. Use user fields to do this.

Micro-Batch Processing in the Client API

To perform micro-batch processing in an API request to a service, send multiple data rows in the request. For example, this .NET class sends two rows in the request:

using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Net;
using System.Text;
using ConsoleApplication1.ValidateAddress_Reference;

namespace Test
{
    class Program
    {
        static void Main(string[] args)
        {
            var validateClient = new ValidateAddress {Credentials = new NetworkCredential("admin", "admin")};

            var address1 = new input_portAddress
            {
                AddressLine1 = "1825B Kramer Lane",
                AddressLine2 = "Suite 100",
                PostalCode = "78758",
                City = "Austin",
                StateProvince = "Texas"
            };

            var address2 = new input_portAddress
            {
                AddressLine1 = "100 Congress", 
                PostalCode = "78701", 
                City = "Austin", 
                StateProvince = "Texas"
            };

            var addresses = new input_portAddress[2];
            addresses[0] = address1;
            addresses[1] = address2;

            var options = new options {OutputCasing = OutputCasing.M};
            output_portAddress[] results = validateClient.CallValidateAddress(options, addresses);

            for (int i = 0; i < results.Length; i++)
            {
                System.Console.WriteLine("Record " + (i+1) + ":");
                System.Console.WriteLine("AddressLine1=" + results[i].AddressLine1);
                System.Console.WriteLine("City=" + results[i].City);
                System.Console.WriteLine("StateProvince=" + results[i].StateProvince);
                System.Console.WriteLine("PostalCode=" + results[i].PostalCode + "\n");
            }
            
            System.Console.Write("Press any key to continue...");
            System.Console.ReadKey();
        }
    }
}
Tip: Do not disconnect between requests. Disconnecting and connecting can reduce performance.