You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by João Ferreira <jt...@gmail.com> on 2009/06/15 16:55:43 UTC

A-OSGi: Autonomic OSGi

Hello

For some months i have followed this mailing list and have learned a
lot. Now i would like to share the work i have been doing in the last
months, for my master thesis. The work called "A-OSGi: A framework to
support the construction of autonomic OSGi-based applications" tries to
apply autonomic computing mechanisms to the OSGi platform, in particular
for Web Apps built using OSGi. You can read more about this work in this
tech report[1]. I have built a prototype using felix, pax web and ipojo.
I did modifications to:

    * felix framework (to support monitoring of CPU time of each bundle
      and something similar to eventhooks to support obligations and
      prohibitions between bundles and services);
    * pax web (to support monitoring of throughput and latency of requests)
    * iPOJO (to generate events when a component instance binds to a
      required service).

To support adaptations i have used Ponder2[2] to support the
specification of ECA rules.

If someone has suggestions for improving my work i would be very
appreciated.

Altough i still have some implementation issues, that i would like some
help from the felix community. These issues are about the detection of
service related events and collection of information about the bindings
between bundles and services.
I have used the Service layer of OSGi using ServiceListener to listen
for Service registrations and unregistrations. I used the
Bundle.getRegisteredServices() and Bundle.getServicesInUse() to have
runtime information about the bindings between Bundles and Services.

I have used iPOJO so bundles don't have to worry about dependency
mechanisms and to detect when a bundle binds to a service. I would like
to use iPOJO also to collect information about the binding without using
the OSGi service layer. Unfortunately I didn't found the way to do it...

Recently i found the 4.2 spec about eventhooks and findhooks that could
help me to detect these events and apply obligations and prohibitions
without modifying the framework or using iPOJO, supporting not only
iPOJO bundles but all bundles that use services the "normal" way.
However i still think using iPOJO is nice since the in "normal" way the
dependency mechanism that the programmer has to handle can be done in
different ways making my mechanism not accurate. Since iPOJO bundles
leverages on iPOJO dependency mechanisms i could ask the iPOJO the state
of the bindings, services provided by bundles, services required by
bundles and services used by bundles.

Hope i could explain myself
Cheers
João Ferreira

[1] http://www.inesc-id.pt/ficheiros/publicacoes/5467.pdf
[2] http://ponder2.net/



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: A-OSGi: Autonomic OSGi

Posted by João Ferreira <jt...@gmail.com>.
Hi

comments inline

João Ferreira

Toni Menzel wrote:
> 2009/6/15 João Ferreira <jt...@gmail.com>:
>   
>> Hello
>>
>> For some months i have followed this mailing list and have learned a
>> lot. Now i would like to share the work i have been doing in the last
>> months, for my master thesis. The work called "A-OSGi: A framework to
>> support the construction of autonomic OSGi-based applications" tries to
>> apply autonomic computing mechanisms to the OSGi platform, in particular
>> for Web Apps built using OSGi. You can read more about this work in this
>> tech report[1]. I have built a prototype using felix, pax web and ipojo.
>>     
>
> Nice! Sounds very interesting !
>
>   
>> I did modifications to:
>>
>>    * felix framework (to support monitoring of CPU time of each bundle
>>      and something similar to eventhooks to support obligations and
>>      prohibitions between bundles and services);
>>    * pax web (to support monitoring of throughput and latency of requests)
>>     
>
> At least for Pax stuff you are free (and invited hereby) to commit the
> changes yourself at OPS4J.
> Just create apropriate change issues at issues@ops4j.org.
>   
Besides throughput and latency i also monitor the CPU time involved in
each request. To monitor this i used javax.management to get the current
cpu time of the thread before and after the processing of the request.
The dependency on this package might be undesirable in some environments.
>   
>>    * iPOJO (to generate events when a component instance binds to a
>>      required service).
>>
>> To support adaptations i have used Ponder2[2] to support the
>> specification of ECA rules.
>>
>> If someone has suggestions for improving my work i would be very
>> appreciated.
>>
>> Altough i still have some implementation issues, that i would like some
>> help from the felix community. These issues are about the detection of
>> service related events and collection of information about the bindings
>> between bundles and services.
>> I have used the Service layer of OSGi using ServiceListener to listen
>> for Service registrations and unregistrations. I used the
>> Bundle.getRegisteredServices() and Bundle.getServicesInUse() to have
>> runtime information about the bindings between Bundles and Services.
>>
>> I have used iPOJO so bundles don't have to worry about dependency
>> mechanisms and to detect when a bundle binds to a service. I would like
>> to use iPOJO also to collect information about the binding without using
>> the OSGi service layer. Unfortunately I didn't found the way to do it...
>>
>> Recently i found the 4.2 spec about eventhooks and findhooks that could
>> help me to detect these events and apply obligations and prohibitions
>> without modifying the framework or using iPOJO, supporting not only
>> iPOJO bundles but all bundles that use services the "normal" way.
>> However i still think using iPOJO is nice since the in "normal" way the
>> dependency mechanism that the programmer has to handle can be done in
>> different ways making my mechanism not accurate. Since iPOJO bundles
>> leverages on iPOJO dependency mechanisms i could ask the iPOJO the state
>> of the bindings, services provided by bundles, services required by
>> bundles and services used by bundles.
>>
>> Hope i could explain myself
>> Cheers
>> João Ferreira
>>
>> [1] http://www.inesc-id.pt/ficheiros/publicacoes/5467.pdf
>> [2] http://ponder2.net/
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>
>>     
>
>
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: A-OSGi: Autonomic OSGi

