You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by Ramkumar R <ra...@gmail.com> on 2009/04/08 09:11:36 UTC

[DISCUSS] Implementing SCA OSGi Binding in Tuscany

Hi All,

Noticed that a proposal for implementing <binding.osgi> in Tuscnay is been
discussed in the
following thread...
http://www.mail-archive.com/tuscany-dev@ws.apache.org/msg18983.html

and there were positive responses from the community to go ahead.

Not sure if there is any reason, why we still don't have binding.osgi in our
modules.

Couple of advantages to have this in place:

   - A SCA OSGi Binding can enable interworking between SCA components and
   OSGi services
   - This will enable to integrate Tuscany with Spring Dynamic Modules.

I would like to take this proposal forward as suggested in the above thread
and implement a new
binding called binding.osgi.

Like to get some comments/suggestion on the same before I go ahead. Thanks.

-- 
Thanks & Regards,
Ramkumar Ramalingam

Re: [DISCUSS] Implementing SCA OSGi Binding in Tuscany

Posted by Ramkumar R <ra...@gmail.com>.
Thanks Raymond, that gives a good picture on what we already support. So a
new binding.osgi
will not be required at this stage. Let me drop my plan on this.


On Thu, Apr 9, 2009 at 4:37 AM, Raymond Feng <en...@gmail.com> wrote:

>  Hi,
>
> In the prototype of RFC 119 with Tuscany/SCA, we use "implementation.osgi"
> to represent the OSGi bundle as an SCA component in the assembly. The OSGi
> services provided by the bundle are mapped into SCA services while the OSGi
> service references consumed by the bundle are mapped into SCA references.
> It's an OSGi centric view and Tuscany/SCA is used as the distribution
> software. SCA is mostly transparent to the OSGi application code.
>
> If an SCA composite is used within an OSGi bundle to describe the assembly
> (especially the POJOs in the bundle), we could have something like
> binding.osgi to bridge SCA into the OSGi world such as:
>
> * OSGi service binding: register SCA services into the OSGi service
> registry
> * OSGi reference binding: access an existing OSGi service from SCA
> components (if a bundle has been modeled as implementation.osgi, then the
> OSGi services are already mapped to SCA services which can be directly wired
> from an SCA reference without the introduction of binding.osgi).
> As Graham pointed out, the usage is limited to portion of the SCA
> composition is hosted by an OSGi runtime.
>
> Thanks,
> Raymond
>
>  *From:* Ramkumar R <ra...@gmail.com>
> *Sent:* Wednesday, April 08, 2009 5:16 AM
> *To:* dev@tuscany.apache.org
> *Subject:* Re: [DISCUSS] Implementing SCA OSGi Binding in Tuscany
>
>
> On Wed, Apr 8, 2009 at 4:09 PM, Graham Charters <gc...@googlemail.com>wrote:
>
>>
>> If binding.osgi does go ahead we should make sure the information
>> described to configure the bindings (to map between OSGi and SCA
>> services) is consistent with that described for implementation.osgi,
>> since both would be configuring the same mappings.
>>
>> Regards, Graham.
>>
>
> Thanks Simon and Graham for your comments, it sounds like we need to do
> more work on implementation.osgi
> or explore more with what we have already got.
>
> --
> Thanks & Regards,
> Ramkumar Ramalingam
>



-- 
Thanks & Regards,
Ramkumar Ramalingam

Re: [DISCUSS] Implementing SCA OSGi Binding in Tuscany

Posted by Raymond Feng <en...@gmail.com>.
Hi,

In the prototype of RFC 119 with Tuscany/SCA, we use "implementation.osgi" to represent the OSGi bundle as an SCA component in the assembly. The OSGi services provided by the bundle are mapped into SCA services while the OSGi service references consumed by the bundle are mapped into SCA references. It's an OSGi centric view and Tuscany/SCA is used as the distribution software. SCA is mostly transparent to the OSGi application code.

If an SCA composite is used within an OSGi bundle to describe the assembly (especially the POJOs in the bundle), we could have something like binding.osgi to bridge SCA into the OSGi world such as:

* OSGi service binding: register SCA services into the OSGi service registry
* OSGi reference binding: access an existing OSGi service from SCA components (if a bundle has been modeled as implementation.osgi, then the OSGi services are already mapped to SCA services which can be directly wired from an SCA reference without the introduction of binding.osgi).

As Graham pointed out, the usage is limited to portion of the SCA composition is hosted by an OSGi runtime.

