title: batch/offline processing design book / documentation
body: <p>Is there a book or any documentation available that describes the best practice for designing batch (offline) processes for sharing data between two parties?</p>
  
  <p>I have found some useful information on the spring batch site, but it is quite low level:
  <a href="http://static.springsource.org/spring-batch/batch-processing-strategies.html" rel="nofollow noreferrer">batch processing strategies</a> and <a href="http://static.springsource.org/spring-batch/batch-principles-guidelines.html" rel="nofollow noreferrer">batch principles guidelines</a>.</p>
  
  <p>There are a lots of considerations for batch, for example:</p>
  
  <ol>
  <li>data transfer method (e.g. files)</li>
  <li>control protocol between the two parties</li>
  <li>error handling</li>
  <li>file naming conventions (if using files for transfer)</li>
  <li>synchronising cut-off times between the two parties</li>
  <li>etc.</li>
  </ol>
  
  <p>It would be good if there was some authorative document or checklists that ensure designs follow the best practice in the field.</p>
  
  <p><hr>
  <strong>UPDATE:</strong></p>
  
  <p>I'll add answers to this section as I come across them.</p>
  
  <h2>General Batch/Offline Processing info</h2>
  
  <p>This section is taken from @user1813068's answer.</p>
  
  <p>You can find some architectural design patterns at this <a href="http://mike2.openmethodology.org/wiki/Architecture_Patterns_for_Partner-to-Partner_Integration" rel="nofollow noreferrer">link</a> and also at this <a href="http://mike2.openmethodology.org/wiki/Architecture_Patterns_for_Data_Synchronisation" rel="nofollow noreferrer">link</a> that describe approaches for partner to partner integration and for data synchronization.</p>
  
  <p>This wikipedia page also gives a high level overview of architectural patterns and includes patterns for Data Integration: <a href="http://en.wikipedia.org/wiki/Architectural_pattern" rel="nofollow noreferrer">architectural patterns</a>.</p>
  
  <p>The book <a href="https://rads.stackoverflow.com/amzn/click/com/0137084935" rel="nofollow noreferrer" rel="nofollow noreferrer">Data Integration Blueprint and Modeling</a> is very good too.</p>
  
  <h2>Data Files</h2> 
  
  <p>Most of the content in this section has come from here: <a href="http://www.e-dss.org" rel="nofollow noreferrer">source</a></p>
  
  <p>The use of headers and footers for flat file exchange is considered best practice.  Flat files can be exchanged without headers and footers and the naming of the file can outline some of the same information as the header.  When using a delimited file, the field list header is always required. </p>
  
  <h3>Headers</h3>
  
  <p>When exchanging data between systems, it is very important for the receiving party to know exactly what type of data is being sent. One way to ensure this is to provide a header row that includes pertinent information regarding the content of the data and how it should be processed.</p>
  
  <p>When working with flat files, the filename itself can also be used to inform the receiving party of the content of the file. However, a header row provides better support for all options that may be available.</p>
  
  <p>When working with an API these header fields can be provided in a similar fashion. Implementation will be determined by the developer of the API service.</p>
  
  <p>If the header is included, it consists of a single set of data, and must always be the first data in the file.</p>
  
  <h3>Footers</h3>
  
  <p>A footer may be provided when using file-based formats to indicate that there is no more data left to process.</p>
  
  <p>When processing, the data found after the footer row should be ignored. Also, when creating the data, be aware that any data after the footer row will be ignored.</p>
  
  <h3>Data Formats</h3>
  
  <p>Delimited Files</p>
  
  <p>The de facto industry standard is delimited files.</p>
  
  <p>Comma-delimited (CSV, or comma-separated values) files usually requires data encapsulation, usually with double quotes ("); the double quotes must then be escaped, either with a backslash () or double double quotes (""). Due to the inconsistencies in CSV implementation, it is recommended to use tabs as a delimiter, with no encapsulation. In this case, tab characters must be removed from the data.  Delimited Files are usually quicker to process that XML Files.</p>
  
  <p>XML Files</p>
  
  <p>There are some in the industry who prefer XML files. XML allows for a more clear representation of the information, since it supports nested data. Many companies have limited or no support for this format, so it is not recommended.</p>
  
  <h3>Encoding</h3>
  
  <p>UTF-8 Encoding</p>
  
  <p>All data should be UTF-8 encoded to ensure maximum compatibility between all systems.</p>
  
  <p>Dates &amp; Times</p>
  
  <p>It is recommended to use UTC time for all date &amp; time fields to prevent confusion.</p>
  
  <hr>
  
  <p>Some more best practices: <a href="http://ediacademy.com/EDISchedulingAndFileTransferBestPractices.html" rel="nofollow noreferrer">EDI Scheduling and File Transfer</a></p>