Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

This section describes the rational for gmStudio's approach to deployment . 

 Why Bundle?

One of the unique features of gmStudio is that is allows you to separate code generation from code deployment. This best practice resulted from our work in helping teams perform migrations of very large systems. It works like this: rather than publishing the translated code as separate files and folders immediately as they are produced, gmStudio creates a consolidated text archive that contain all the files. This text archive, or bundle file as we call it, must be explicitly processed, or "deployed", to create the separate files and folders. By default, this feature works behind the scenes and it is extremely fast so you barely notice it. This approach provides additional control and visibility to the migration effort, and having all the generated code in a single file facilitates several useful operations:

  • Report an inventory of all code generated for a translation 
     
  • Search, or search and replace, all code generated for a translation 
     
  • Create a snapshot all code generated for a translation 
     
  • Compare two snapshots of all code generated for a translation 
     
  • Compare all generated code for two different translations 
     
  • Inspect code before deploying it

Furthermore, migrating a large system produces a new codebase, and this can mean thousands of new source files and millions of new lines of code. It is critical that the migration team plan for this tsunami of new code and has tools to help them manage it efficiently. gmStudio's bundle file deployment feature is useful in this regard.

A contemporary codebase consists of a very large number of files, some of which are text files and some of which have binary formats. It is the mandate of this system that it be able to process an existing codebase and to then transform it into a new codebase with different files, different structure, and even with different internal file format. The term "Deployment" is used to refer to the various operations required to gather large numbers of files into an archive and then to redistribute the contents of the archive in a new location.

Though there are many binary compaction formats that could be used to gather files into a single archive, this system uses a simple text-based format that is compatible with all contemporary operating systems. The details of this format will be discussed later. The advantages of using a text-based format are two-fold:

  • First, different operating systems use different internal file formats for text files, which form the bulk of the files in the site. This system knows these formats and can both recognize and produce them as it performs the various deployment operations. Binary zip formats cannot change the formats as they gather and then distribute files; thus, the user is required to use a separate process to do the text-line format conversions. 
     
  • Second, the authoring facilities of this system produce outputs which contain many files. It makes this operation easier to manage if the authors can produce single files using this text-based format that can then deployed once they have been produced and accepted.

 So what is a Bundle File?

Bundle files are the self-extracting text archives produced by the translation process.

Here is a sample bundle file

rmdir \gmProj\DemoScanTool\deploy\ScanToolUI_iop_csh
mkdir \gmProj\DemoScanTool\deploy\ScanToolUI_iop_csh
mkdir \gmProj\DemoScanTool\deploy\ScanToolUI_iop_csh\bin\
cat >\gmProj\DemoScanTool\deploy\ScanToolUI_iop_csh\ScanToolUI.csproj <<'!)(!'
'' ... SrcText OF \gmProj\DemoScanTool\deploy\ScanToolUI_iop_csh\ScanToolUI.csproj ...
'!)(!'
cat >\gmProj\DemoScanTool\deploy\ScanToolUI_iop_csh\AssemblyInfo.cs <<'!)(!'
'' ... SrcText OF \gmProj\DemoScanTool\deploy\ScanToolUI_iop_csh\AssemblyInfo.cs ...
'!)(!'
''... REMAINING FILES AND DEPLOYMENT COMMANDS ...

Notice that the bundle file contains commands and content. The commands are directory management commands such as rmdir and mkdir. The content is in the venerable unix "here-file" format

 

cat >'PATH OF FILE TO CREATE <<'!)(!'
'' ... SrcText OF FILE TO CREATE ...
'!)(!'

The translator always writes your translation to a bundle file that you specify in the Translation Script and a separate step, running the deployment tool -- is used to run the bundle file. By default, gmStudio handles all of this behind the scenes. 

 Viewing and Reporting your Bundles

You can view the deployment logs for a given migration unit by selecting the [Deploy Log] option on the [Task Details] tab. Checking the [Grid] option here will display the internal contents of the bundle file.

You can generate a report of the internal contents of the bundle files for selected migration units in your project by clicking [Reports/Code Bundles].

  • No labels