Thanks,
Raymond

From: Ramkumar R 
Sent: Wednesday, April 08, 2009 5:16 AM
To: dev@tuscany.apache.org 
Subject: Re: [DISCUSS] Implementing SCA OSGi Binding in Tuscany




On Wed, Apr 8, 2009 at 4:09 PM, Graham Charters <gc...@googlemail.com> wrote:



  If binding.osgi does go ahead we should make sure the information
  described to configure the bindings (to map between OSGi and SCA
  services) is consistent with that described for implementation.osgi,
  since both would be configuring the same mappings.

  Regards, Graham.


Thanks Simon and Graham for your comments, it sounds like we need to do more work on implementation.osgi
or explore more with what we have already got.

-- 
Thanks & Regards,
Ramkumar Ramalingam

Re: [DISCUSS] Implementing SCA OSGi Binding in Tuscany

Posted by Ramkumar R <ra...@gmail.com>.
On Wed, Apr 8, 2009 at 4:09 PM, Graham Charters <gc...@googlemail.com>wrote:

>
>  If binding.osgi does go ahead we should make sure the information
> described to configure the bindings (to map between OSGi and SCA
> services) is consistent with that described for implementation.osgi,
> since both would be configuring the same mappings.
>
> Regards, Graham.
>

Thanks Simon and Graham for your comments, it sounds like we need to do more
work on implementation.osgi
or explore more with what we have already got.

-- 
Thanks & Regards,
Ramkumar Ramalingam

Re: [DISCUSS] Implementing SCA OSGi Binding in Tuscany

Posted by Simon Laws <si...@googlemail.com>.
snip...

>>> A SCA OSGi Binding can enable interworking between SCA components and OSGi
>>> services
>>
>> I'd like to understand the scenario in a little more detail. Do you
>> mean here that an SCA component and a Non-SCA OSGi based service will
>> be interacting within the same JVM?
>>
>> Simon
>>
>
> My understanding of binding.osgi is that is what it does.  The OSGi
> service implementations live in the same JVM, but are outside the
> management of SCA.  This, for me, makes it seem like a slightly
> strange binding (from an SCA perspective), but it may make sense from
> an OSGi-centric perspective.
>

That's why I was asking the question as I'd like to understand when a
user would choose to use binding.osgi vs implementation.osgi say. The
specific scenario that comes to mind is...

Start tuscany runtime in an OSGi container
This OSGi contain may hold other bundles which are nothing to do with
SCA but which may of course expose services via the OSGi registry
Contribution is made which contains a composite that wishes to
reference these non-OSGi services.

It seems similar to the difference between implementation,ejb and
binding.ejb to me. However what about the service side. In SCA terms
it would be natural to be able to add a binding.osgi to an SCA service
and have that appear in the local OSGi registry in order that non-SCA
OSGi bundles can access it.

Am not a supporter or detractor at the moment but want to understand
how we would recommend people exploit such a feature if we had it.

Simon

Re: [DISCUSS] Implementing SCA OSGi Binding in Tuscany

Posted by Graham Charters <gc...@googlemail.com>.
2009/4/8 Simon Laws <si...@googlemail.com>:
> Hi Ram
>
> snip...
>
>> A SCA OSGi Binding can enable interworking between SCA components and OSGi
>> services
>
> I'd like to understand the scenario in a little more detail. Do you
> mean here that an SCA component and a Non-SCA OSGi based service will
> be interacting within the same JVM?
>
> Simon
>

My understanding of binding.osgi is that is what it does.  The OSGi
service implementations live in the same JVM, but are outside the
management of SCA.  This, for me, makes it seem like a slightly
strange binding (from an SCA perspective), but it may make sense from
an OSGi-centric perspective.

I think it's worth noting that we should be able to achieve the two
interoperability use cases described through implementation.osgi, the
difference being SCA would be responsible for the lifecycle of the
bundles.

If binding.osgi does go ahead we should make sure the information
described to configure the bindings (to map between OSGi and SCA
services) is consistent with that described for implementation.osgi,
since both would be configuring the same mappings.

Regards, Graham.

Re: [DISCUSS] Implementing SCA OSGi Binding in Tuscany

Posted by Simon Laws <si...@googlemail.com>.
Hi Ram

snip...

> A SCA OSGi Binding can enable interworking between SCA components and OSGi
> services

I'd like to understand the scenario in a little more detail. Do you
mean here that an SCA component and a Non-SCA OSGi based service will
be interacting within the same JVM?

Simon