Exercise 10.1 – The Working Directory
Purpose:
To review the location of items within the Working Directory.
EIP-ROOT
- The working directory is frequently called eip-root, which is the default name assigned to that directory by the eiConsole.
- This directory is the root location where all PilotFish configuration files are stored.
- While the convention is to call it eip-root, it is not required to name it that. Note: PilotFish tutorials generally use eip-root and working directory interchangeably.
- The eip-root contains global configuration files, debugging and trace files, metadata produced by specific PilotFish modules, etc.
- The eip-root is also considered to be the root Interface package.
Interface Hierarchy
- PilotFish Interfaces function as a hierarchy.
- Every interface has a parent interface, going all the way up to the root interface, the eip-root.
- Every interface has the same basic internal directory structure.
- Interfaces act as a sort of scope around many of its contents.
- Because the eip-root is considered to be a root interface, any sub-interface of it can also be treated as if it were its own eip-root. The PilotFish application can be run with a starting working directory of any valid interface package.
Interface Directory Structure
- data
- The data directory is an optional directory in the interface.
- It is a default location where the user can store information related to the interface being worked on.
- Sample files and documentation are just some examples of what can be stored there.
- formats
- The Formats directory is where all transformation Formats are stored.
- Because all formats are stored at the interface level, they are all scoped to the interface they are within.
- The formats directory contains a series of child directories, each named for its particular Format. Each one of those directories contain the configuration files for the transformations that format performs.
- lib
- The lib directory is where any additional libraries for the interface are stored.
- PilotFish uses a local-first classloading system, so libraries placed in a lib directory in an interface will override any libraries in a parent interface or the PilotFish application itself.
- Unlike formats, the libraries added here are not scoped to the interface. Upon the PilotFish application initializing, all libraries in all Interfaces will be loaded and made globally accessible during the runtime of the application.
- To avoid possible library conflicts, it is generally recommended that all libraries be only placed in the lib directory of the eip-root.
- routes
- The Routes directory is where the PilotFish Routes that are a part of the interface are stored.
- Within this directory are a series of sub-directories, each one named after an individual Route. Within these directories are all the individual configuration files needed to make these Routes run.
- Routes are semi-scoped within their interface; they are assigned a URI that includes the interface path so that they can be referenced by Routes in other interfaces internally within the application.
- interfaces
- The interfaces directory contains the sub-interfaces of this interface package.
- Because interfaces are structured as a hierarchy, each interface has children. Those child interfaces go into this directory.
- Within this directory are sub-directories, each one named after a different interface. Each of those interface directories contains this same directory structure within it.
- data
Deploying a Working Directory
- Because all the configurations are just files in this hierarchy, deploying an interface to a production server is as easy as copying the working directory over to it.
- Compression is frequently recommended to facilitate this.
- Platform specific values should always be stored in Environment Properties. Upon deployment, these values should be changed as necessary to reflect the new system.