Posted by Toni Menzel <to...@okidokiteam.com>.
2009/6/15 João Ferreira <jt...@gmail.com>:
> Hello
>
> For some months i have followed this mailing list and have learned a
> lot. Now i would like to share the work i have been doing in the last
> months, for my master thesis. The work called "A-OSGi: A framework to
> support the construction of autonomic OSGi-based applications" tries to
> apply autonomic computing mechanisms to the OSGi platform, in particular
> for Web Apps built using OSGi. You can read more about this work in this
> tech report[1]. I have built a prototype using felix, pax web and ipojo.

Nice! Sounds very interesting !

> I did modifications to:
>
>    * felix framework (to support monitoring of CPU time of each bundle
>      and something similar to eventhooks to support obligations and
>      prohibitions between bundles and services);
>    * pax web (to support monitoring of throughput and latency of requests)

At least for Pax stuff you are free (and invited hereby) to commit the
changes yourself at OPS4J.
Just create apropriate change issues at issues@ops4j.org.

>    * iPOJO (to generate events when a component instance binds to a
>      required service).
>
> To support adaptations i have used Ponder2[2] to support the
> specification of ECA rules.
>
> If someone has suggestions for improving my work i would be very
> appreciated.
>
> Altough i still have some implementation issues, that i would like some
> help from the felix community. These issues are about the detection of
> service related events and collection of information about the bindings
> between bundles and services.
> I have used the Service layer of OSGi using ServiceListener to listen
> for Service registrations and unregistrations. I used the
> Bundle.getRegisteredServices() and Bundle.getServicesInUse() to have
> runtime information about the bindings between Bundles and Services.
>
> I have used iPOJO so bundles don't have to worry about dependency
> mechanisms and to detect when a bundle binds to a service. I would like
> to use iPOJO also to collect information about the binding without using
> the OSGi service layer. Unfortunately I didn't found the way to do it...
>
> Recently i found the 4.2 spec about eventhooks and findhooks that could
> help me to detect these events and apply obligations and prohibitions
> without modifying the framework or using iPOJO, supporting not only
> iPOJO bundles but all bundles that use services the "normal" way.
> However i still think using iPOJO is nice since the in "normal" way the
> dependency mechanism that the programmer has to handle can be done in
> different ways making my mechanism not accurate. Since iPOJO bundles
> leverages on iPOJO dependency mechanisms i could ask the iPOJO the state
> of the bindings, services provided by bundles, services required by
> bundles and services used by bundles.
>
> Hope i could explain myself
> Cheers
> João Ferreira
>
> [1] http://www.inesc-id.pt/ficheiros/publicacoes/5467.pdf
> [2] http://ponder2.net/
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>



-- 
Toni Menzel
Independent Software Developer
Professional Profile: http://okidokiteam.com
toni@okidokiteam.com
http://www.ops4j.org     - New Energy for OSS Communities - Open
Participation Software.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: A-OSGi: Autonomic OSGi

