felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From guilla...@apache.org
Subject svn commit: r1528014 - in /felix/site/trunk: content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-userguide/ipojo-advanced-topics/ipojo-extender-configuration.mdtext templates/ipojo.html
Date Tue, 01 Oct 2013 09:47:51 GMT
Author: guillaume
Date: Tue Oct  1 09:47:50 2013
New Revision: 1528014

URL: http://svn.apache.org/r1528014
Log:
FELIX-4252 Make Extender's ThreadPool size configurable

* Add documentation on Extender's configuration possibilities

Added:
    felix/site/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-userguide/ipojo-advanced-topics/ipojo-extender-configuration.mdtext
Modified:
    felix/site/trunk/templates/ipojo.html

Added: felix/site/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-userguide/ipojo-advanced-topics/ipojo-extender-configuration.mdtext
URL: http://svn.apache.org/viewvc/felix/site/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-userguide/ipojo-advanced-topics/ipojo-extender-configuration.mdtext?rev=1528014&view=auto
==============================================================================
--- felix/site/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-userguide/ipojo-advanced-topics/ipojo-extender-configuration.mdtext
(added)
+++ felix/site/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-userguide/ipojo-advanced-topics/ipojo-extender-configuration.mdtext
Tue Oct  1 09:47:50 2013
@@ -0,0 +1,139 @@
+translation_pending: true
+Title: Configuring iPOJO Extender
+
+# Configuring iPOJO Extender
+
+*This page presents how the iPOJO's extender can be configured.*
+
+[TOC]
+
+## Extender
+
+The iPOJO Extender starts with the iPOJO bundle (in fact, it's the iPOJO's `BundleActivator`).
It is basically a `BundleTracker` that will discover iPOJO's components, instances, etc from
the `ACTIVE` bundles.
+
+### ThreadPool
+
+In Apache Felix iPOJO 1.10, the extender has been refactored to take advantage of multi-threading
capabilities of modern machines.
+There is now an `ExecutorQueueService` service, based on a `ThreadPoolExecutor` that enable
asynchronous (and concurrent) activation of Bundles.
+All activation activities (search for `IPOJO-Components` and `IPOJO-Extensions` Manifest
headers, creation of factories and instances, binding) are done through job submissions.
+Respectively, deactivation is always done asynchronously (if bundle is stopped when we would
perform actions on it, that the ideal way to Exceptions).
+
+By default, the ThreadPool size is set to *1* (asynchronous, but not concurrent executions),
to mimic the pre 1.10 behavior.
+
+ThreadPool's size can be configured either with System properties or through ConfigurationAdmin.
+With Config Admin, the Configuration object has to target the service with `org.apache.felix.ipojo.extender.ExecutorQueueService`
as its Service PID.
+Property names are identical for System properties and ConfigAdmin.
+
+<table class="table table-striped">
+  <thead>
+    <tr>
+      <th>Function</th>
+      <th>Property Name</th>
+      <th>Supported Type(s)</th>
+      <th>Default Value</th>
+      <th>Description</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td>Number of Threads</td>
+      <td>`org.apache.felix.ipojo.extender.ThreadPoolSize`</td>
+      <td>Integer</td>
+      <td>`1`</td>
+      <td>The size of the thread pool. The default value is 1. Increase in case of
a large amount of bundle's to manage (bundles with iPOJO's components/instances inside).</td>
+    </tr>
+  </tbody>
+</table>
+
+### Synchronous / Asynchronous processing
+
+By default, Apache Felix iPOJO process the Bundles in an asynchronous way. It's better in
term of performances and more aligned with OSGi spec recommendations.
+However, in some situations, like when running in [Google App Engine](https://developers.google.com/appengine/)
(*GAE*), the underlying platform imposes limitations.
+For example GAE imposes mono-threading. That means that no asynchronous processing can be
done by the application itself.
+
+In other situations, it can be useful to be sure that components and instances contained
in a given Bundle will be synchronously started.
+
+iPOJO's Extender can be configured to support mono-threaded bundle processing to support
such use cases.
+
+#### System wide
+
+General synchronous processing can be configured through System properties or iPOJO's own
Manifest attributes (requires a dedicated iPOJO bundle build).
+
+<table class="table table-striped">
+  <thead>
+    <tr>
+      <th>Mean</th>
+      <th>Property Name</th>
+      <th>Supported Type(s)</th>
+      <th>Default Value</th>
+      <th>Description</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td>System Property</td>
+      <td>`ipojo.processing.synchronous`</td>
+      <td>Boolean</td>
+      <td>`false`</td>
+      <td>Whether the Bundles processing should be performed synchronously. The default
value is `false`. Set it to `true` when running in GAE for example.</td>
+    </tr>
+    <tr>
+      <td>Manifest</td>
+      <td>`IPojo-processing-synchronous`</td>
+      <td>Boolean</td>
+      <td>`false`</td>
+      <td>Whether the Bundles processing should be performed synchronously. The default
value is `false`. Set it to `true` when running in GAE for example. Notice that case is ignored
(`IPOJO-PROCESSING-SYNCHRONOUS` works as well as `IPojo-Processing-Synchronous`).</td>
+    </tr>
+  </tbody>
+</table>
+
+#### Per-Bundle
+
+The synchronous behavior can be selected per-bundle (given that it does not conflict with
existing system wide configuration).
+Synchronous/Asynchronous behavior can be expressed in the Bundle's Manifest (case is not
significant, but an uppercase first letter is recommended):
+
+    :::properties
+    IPOJO-Queue-Preference SYNC
+
+3 values are supported:
+
+* `SYNC` for synchronous processing
+* `ASYNC` for asynchronous processing
+* `DEFAULT` using the default behavior
+
+If no header (or invalid value) is provided, the fallback behavior is `DEFAULT` (use system
wide preference).
+
+### Event Dispatcher
+
+Apache Felix iPOJO provides a way to circumvent the so-call event storm happening when starting
large OSGi applications (chained services apparitions).
+It is a dedicated Event dispatcher that mimics a service registry partition logic based on
registered service interfaces (`Constants.OBJECTCLASS`).
+It is not enabled by default (rely on the framework's own service registry).
+
+<table class="table table-striped">
+  <thead>
+    <tr>
+      <th>Mean</th>
+      <th>Property Name</th>
+      <th>Supported Type(s)</th>
+      <th>Default Value</th>
+      <th>Description</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td>System Property</td>
+      <td>`ipojo.internal.dispatcher`</td>
+      <td>Boolean</td>
+      <td>`false`</td>
+      <td>Whether the EventDispatcher should be enabled. The default value is `false`.
Set it to `true` when running large-scale applications.</td>
+    </tr>
+    <tr>
+      <td>Manifest</td>
+      <td>`IPOJO-Internal-Dispatcher`</td>
+      <td>Boolean</td>
+      <td>`false`</td>
+      <td>Whether the EventDispatcher should be enabled. The default value is `false`.
Set it to `true` when running large-scale applications. Notice that case is ignored (`IPOJO-INTERNAL-DISPATCHER`
works as well as `IPOJO-Internal-Dispatcher`).</td>
+    </tr>
+  </tbody>
+</table>
+

Modified: felix/site/trunk/templates/ipojo.html
URL: http://svn.apache.org/viewvc/felix/site/trunk/templates/ipojo.html?rev=1528014&r1=1528013&r2=1528014&view=diff
==============================================================================
--- felix/site/trunk/templates/ipojo.html (original)
+++ felix/site/trunk/templates/ipojo.html Tue Oct  1 09:47:50 2013
@@ -108,6 +108,7 @@
                                         <li><a href="/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-testing-components.html">Testing
components</a></li>
                                         <li><a href="/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-userguide/ipojo-advanced-topics/using-stereotypes.html">Using
@Stereotypes</a></li>
                                         <li><a href="/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-eclipse-integration.html">Eclipse
Integration</a></li>
+                                        <li><a href="/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-userguide/ipojo-advanced-topics/ipojo-extender-configuration.html">Configuring
iPOJO's Extender</a></li>
                                         <li><a href="/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-userguide/ipojo-faq.html">FAQ</a></li>
                                         <li><a href="{{ refs.ipojo-reference-card.path
}}">Reference Card</a></li>
                                         <li class="divider"></li>



Mime
View raw message