Show TOC

Setting Up an Archive CacheLocate this document in the navigation structure

Use

Development teams that use the SAP NetWeaver Development Infrastructure (NWDI) for their Java-based application development sometimes can be spread over several countries and continents. Usually the infrastructure and development environment operates with one central NWDI server that comprises the components Design Time Repository (DTR), Component Build Service (CBS) and Change Management Service (CMS). To be able to build the newly created application locally, the development process includes the task of syncing development component (DC) archives from a central CBS server to the local file system of each developer. Depending on the bandwidth and speed of the network connection, the CBS sync might be a time consuming task.

To ease the situation for developers, the idea is to create a DC archive cache in the location where the developer is working. The DC archive cache is a share on which the DC archives are stored. The DC archive cache can then be used by the developers in the remote location instead of using the central CBS every time a sync is needed. The content of the archive cache should be updated with the latest content of the corresponding CBS on a regular basis (for example every night). Therefore the content of the DC archive cache is not always as up-to-date as the content of the CBS. However, this should not be a problem for developers since the archive cache will be updated frequently and accessing the remote CBS is still possible.

When a developer syncs a DC archive from the DC archive cache, the DC archive will be copied from the cache to the local file system of the developer according to the development configuration file system layout. Basically, the DC archive cache is a share where the DC archives are stored in accordance with the file system layout of the development configuration. For each development configuration, the synced archives are stored in a separate subfolder of the DC archive cache.

A cache is filled/synced per development configuration. To set up a cache for each development configuration, the configuration has to be loaded first. The next steps describe the way where a development configuration was imported firstly with the help of the SAP NetWeaver Developer Studio. Before developers can use the DC archive cache, this cache has to be filled in first.

Procedure
Figure 1: Process Flow

Set up an archive cache share

If the development teams are spread over the world, each location can set up its own local archive cache. Since the share is accessed by each developer with the Developer Studio, the same operating system must be used for the archive cache share. Currently that means that the DC archive cache should be located on a Windows platform.

  1. Create a shared folder. It has to be on a remote machine where all development teams have read access.

    Example

    Create the directory c:\dcarchivecache on the machine where the archive cache should be stored. Share that directory so that all team members have read access to the share. The share name is dcarchivecache .

  2. Create a folder to store development configuration files and log files.

    Recommendation

    We recommend that this directory is parallel to the archive cache root directory. For example, create a folder c:\dccacheutil parallel to c:\dcarchivecache .

  3. (Optionally) Create a subdirectory for the used development configurations, log files and used scripts.

    These folders are mainly used for the tools to setup the DC archive cache.

    Example

    Create folders c:\dccacheutil\logs , c:\dccacheutil\devconfig , and c:\dccacheutil\scripts .

  4. Use the logfile and tracefile commands to output into a log file and to write technical messages into a trace file.

    Example

    logfile -f c:\dccacheutil\logs\Demolog.txt;

    t racefile -f c:\dccacheutil\logs\Demotrace.txt;

  5. The scripts folder is used to store script files. Script files are a text file in which a certain sequence of commands can be collected that has to be executed periodically. The commands have to be separated by semicolon (;). The text file can be passed using the DC command line to the tool. Note that you have to put at sign (@) character before the file name to distinguish the file name from a command.

    Example

    dctool @commandfile.txt

    Sample Code

    Example import and sync of a configuration

    importconfig -u <user> -p <password> -c C:\dcarchivecache\SR2_DEMO_D\
    dtrconfig -r C:\dcarchivecache\SR2_DEMO_D -f C:\dccacheutil\devconfig\SR2_DEMO_D.xml;
    syncalldcs -m archive
    
                         
    Sample Code

    Example load and sync of a configuration

    # write the output into a log file and technical messages (for example, stack traces) into trace file
    logfile -f c:\dccacheutil\logs\SR2_DEMO_D_log.txt;
    tracefile -f c:\dccacheutil\logs\SR2_DEMO_D_trace.txt;
    loadconfig -u <user> -p <password> -r c:\dcarchivecache\SR2_DEMO_D -c c:\dcarchivecache\SR2_DEMO_D\dtrconfig;
    syncalldcs -m archive
    
                         

Import the development configuration

  1. Import a development configuration using the Developer Studio.

    Choose the New Import Development Configuration icon and follow the wizard's steps. After the development configuration is imported, you should see the .CONFDEF file of that configuration in the file system.

  2. To import or load a configuration, a specific file structure is needed. Create a directory underneath the root of the archive cache. Give it the following name <DomainID>_<TrackID>_D .

    _D stands for the development configuration of the NWDI development system as it is usually used to sync the CBS buildspace.

  3. Create a subfolder with the name dtrconfig .

    Example

    For a development configuration SR2_DEMO_D:

    C:\dcarchivecache\SR2_DEMO_D

    C:\dcarchivecache\SR2_DEMO_D\dtrconfig

  4. In the subfolder dccacheutil/devconfig copy the .CONFDEF file into that directory and rename it to <DomainID>_<TrackID>_D with the extension .XML.

    Example

    C:\dccacheutil\devconfig\SR2_DEMO_D.xml

Set up the DC command line tool

With the DC command line tool, set up the command importconfig .

  1. Start the DC command line tool.

    For more information about how to start the DC tool, see Starting Command Line Tools .

  2. The importconfig command is called only once in the beginning. For regular sync tasks, when the development configuration is already imported, the loadconfig command can be used.

    Sample Code
    importconfig -u <user> -p <password> 
    -c C:\dcarchivecache\SR2_DEMO_D\
    dtrconfig 
    -r C:\dcarchivecache\SR2_DEMO_D 
    -f C:\dccacheutil\devconfig\SR
    2_DEMO_D.xml;
                         

Sync the Archives

Before developers can use the DC archive cache, the cache has to be filled first. Filling the DC archive cache means you sync the DC archives from CBS into the cache for each development configuration.

The sync is done with the DC tool command syncalldcs . This has to be executed for all development configurations that should be part of the DC archive cache.

Sync all archives for the loaded development configuration:

syncalldcs -m archive

For more information, see Enabling Usage of a DC Archive Cache .