Posted by João Ferreira <jt...@gmail.com>.
Hi

comments inline

João Ferreira

Clement Escoffier wrote:
> Hi,
>
>
> On 15.06.2009, at 16:55, João Ferreira wrote:
>
>> Hello
>>
>> For some months i have followed this mailing list and have learned a
>> lot. Now i would like to share the work i have been doing in the last
>> months, for my master thesis. The work called "A-OSGi: A framework to
>> support the construction of autonomic OSGi-based applications" tries to
>> apply autonomic computing mechanisms to the OSGi platform, in particular
>> for Web Apps built using OSGi. You can read more about this work in this
>> tech report[1]. I have built a prototype using felix, pax web and ipojo.
>> I did modifications to:
>>
>>    * felix framework (to support monitoring of CPU time of each bundle
>>      and something similar to eventhooks to support obligations and
>>      prohibitions between bundles and services);
>>    * pax web (to support monitoring of throughput and latency of
>> requests)
>>    * iPOJO (to generate events when a component instance binds to a
>>      required service).
>
> Nice job, I was thinking to something like this. Are you interested to
> contribute that?
I instrumented  the  method  servicearrival() and servicedeparture() in
the dependency handler to call my code. However i'm not sure this will
work in all cases.
Instead of calling my code i could launch a OSGi event?
>
>>
>> To support adaptations i have used Ponder2[2] to support the
>> specification of ECA rules.
>>
>> If someone has suggestions for improving my work i would be very
>> appreciated.
>>
>> Altough i still have some implementation issues, that i would like some
>> help from the felix community. These issues are about the detection of
>> service related events and collection of information about the bindings
>> between bundles and services.
>> I have used the Service layer of OSGi using ServiceListener to listen
>> for Service registrations and unregistrations. I used the
>> Bundle.getRegisteredServices() and Bundle.getServicesInUse() to have
>> runtime information about the bindings between Bundles and Services.
>>
>> I have used iPOJO so bundles don't have to worry about dependency
>> mechanisms and to detect when a bundle binds to a service. I would like
>> to use iPOJO also to collect information about the binding without using
>> the OSGi service layer. Unfortunately I didn't found the way to do it...
>
> There is one. The Architecture service (exposed by each instances
> enabling their Architecture) provides you all the required
> information. I can help you on that.
I see the bundles publish architecture service instances, and the arch
command does it. But i didnt investigate it deep enough because of
deadlines to other work. An example would be nice.
>
>>
>> Recently i found the 4.2 spec about eventhooks and findhooks that could
>> help me to detect these events and apply obligations and prohibitions
>> without modifying the framework or using iPOJO, supporting not only
>> iPOJO bundles but all bundles that use services the "normal" way.
>> However i still think using iPOJO is nice since the in "normal" way the
>> dependency mechanism that the programmer has to handle can be done in
>> different ways making my mechanism not accurate. Since iPOJO bundles
>> leverages on iPOJO dependency mechanisms i could ask the iPOJO the state
>> of the bindings, services provided by bundles, services required by
>> bundles and services used by bundles.
>>
>> Hope i could explain myself
>> Cheers
>> João Ferreira
>>
>> [1] http://www.inesc-id.pt/ficheiros/publicacoes/5467.pdf
>> [2] http://ponder2.net/
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: A-OSGi: Autonomic OSGi

Posted by Clement Escoffier <cl...@gmail.com>.
Hi,


On 15.06.2009, at 16:55, João Ferreira wrote:

> Hello
>
> For some months i have followed this mailing list and have learned a
> lot. Now i would like to share the work i have been doing in the last
> months, for my master thesis. The work called "A-OSGi: A framework to
> support the construction of autonomic OSGi-based applications" tries  
> to
> apply autonomic computing mechanisms to the OSGi platform, in  
> particular
> for Web Apps built using OSGi. You can read more about this work in  
> this
> tech report[1]. I have built a prototype using felix, pax web and  
> ipojo.
> I did modifications to:
>
>    * felix framework (to support monitoring of CPU time of each bundle
>      and something similar to eventhooks to support obligations and
>      prohibitions between bundles and services);
>    * pax web (to support monitoring of throughput and latency of  
> requests)
>    * iPOJO (to generate events when a component instance binds to a
>      required service).

