The Access Layer APIs define several elements that contain unformatted display names and formatted unique names that are used to identify the elements by their names.
In particular the elements that this article refers to, are vendors, package families and packages. The following sections describe the use of formatted unique names inside the system as these names are a part of the public interface used by external parties.
In order to encode important package information and to ensure that names are unique inside the system, names follow a clear hierarchy allowing to identify where elements are belonging to, just by looking at the name.
The Access Layer performs active validation on the names before accepting requests to store final processing results. The validation is based on "Name Format" and "Naming Rule" as defined below.
Escaping the delimiter is not allowed in order to ensure implementations that deal with names can be kept as simple as possible. In case of ':' is part of the source name it has to get substituted by a replacement character.
microsoft microsoft:office microsoft corporation:windows:7.0-3912:windows-win7:x86:en_US novell:evolution:2.30.1.2:linux-ubuntu-karmic:x86:en_US
The information encoded in the example name "novell:evolution:2.30.1.2:linux-ubuntu-karmic:x86:en_US" can be interpreted as:
Note: In order to display the extracted vendor and product names on the screen, they need to get translated to display names first.
Check the public API methods:
Vendor names are generated following the default naming format and normalization rules as defined inside this document.
The vendor name information can be read out of the static file properties of a package file or alternatively from source that a package was coming from.
In case of no vendor information is available, the reserved vendor name "vendorUnknown" is used.
A package family summarizes a collection of similar package contents (e.g. a product family like "Microsoft Office"). The naming follows the same basic rules as for vendors but it is assembled using the pattern: ${vendor}:${packageContentName}.
Name Artifacts Explained:
All package names start with the name of their assigned package family and use the following pattern to further identify the package they name: ${familyName}:${version}:${operatingSystem}:${cpuArchitecture}:${isoLocale}
See the name examples above for an overview how a valid name can look like using this naming pattern.
Name Artifacts Explained:
Note: As version definitions are vendor specific absolutely no clear assumption can be made on the format of the version string. Client implementations may however get good results by using a natural language sort algorithm when sorting versions in ascending or descending order.
Note: The locale should be omitted, in case of a package is multilingual.
Omitting Artifacts: Name artifacts can be omitted from right to left which means that it is allowed to describe an element with less details. The ${version} artifact may never be omitted.
Order Matters: The order of the name artifacts does matter. It is not allowed to use a diverting order than the one specified inside the pattern. This does also mean that it is not allowed to omit artifacts in the middle.
Delimiters: Some name artifacts use delimiters to define a local hierarchy of detail. All name artifacts besides version and familyName support the characters '-' or '_' as delimiter characters for building a local hierarchy. As an example the OS names "windows" and "windows-winxp" would both specify that the named package is depending on the Windows OS, however the latter definition is more exact than the first.
In order to create predictable names, some values are predefined and validated by the Access Layer to ensure no false names can be stored inside the CoreDB.
A possible incomplete list of well known operating systems and flavours. Please note that only the bold names are validated. No guarantee is made on the flavour definitions.
Name | Description |
---|---|
windows | All flavours of Microsoft Windows |
windows-winxp | Windows XP |
windows-winme | Windows Me |
windows-winnt | Windows NT |
windows-vista | Windows Vista |
windows-win7 | Windows 7 |
linux | All flavours of Linux |
linux-ubuntu | Ubuntu Linux |
linux-centos | CentOS Linux |
linux-debian | Debian Linux |
linux-rhel | Redhat Enterprise Linux |
linux-suse | Suse Linux Enterprise |
macosx | All flavours of MacOSX |
macosx-tiger | MacOSX Tiger |
macosx-leopard | MacOSX Leopard |
macosx-snowleopard | MacOSX Snow Leopard |
bsd | All flavours of BSD |
universal | Used if the binary is not OS dependent |
Name | Description |
---|---|
x86 | Intel 32bit x86 compatible CPU |
x64 | AMD64 / Intel EM64 compatible CPU |
ppc | IBM PowerPC compatible CPU |
arm | ARM / Strong ARM compatible CPU |
universal | Used if the binary is not CPU dependent |
In order to achieve better matching results, names are normalized prior to applying them. Multiple levels of normalization may exist, some require no additional input whereas some may be implemented using either intelligent methods or static mapping tables.
Basic normalization takes care to normalize only the differences that do not change the meaning of the name. In particular white spaces are normalized to a single space, white spaces at the beginning and at the end are stripped and the name is converted to lower case.
String normalizedName, displayName = " Microsoft Corp. "; normalizedName = displayName.replaceAll("\\s+", " ").replace(':', ';').trim().toLowerCase(); System.out.println("|" + normalizedName + "|"); // Prints: |microsoft corp.|
Note: In addition to basic normalization, this code example also removes the reserved character ':' by replacing it with ';'.
Aliasing is a far more complex variant of normalization using a lookup table of alias => name value pairs that allow to handle exceptional differences in names that were read out of static file properties.
As aliasing changes names depending on the used mapping table, the aliases can't be kept only inside the GRID as external systems need to be aware of changes on data that they already transferred and stored locally, outside of the GRID.
Important Note: Aliasing is not available in GRID 1.0.
An alias mapping table could look like this:
Alias | Type | Name |
---|---|---|
microsoft c. | proposed | microsoft corp. |
microsoft | runtime | microsoft corp. |
microsoft corporation | applied | microsoft corp. |
mindsoft | invalid | microsoft corp. |
The Types are defined as:
External systems need to be aware of the runtime list and either apply it to the locally cached content or map the aliases against all names it handles.
External systems have the choice to apply such aliases to their local cached content, continue to apply the aliases in runtime mode or re-transfer content from the GRID containing the applied aliases.