Websphere Liberty Architecture
As we understand Liberty is a highly composable and dynamic runtime environment. OSGi services are used to manage component lifecycles, and the injection of dependencies and configuration. The server process comprises a single JVM, the Liberty kernel, and any number of optional features.
OSGi services are used to manage component lifecycles and the injection of dependencies and configuration. The server process comprises a single JVM, the Liberty kernel, and any number of optional features.
Liberty Architecture:
The kernel launcher bootstraps the system and starts the OSGi framework. The configuration is parsed, and then the configured features are loaded by the feature manager. The kernel extensively uses OSGi services to provide a highly dynamic runtime environment.
Kernal Architecture:
The Liberty kernel comprises a feature manager that contains an OSGI configuration admin, OSGI declarative services, a file monitor, and a logging service. The feature manager and the OSGI declarative services are connected to a feature bundle. The OSGI configuration admin and the file monitor are connected to the server.xml file. The logging service is connected to the trace log.
As the diagram shows, the OSGi Configuration Admin service reads the configuration from the server.xml file, and injects the feature configuration into the feature manager. The feature manager reads bundle lists from the bundles that provide each feature, then installs and starts these bundles in the OSGi framework.
Feature Management:
A feature manager contains an OSGI configuration admin. The OSGI configuration admin reads config from the server.xml file and injects it into the feature manager. The feature manager reads the bundle list in the useful-3.2.mf file and installs and starts a feature bundle in the OSGI framework.
Configuration Management & Runtime service:
Runtime services provide configuration default settings so that the configuration you need to specify is kept to a minimum. You specify the features you need, along with any additions or overrides to the system default settings, in a server.xml file. You might choose to structure your configuration into a number of separate files that are linked to the parent server.xml file by using an include syntax. The configuration administrator reads the default configuration from bundles in the kernel, applies the user-specified configuration over this default configuration, then injects the merged configuration into feature bundles.
The OSGI configuration admin reads the default config from the kernel bundle and the feature bundle, merges user config over the defaults, and injects it back into the bundles. The merged config is sent to the server.xml file and then, optionally, to other XML files. The OSGi Declarative Services component is used so that function can be decomposed into discrete services, which are activated only when needed. This behavior helps the runtime environment to be late and lazy, keeping the footprint small and the startup fast.
comments powered by Disqus