Nice job, I was thinking to something like this. Are you interested to  
contribute that?

>
> To support adaptations i have used Ponder2[2] to support the
> specification of ECA rules.
>
> If someone has suggestions for improving my work i would be very
> appreciated.
>
> Altough i still have some implementation issues, that i would like  
> some
> help from the felix community. These issues are about the detection of
> service related events and collection of information about the  
> bindings
> between bundles and services.
> I have used the Service layer of OSGi using ServiceListener to listen
> for Service registrations and unregistrations. I used the
> Bundle.getRegisteredServices() and Bundle.getServicesInUse() to have
> runtime information about the bindings between Bundles and Services.
>
> I have used iPOJO so bundles don't have to worry about dependency
> mechanisms and to detect when a bundle binds to a service. I would  
> like
> to use iPOJO also to collect information about the binding without  
> using
> the OSGi service layer. Unfortunately I didn't found the way to do  
> it...

There is one. The Architecture service (exposed by each instances  
enabling their Architecture) provides you all the required  
information. I can help you on that.

>
> Recently i found the 4.2 spec about eventhooks and findhooks that  
> could
> help me to detect these events and apply obligations and prohibitions
> without modifying the framework or using iPOJO, supporting not only
> iPOJO bundles but all bundles that use services the "normal" way.
> However i still think using iPOJO is nice since the in "normal" way  
> the
> dependency mechanism that the programmer has to handle can be done in
> different ways making my mechanism not accurate. Since iPOJO bundles
> leverages on iPOJO dependency mechanisms i could ask the iPOJO the  
> state
> of the bindings, services provided by bundles, services required by
> bundles and services used by bundles.
>
> Hope i could explain myself
> Cheers
> João Ferreira
>
> [1] http://www.inesc-id.pt/ficheiros/publicacoes/5467.pdf
> [2] http://ponder2.net/
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: A-OSGi: Autonomic OSGi

Posted by João Ferreira <jt...@gmail.com>.
Hi

Srry i used eventhook term incorrectly.
The approach you said works, but i would like to know how could i get
the same using iPOJO.

Comments inline

João Ferreira

David Bosschaert wrote:
> Hi Joao,
>
> Not entirely sure...
>
> The findhook/listenerhook combination allows you to find out what
> services are requested by bundles (but they may not yet be bound to
> them). This allows on demand registration of services, as used by
> Distributed OSGi.
>   
With this combination i could know the services a bundle is requesting
but doesn't have yet. I forget bundles could be listening on service events.
> The eventhook/findhook combination allows you to limit the visibility
> of services, which allows proxification.
>   
For doing prohibitions/obligations of bundles bindings to services i
need the eventhook too so bundles aren't notified about services that it
will not see. Didn't remember that.
> Is that what you are looking for?
>   
Yes.
To detect when a client binds to a service (gets the service object) I
could use the bindhook . However a bundle client can have the 2 Service
Objects but use only one. Thats why i was using iPOJO.
> Cheers,
>
> David
>
> 2009/6/15 João Ferreira <jt...@gmail.com>:
>   
>> Hello
>>
>> For some months i have followed this mailing list and have learned a
>> lot. Now i would like to share the work i have been doing in the last
>> months, for my master thesis. The work called "A-OSGi: A framework to
>> support the construction of autonomic OSGi-based applications" tries to
>> apply autonomic computing mechanisms to the OSGi platform, in particular
>> for Web Apps built using OSGi. You can read more about this work in this
>> tech report[1]. I have built a prototype using felix, pax web and ipojo.
>> I did modifications to:
>>
>>    * felix framework (to support monitoring of CPU time of each bundle
>>      and something similar to eventhooks to support obligations and
>>      prohibitions between bundles and services);
>>    * pax web (to support monitoring of throughput and latency of requests)
>>    * iPOJO (to generate events when a component instance binds to a
>>      required service).
>>
>> To support adaptations i have used Ponder2[2] to support the
>> specification of ECA rules.
>>
>> If someone has suggestions for improving my work i would be very
>> appreciated.
>>
>> Altough i still have some implementation issues, that i would like some
>> help from the felix community. These issues are about the detection of
>> service related events and collection of information about the bindings
>> between bundles and services.
>> I have used the Service layer of OSGi using ServiceListener to listen
>> for Service registrations and unregistrations. I used the
>> Bundle.getRegisteredServices() and Bundle.getServicesInUse() to have
>> runtime information about the bindings between Bundles and Services.
>>
>> I have used iPOJO so bundles don't have to worry about dependency
>> mechanisms and to detect when a bundle binds to a service. I would like
>> to use iPOJO also to collect information about the binding without using
>> the OSGi service layer. Unfortunately I didn't found the way to do it...
>>
>> Recently i found the 4.2 spec about eventhooks and findhooks that could
>> help me to detect these events and apply obligations and prohibitions
>> without modifying the framework or using iPOJO, supporting not only
>> iPOJO bundles but all bundles that use services the "normal" way.
>> However i still think using iPOJO is nice since the in "normal" way the
>> dependency mechanism that the programmer has to handle can be done in
>> different ways making my mechanism not accurate. Since iPOJO bundles
>> leverages on iPOJO dependency mechanisms i could ask the iPOJO the state
>> of the bindings, services provided by bundles, services required by
>> bundles and services used by bundles.
>>
>> Hope i could explain myself
>> Cheers
>> João Ferreira
>>
>> [1] http://www.inesc-id.pt/ficheiros/publicacoes/5467.pdf
>> [2] http://ponder2.net/
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>
>>     
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: A-OSGi: Autonomic OSGi

