Friday, November 3, 2017

SMF service - bundles

Under SMF service development, bundles could be viewed as a sort of a shallow package for deploying SMF services. For obvious convenience, a specially crafted XML file is used to describe how a group (bundle) of services is to be integrated into the SMF framework. Hence, more than one service can be described on a single such XML file. By the way, the file name must be formed by ASCII characters only and The XInclude specification is supported.

The XML file top-level general structure is as follows:

<?xml version="1.0" ?>

<!DOCTYPE service_bundle 

  SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1" >
 
<service_bundle type="manifest"
 name="..." > 
  ...
</service_bundle >


NOTE
With respect to the above service_bundle tag, the name attribute can have any meaningful string value, but otherwise it's not broadly visible in general. When the service is delivered through a package, it seems usual to prefix the value of the name attribute with the package name, such as in "package:...". I suppose this sort of prefixing could be harmlessly adapted to other cases as well.

For service development, the type attribute should always be manifest, although another useful value of profile is also valid but of secondary usage for replicating services' state configuration (enabled or disabled) across multiple systems.
The main disadvantage of using XML is its intrinsic verbosity.
Currently, there are no GUI tools for assisting SMF developers.