Equinox P2 provides a concept called P2 category to group related installable units (IUs) in a P2 repository. In WSO2 Carbon we use the same concept to implement Carbon feature categories in our P2 repo. In our maven based build platform we use carbon-p2-plugin tool, to generate features, feature-repository, product profiles and feature-categories. To generate P2-categories using the Carbon p2-plugin we use P2 CategoryPublisher tool under-the-hood. I have explained how we can create P2-categories for Carbon features to represent a WSO2 product in one of my previous posts.
Following is how 'Application Server' category is shown as a P2-category in the repository. All required features to install Application Server is listed under the AS category as shown below.
Following is how 'Application Server' category is shown as a P2-category in the repository. All required features to install Application Server is listed under the AS category as shown below.
However there's a limitation in P2 category concept which restricts us from achieving fine-grained feature sub-categorization. Sub-categorization of features under a Product can be really useful from a user's point-of-view to identify the set of minimally required features to gain functionality of a certain WSO2 product. Using P2 category concept and CategoryPublisher tool we can only categorize features in a single level (Product level) as shown above. We cannot achieve a hierarchical sub-categorization which can map features to user-level feature groups based on their functionality. So to achieve sub-categorization of features we must find an alternate approach.
As a solution for this, and to implement sub-categories for WSO2 Carbon features, we can follow a process to create new set of composite features to group required features as sub-categories. A newly created composite feature will correspond to a sub-category in a certain Product. They can be specific to a product, because each product can have different grouping of the same platform features based on the expected functionality.
For an example if we take Application Server, we can group the list of features under AS category into sub-categories by defining new set of composite features as below.
- Application and Service Hosting
- Application Server - Core (contains the core set of features that must be installed with AS)
- Application Server -Transports (jms, mail transport features)
- Miscellaneous (dep.sync, event, tasks, ws-discovery features)
- Monitoring
- Tools
Please note that it's also possible to define more composite-features to group related carbon features and have them under other composites as imported-features.
For example under Application Server we can create a composite-feature as 'Mashup' and have it as an imported-feature under 'Application and Service Hosting' sub-category.
With above sub-categories defined and required features grouped into sub-categories, the AS category is now shown in the P2 repository like below.
For example under Application Server we can create a composite-feature as 'Mashup' and have it as an imported-feature under 'Application and Service Hosting' sub-category.
With above sub-categories defined and required features grouped into sub-categories, the AS category is now shown in the P2 repository like below.
In the next post, I will explain a step-by-step approach to create feature sub-categories under Products.


No comments:
Post a Comment