OSGi prioritisation mechanism | Community
Skip to main content
Level 3
October 26, 2015
Solved

OSGi prioritisation mechanism

For example there are several services. One of services is very resource-intensive (makes high CPU load, IO). Respectively the service has big influence on the performance of other services. That is not acceptable because while resource-intensive background processing is taking place frontend-related services are very slow (users are waiting for pages).  

Is it possible to prioritise a bundle or a service in Felix context? 

Thanks

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
ogillAccepted solution
Employee
October 26, 2015

Hi,

from my experience trying to specify the order for bundles to start is very problematic.

The only time I attempted to do this was when one bundle was dependent on another bundle performing an action/updating content. Unfortunately the client did not have time to rewrite everything, so I added checks in bundle B to see if Bundle A had completed all it's activities, before allowing bundle B to start.

Another approach, if there are no dependencies between the bundles, would be to kick off a job for the bundle that takes a long time to start, this job would then run in a separate thread and run the initialization of the services, in this way the other bundles/service would be free to start quicker.

Regards,

Opkar

1 reply

ogillAccepted solution
Employee
October 26, 2015

Hi,

from my experience trying to specify the order for bundles to start is very problematic.

The only time I attempted to do this was when one bundle was dependent on another bundle performing an action/updating content. Unfortunately the client did not have time to rewrite everything, so I added checks in bundle B to see if Bundle A had completed all it's activities, before allowing bundle B to start.

Another approach, if there are no dependencies between the bundles, would be to kick off a job for the bundle that takes a long time to start, this job would then run in a separate thread and run the initialization of the services, in this way the other bundles/service would be free to start quicker.

Regards,

Opkar

Translate