Posted by David Bosschaert <da...@gmail.com>.
Hi Joao,

Not entirely sure...

The findhook/listenerhook combination allows you to find out what
services are requested by bundles (but they may not yet be bound to
them). This allows on demand registration of services, as used by
Distributed OSGi.
The eventhook/findhook combination allows you to limit the visibility
of services, which allows proxification.

Is that what you are looking for?

Cheers,

David

2009/6/15 João Ferreira <jt...@gmail.com>:
> Hello
>
> For some months i have followed this mailing list and have learned a
> lot. Now i would like to share the work i have been doing in the last
> months, for my master thesis. The work called "A-OSGi: A framework to
> support the construction of autonomic OSGi-based applications" tries to
> apply autonomic computing mechanisms to the OSGi platform, in particular
> for Web Apps built using OSGi. You can read more about this work in this
> tech report[1]. I have built a prototype using felix, pax web and ipojo.
> I did modifications to:
>
>    * felix framework (to support monitoring of CPU time of each bundle
>      and something similar to eventhooks to support obligations and
>      prohibitions between bundles and services);
>    * pax web (to support monitoring of throughput and latency of requests)
>    * iPOJO (to generate events when a component instance binds to a
>      required service).
>
> To support adaptations i have used Ponder2[2] to support the
> specification of ECA rules.
>
> If someone has suggestions for improving my work i would be very
> appreciated.
>
> Altough i still have some implementation issues, that i would like some
> help from the felix community. These issues are about the detection of
> service related events and collection of information about the bindings
> between bundles and services.
> I have used the Service layer of OSGi using ServiceListener to listen
> for Service registrations and unregistrations. I used the
> Bundle.getRegisteredServices() and Bundle.getServicesInUse() to have
> runtime information about the bindings between Bundles and Services.
>
> I have used iPOJO so bundles don't have to worry about dependency
> mechanisms and to detect when a bundle binds to a service. I would like
> to use iPOJO also to collect information about the binding without using
> the OSGi service layer. Unfortunately I didn't found the way to do it...
>
> Recently i found the 4.2 spec about eventhooks and findhooks that could
> help me to detect these events and apply obligations and prohibitions
> without modifying the framework or using iPOJO, supporting not only
> iPOJO bundles but all bundles that use services the "normal" way.
> However i still think using iPOJO is nice since the in "normal" way the
> dependency mechanism that the programmer has to handle can be done in
> different ways making my mechanism not accurate. Since iPOJO bundles
> leverages on iPOJO dependency mechanisms i could ask the iPOJO the state
> of the bindings, services provided by bundles, services required by
> bundles and services used by bundles.
>
> Hope i could explain myself
> Cheers
> João Ferreira
>
> [1] http://www.inesc-id.pt/ficheiros/publicacoes/5467.pdf
> [2] http://ponder2.net/
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org