You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Venkatakrishnan (JIRA)" <tu...@ws.apache.org> on 2006/08/10 14:34:15 UTC

[jira] Updated: (TUSCANY-611) RMI Binding

     [ http://issues.apache.org/jira/browse/TUSCANY-611?page=all ]

Venkatakrishnan updated TUSCANY-611:
------------------------------------

    Attachment: Tuscany-RMI-Binding-Aug-10-Updated.diff

Hi... there is one addition that has been missed out in the prev. patch.  My sincere apologies for that goof-up.... here is the updated patch.  Thanks.

> RMI Binding
> -----------
>
>                 Key: TUSCANY-611
>                 URL: http://issues.apache.org/jira/browse/TUSCANY-611
>             Project: Tuscany
>          Issue Type: Bug
>            Reporter: Venkatakrishnan
>         Assigned To: ant elder
>         Attachments: Tuscany-RMI-Binding-Aug-10-Updated.diff, Tuscany-RMI-Binding-Aug-10.diff, Tuscany-RMI-Binding-Reference-Sample-Aug-10.diff, Tuscany-RMI-Binding-Service-Sample-Aug-10.diff
>
>
> SCA RMI Binding with samples for SCA Reference and SCA Service using RMI Binding.
> Here is a first cut implementation for this.  Could somebody please review and apply?  Also I have had the following issues un-resolved: -
> - The samples can be tested thro the Testcases in them.  These testcases work from eclipse as long as I have added the RMI-Binding Eclipse project to the classpath.  Otherwise the binding does get picked up.  The same is the issue when trying to execute the testcases from maven.  Could somebody please help in fixing this?  Thanks.
> Note :-
> --------
> I shall be working further with this binding to address the following : -
> - there is single attribute called 'uri' for the binding.  I shall be splitting this to host, port and service name with defaults to each when not specified.
> - it is now required the that SCA Service require a component to implement the interface Remote.  I imagine this to be intrusive.  All that a developer should do is pick up an existing component with a 'non remote' interface and simply deploy it exposing the service as RMI.  The binding should dynamically be able to generate a remote interface and a proxy and host it as a facade to this implementation.  
> -  will be glad to take forward any other inputs from the community as well.
> Thanks
> - Venkat

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


Re: [jira] Updated: (TUSCANY-611) RMI Binding

Posted by Jeremy Boynes <jb...@apache.org>.
On Aug 10, 2006, at 10:53 PM, Venkata Krishnan wrote:

> Thanks Ant and Jim.
>
> Ant, I shall certainly work on the formatting and a couple of other  
> issues
> and posted an updated patch asap.
>
> Jim, you point was something that I did vacillate about.  I was  
> wondering if
> the registry should be started by the binding or should it be done  
> offline.
>
>
> My imagination of the Registry is that it is lightweight and it  
> should be ok
> to host several instances of it on a host, ofcourse each on a  
> different
> port. Hence we might actually allow the assemblies to mention which  
> port
> number is preferred to host the RMI Service.  If a registry for the  
> port
> already exists then we simply use that otherwise start one.  So if is
> possible that a registry on a port will host more than one service.
>
> It is also a good idea that we clearly have one registry per host and
> implement it the way you have mentioned out here.  I am open to do  
> this as
> well.  Let me know your final thoughts on this.
>
> Jerermy and others what are your thoughts on this?
>

One per host (runtime) sounds good. The port should be a property of  
the system component that initializes the registry - by making it a  
property we can potentially configure it in scdl.

--
Jeremy


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


Re: [jira] Updated: (TUSCANY-611) RMI Binding

Posted by ant elder <an...@gmail.com>.
Hi Venkat,

A couple of quick comments:

- this is probably teaching you to suck eggs...but if you are going to send
in a patch for reformatting the code could you do that as a separate patch
with no other changes. If you mix reformatting and code changes in a single
patch it makes it real hard to see what those changes are when we apply the
patch

- the axis binding stuff has been taken out of the standalone distribution
now so you shouldn't be seeing those errors anymore if you try now

- we don't really have a good story for how to do integration testing yet,
so probably don't try to have those server and client tests in the build for
now. One problem with the service test is it wants you to hit enter on
System.in so it would hang the mvn build :)

   ...ant

On 8/15/06, Venkata Krishnan <fo...@gmail.com> wrote:
>
> Hi,
>
> - I will add it to the SCDL in the <binding.rmi>
> - The exception seems to be related to the Axis2 Binding jar that gets
> packed into the extension directory of a standalone distribution.  I
> removed
> it for now, and have things working all right.
> - I have not included a testcase that exposes a RMI service and a
> reference
> that makes use of this.  The testcase works, as before only in
> eclipse.  The
> maven build fails when the tests are executed.  I will see if I can figure
> out something after which I will seek your help to get over this :-)
>
> Thanks.
>
> - Venkat
>
> On 8/15/06, Jeremy Boynes <jb...@apache.org> wrote:
> >
> > On Aug 14, 2006, at 10:41 PM, Venkata Krishnan wrote:
> >
> > > Hi Jim / Jeremy,
> > > I have been able to go forward quite a bit.
> >
> > Cool
> >
> > > - Which is the scdl into which I must add the RMIHost component.  I
> > > added it
> > > first to the system.scdl in SCA-API project.  But that did not get
> > > picked up
> > > by the loader.  When I debugged I figured out that it was the
> > > system.scdl in
> > > the SCA-Test project that was being loaded for system components.
> > > So added
> > > it there and it did get picked up.  Is this right?  There is
> > > something that
> > > I am missing here.. where should I be adding this component actually.
> >
> > I would suggest adding it to the SCDL in the <binding.rmi> extension
> > - this would only be activated if the RMI binding extension was active.
> >
> > > - I have added 'Module' scope for the RMIHostImpl and have the
> > > eager init
> > > decoration as well.
> > >
> > > - I have added the autowire annotations to the constructor of the
> > > RMIBindingBuilder.
> > >
> > > When I run, the RMIHostImpl is picked up and injected into the
> > > builder.  But
> > > then I have having some strange exceptions in the DirectoryScanner
> > > and in
> > > the creation of the target invoker. I shall work to get over this
> > > and see if
> > > I can post a patch tonight.
> >
> > What exceptions (can't help if we don't know :-) )?
> > --
> > Jeremy
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> > For additional commands, e-mail: tuscany-dev-help@ws.apache.org
> >
> >
>
>

Re: [jira] Updated: (TUSCANY-611) RMI Binding

Posted by Venkata Krishnan <fo...@gmail.com>.
Hi,

- I will add it to the SCDL in the <binding.rmi>
- The exception seems to be related to the Axis2 Binding jar that gets
packed into the extension directory of a standalone distribution.  I removed
it for now, and have things working all right.
- I have not included a testcase that exposes a RMI service and a reference
that makes use of this.  The testcase works, as before only in eclipse.  The
maven build fails when the tests are executed.  I will see if I can figure
out something after which I will seek your help to get over this :-)

Thanks.

- Venkat

On 8/15/06, Jeremy Boynes <jb...@apache.org> wrote:
>
> On Aug 14, 2006, at 10:41 PM, Venkata Krishnan wrote:
>
> > Hi Jim / Jeremy,
> > I have been able to go forward quite a bit.
>
> Cool
>
> > - Which is the scdl into which I must add the RMIHost component.  I
> > added it
> > first to the system.scdl in SCA-API project.  But that did not get
> > picked up
> > by the loader.  When I debugged I figured out that it was the
> > system.scdl in
> > the SCA-Test project that was being loaded for system components.
> > So added
> > it there and it did get picked up.  Is this right?  There is
> > something that
> > I am missing here.. where should I be adding this component actually.
>
> I would suggest adding it to the SCDL in the <binding.rmi> extension
> - this would only be activated if the RMI binding extension was active.
>
> > - I have added 'Module' scope for the RMIHostImpl and have the
> > eager init
> > decoration as well.
> >
> > - I have added the autowire annotations to the constructor of the
> > RMIBindingBuilder.
> >
> > When I run, the RMIHostImpl is picked up and injected into the
> > builder.  But
> > then I have having some strange exceptions in the DirectoryScanner
> > and in
> > the creation of the target invoker. I shall work to get over this
> > and see if
> > I can post a patch tonight.
>
> What exceptions (can't help if we don't know :-) )?
> --
> Jeremy
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>
>

Re: [jira] Updated: (TUSCANY-611) RMI Binding

Posted by Jeremy Boynes <jb...@apache.org>.
On Aug 14, 2006, at 10:41 PM, Venkata Krishnan wrote:

> Hi Jim / Jeremy,
> I have been able to go forward quite a bit.

Cool

> - Which is the scdl into which I must add the RMIHost component.  I  
> added it
> first to the system.scdl in SCA-API project.  But that did not get  
> picked up
> by the loader.  When I debugged I figured out that it was the  
> system.scdl in
> the SCA-Test project that was being loaded for system components.   
> So added
> it there and it did get picked up.  Is this right?  There is  
> something that
> I am missing here.. where should I be adding this component actually.

I would suggest adding it to the SCDL in the <binding.rmi> extension  
- this would only be activated if the RMI binding extension was active.

> - I have added 'Module' scope for the RMIHostImpl and have the  
> eager init
> decoration as well.
>
> - I have added the autowire annotations to the constructor of the
> RMIBindingBuilder.
>
> When I run, the RMIHostImpl is picked up and injected into the  
> builder.  But
> then I have having some strange exceptions in the DirectoryScanner  
> and in
> the creation of the target invoker. I shall work to get over this  
> and see if
> I can post a patch tonight.

What exceptions (can't help if we don't know :-) )?
--
Jeremy

---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


Re: [jira] Updated: (TUSCANY-611) RMI Binding

Posted by Venkata Krishnan <fo...@gmail.com>.
Hi Jim / Jeremy,

I have been able to go forward quite a bit.

- Which is the scdl into which I must add the RMIHost component.  I added it
first to the system.scdl in SCA-API project.  But that did not get picked up
by the loader.  When I debugged I figured out that it was the system.scdl in
the SCA-Test project that was being loaded for system components.  So added
it there and it did get picked up.  Is this right?  There is something that
I am missing here.. where should I be adding this component actually.

- I have added 'Module' scope for the RMIHostImpl and have the eager init
decoration as well.

- I have added the autowire annotations to the constructor of the
RMIBindingBuilder.

When I run, the RMIHostImpl is picked up and injected into the builder.  But
then I have having some strange exceptions in the DirectoryScanner and in
the creation of the target invoker. I shall work to get over this and see if
I can post a patch tonight.

Thanks

- Venkat





On 8/14/06, Jim Marino <jm...@myromatours.com> wrote:
>
>
> On Aug 13, 2006, at 11:00 PM, Jeremy Boynes wrote:
>
> > On Aug 13, 2006, at 10:42 PM, Venkata Krishnan wrote:
> >>  - each registry is identified by a port on which it runs.  I am
> >> not sure
> >> how hostname can be used for services.  However, for references
> >> host names
> >> has a role to play.  Right?
> >
> > For services it would determine the address that the port would
> > apply to. The default (0.0.0.0) would be all addresses on the
> > machine but for multi-homed machines it is quite often useful to be
> > able to specify a particular interface.
> >
> >>  - RMI Host will be the interface thro which RMIBinding will register
> >> services into one of the registries (based on the port number
> >> specified)
> >>
> >> Can you please point me to some code that I can emulate to
> >> implement RMI
> >> Host in terms of how it should be implemented as a system
> >> component that can
> >> be autowired into the builder.  Right now I am looking at
> >> LoaderRegistry to
> >> understand the programming model for this.  Am I on track?
> >
> > That's as good as any.
> If you start with a POJO and just decorate it according its methods
> with @Init and/or @Destroy as needed you should have most of it. I'll
> keep an eye out and help when needed.
>
> Jim
>
> > --
> > Jeremy
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> > For additional commands, e-mail: tuscany-dev-help@ws.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>
>

Re: [jira] Updated: (TUSCANY-611) RMI Binding

Posted by Jim Marino <jm...@myromatours.com>.
On Aug 13, 2006, at 11:00 PM, Jeremy Boynes wrote:

> On Aug 13, 2006, at 10:42 PM, Venkata Krishnan wrote:
>>  - each registry is identified by a port on which it runs.  I am  
>> not sure
>> how hostname can be used for services.  However, for references  
>> host names
>> has a role to play.  Right?
>
> For services it would determine the address that the port would  
> apply to. The default (0.0.0.0) would be all addresses on the  
> machine but for multi-homed machines it is quite often useful to be  
> able to specify a particular interface.
>
>>  - RMI Host will be the interface thro which RMIBinding will register
>> services into one of the registries (based on the port number  
>> specified)
>>
>> Can you please point me to some code that I can emulate to  
>> implement RMI
>> Host in terms of how it should be implemented as a system  
>> component that can
>> be autowired into the builder.  Right now I am looking at  
>> LoaderRegistry to
>> understand the programming model for this.  Am I on track?
>
> That's as good as any.
If you start with a POJO and just decorate it according its methods  
with @Init and/or @Destroy as needed you should have most of it. I'll  
keep an eye out and help when needed.

Jim

> --
> Jeremy
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


Re: [jira] Updated: (TUSCANY-611) RMI Binding

Posted by Jeremy Boynes <jb...@apache.org>.
On Aug 13, 2006, at 10:42 PM, Venkata Krishnan wrote:
>  - each registry is identified by a port on which it runs.  I am  
> not sure
> how hostname can be used for services.  However, for references  
> host names
> has a role to play.  Right?

For services it would determine the address that the port would apply  
to. The default (0.0.0.0) would be all addresses on the machine but  
for multi-homed machines it is quite often useful to be able to  
specify a particular interface.

>  - RMI Host will be the interface thro which RMIBinding will register
> services into one of the registries (based on the port number  
> specified)
>
> Can you please point me to some code that I can emulate to  
> implement RMI
> Host in terms of how it should be implemented as a system component  
> that can
> be autowired into the builder.  Right now I am looking at  
> LoaderRegistry to
> understand the programming model for this.  Am I on track?

That's as good as any.
--
Jeremy

---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


Re: [jira] Updated: (TUSCANY-611) RMI Binding

Posted by Venkata Krishnan <fo...@gmail.com>.
Hi Jeremy / Jim,

Thanks for continuing to guide me on this :-)

- Jim, the concern you raised about the business interface not inheriting
from Remote and the need to do some sort of mediation has been a primary
concern to me since M1.  I have been able to get that working now.  Now
there is no requirement that interfaces inherit from Remote.
- With respect to the system component implementation of RMI Host, I might
need help in implementing this.  Right now I understand the following: -
  - that an RMIHost will cache RMI Registries (like the LoaderRegistry
caches the Loaders)
  - each registry is identified by a port on which it runs.  I am not sure
how hostname can be used for services.  However, for references host names
has a role to play.  Right?
  - RMI Host will be the interface thro which RMIBinding will register
services into one of the registries (based on the port number specified)

Can you please point me to some code that I can emulate to implement RMI
Host in terms of how it should be implemented as a system component that can
be autowired into the builder.  Right now I am looking at LoaderRegistry to
understand the programming model for this.  Am I on track?

Thanks

- Venkat



On 8/12/06, Jeremy Boynes <jb...@apache.org> wrote:
>
> On Aug 11, 2006, at 6:29 PM, Jim Marino wrote:
> >>> Forgot about the host. If we want to have one component per
> >>> registry, what happens when two services register at the same
> >>> host/port combination?
> >>
> >> If two registries register, the second should fail (as it won't be
> >> able to get the socket anyway).
> >>
> > Right so that's why I was thinking it would be better to allow for
> > multiple components per registry. Do you think that's not something
> > that really is a problem?
> >
>
> An RMI registry can support multiple services, see next statement.
>
> >> Services will have a uri whose path will distinguish them.
>
> RMI services have a URI path that they use to register with the
> registry so that it can contain multiple ones - like a servlet
> context is used to allow multiple webapps on the same socket.
>
> RHIHost        = Web container (ServletHost)
> RMIRegistry    = HTTP listener
> Remote Service = Servlet
>
> RMIRegistry instances are components deployed to the system that
> listen on sockets and dispatch requests to registered services based
> on URI path.
>
> --
> Jeremy
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>
>

Re: [jira] Updated: (TUSCANY-611) RMI Binding

Posted by Jeremy Boynes <jb...@apache.org>.
On Aug 11, 2006, at 6:29 PM, Jim Marino wrote:
>>> Forgot about the host. If we want to have one component per  
>>> registry, what happens when two services register at the same  
>>> host/port combination?
>>
>> If two registries register, the second should fail (as it won't be  
>> able to get the socket anyway).
>>
> Right so that's why I was thinking it would be better to allow for  
> multiple components per registry. Do you think that's not something  
> that really is a problem?
>

An RMI registry can support multiple services, see next statement.

>> Services will have a uri whose path will distinguish them.

RMI services have a URI path that they use to register with the  
registry so that it can contain multiple ones - like a servlet  
context is used to allow multiple webapps on the same socket.

RHIHost        = Web container (ServletHost)
RMIRegistry    = HTTP listener
Remote Service = Servlet

RMIRegistry instances are components deployed to the system that  
listen on sockets and dispatch requests to registered services based  
on URI path.

--
Jeremy


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


Re: [jira] Updated: (TUSCANY-611) RMI Binding

Posted by Jim Marino <jm...@myromatours.com>.
On Aug 11, 2006, at 2:32 PM, Jeremy Boynes wrote:

> On Aug 11, 2006, at 2:25 PM, Jim Marino wrote:
>
>>
>> On Aug 11, 2006, at 1:59 PM, Jeremy Boynes wrote:
>>
>>> On Aug 11, 2006, at 1:49 PM, Jim Marino wrote:
>>>> On Aug 10, 2006, at 10:53 PM, Venkata Krishnan wrote:
>>>>>
>>>>> My imagination of the Registry is that it is lightweight and it  
>>>>> should be ok
>>>>> to host several instances of it on a host, ofcourse each on a  
>>>>> different
>>>>> port. Hence we might actually allow the assemblies to mention  
>>>>> which port
>>>>> number is preferred to host the RMI Service.
>>>> I think this could be accomplished with one system service. The  
>>>> RMIHost API could have overloaded versions of register(), one  
>>>> that takes an explicit port and one that uses a default. If an  
>>>> explicit port is passed, the RMIHost would look for a cached  
>>>> Registry, creating one if needed.
>>>
>>> I think one component per registry would be easier to manage.
>>>
>>> Each registry would register with the RMIHost by socket address;  
>>> service instances would register with the RMIHost which would  
>>> delegate to the appropriate registry based on the endpoint address.
>>>
>>> Specifying just port number in the assembly is not enough - you  
>>> need to be able to specify host/port combinations.
>>>
>> Forgot about the host. If we want to have one component per  
>> registry, what happens when two services register at the same host/ 
>> port combination?
>
> If two registries register, the second should fail (as it won't be  
> able to get the socket anyway).
>
Right so that's why I was thinking it would be better to allow for  
multiple components per registry. Do you think that's not something  
that really is a problem?

> Services will have a uri whose path will distinguish them.
>
> --
> Jeremy
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


Re: [jira] Updated: (TUSCANY-611) RMI Binding

Posted by Jeremy Boynes <jb...@apache.org>.
On Aug 11, 2006, at 2:25 PM, Jim Marino wrote:

>
> On Aug 11, 2006, at 1:59 PM, Jeremy Boynes wrote:
>
>> On Aug 11, 2006, at 1:49 PM, Jim Marino wrote:
>>> On Aug 10, 2006, at 10:53 PM, Venkata Krishnan wrote:
>>>>
>>>> My imagination of the Registry is that it is lightweight and it  
>>>> should be ok
>>>> to host several instances of it on a host, ofcourse each on a  
>>>> different
>>>> port. Hence we might actually allow the assemblies to mention  
>>>> which port
>>>> number is preferred to host the RMI Service.
>>> I think this could be accomplished with one system service. The  
>>> RMIHost API could have overloaded versions of register(), one  
>>> that takes an explicit port and one that uses a default. If an  
>>> explicit port is passed, the RMIHost would look for a cached  
>>> Registry, creating one if needed.
>>
>> I think one component per registry would be easier to manage.
>>
>> Each registry would register with the RMIHost by socket address;  
>> service instances would register with the RMIHost which would  
>> delegate to the appropriate registry based on the endpoint address.
>>
>> Specifying just port number in the assembly is not enough - you  
>> need to be able to specify host/port combinations.
>>
> Forgot about the host. If we want to have one component per  
> registry, what happens when two services register at the same host/ 
> port combination?

If two registries register, the second should fail (as it won't be  
able to get the socket anyway).

Services will have a uri whose path will distinguish them.

--
Jeremy


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


Re: [jira] Updated: (TUSCANY-611) RMI Binding

Posted by Jim Marino <jm...@myromatours.com>.
On Aug 11, 2006, at 1:59 PM, Jeremy Boynes wrote:

> On Aug 11, 2006, at 1:49 PM, Jim Marino wrote:
>> On Aug 10, 2006, at 10:53 PM, Venkata Krishnan wrote:
>>>
>>> My imagination of the Registry is that it is lightweight and it  
>>> should be ok
>>> to host several instances of it on a host, ofcourse each on a  
>>> different
>>> port. Hence we might actually allow the assemblies to mention  
>>> which port
>>> number is preferred to host the RMI Service.
>> I think this could be accomplished with one system service. The  
>> RMIHost API could have overloaded versions of register(), one that  
>> takes an explicit port and one that uses a default. If an explicit  
>> port is passed, the RMIHost would look for a cached Registry,  
>> creating one if needed.
>
> I think one component per registry would be easier to manage.
>
> Each registry would register with the RMIHost by socket address;  
> service instances would register with the RMIHost which would  
> delegate to the appropriate registry based on the endpoint address.
>
> Specifying just port number in the assembly is not enough - you  
> need to be able to specify host/port combinations.
>
Forgot about the host. If we want to have one component per registry,  
what happens when two services register at the same host/port  
combination?

> --
> Jeremy
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


Re: [jira] Updated: (TUSCANY-611) RMI Binding

Posted by Jeremy Boynes <jb...@apache.org>.
On Aug 11, 2006, at 1:49 PM, Jim Marino wrote:
> On Aug 10, 2006, at 10:53 PM, Venkata Krishnan wrote:
>>
>> My imagination of the Registry is that it is lightweight and it  
>> should be ok
>> to host several instances of it on a host, ofcourse each on a  
>> different
>> port. Hence we might actually allow the assemblies to mention  
>> which port
>> number is preferred to host the RMI Service.
> I think this could be accomplished with one system service. The  
> RMIHost API could have overloaded versions of register(), one that  
> takes an explicit port and one that uses a default. If an explicit  
> port is passed, the RMIHost would look for a cached Registry,  
> creating one if needed.

I think one component per registry would be easier to manage.

Each registry would register with the RMIHost by socket address;  
service instances would register with the RMIHost which would  
delegate to the appropriate registry based on the endpoint address.

Specifying just port number in the assembly is not enough - you need  
to be able to specify host/port combinations.

--
Jeremy

---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


Re: [jira] Updated: (TUSCANY-611) RMI Binding

Posted by Jim Marino <jm...@myromatours.com>.
On Aug 10, 2006, at 10:53 PM, Venkata Krishnan wrote:

> Thanks Ant and Jim.
>
> Ant, I shall certainly work on the formatting and a couple of other  
> issues
> and posted an updated patch asap.
>
> Jim, you point was something that I did vacillate about.  I was  
> wondering if
> the registry should be started by the binding or should it be done  
> offline.
>
My inclination is to start the registry in a system service. One way  
to do this is to create a system POJO implementing something like  
RMIHost with an @Init method and set to eager init and you can also  
have a destroy method to do any shutdown. I'd then have the builder  
take an autowire to the system service which would pass it to the  
service. When Service.stop() is called, the service would perform an  
unbind by using RMIHost.unbind() or something similar.
>
> My imagination of the Registry is that it is lightweight and it  
> should be ok
> to host several instances of it on a host, ofcourse each on a  
> different
> port. Hence we might actually allow the assemblies to mention which  
> port
> number is preferred to host the RMI Service.
I think this could be accomplished with one system service. The  
RMIHost API could have overloaded versions of register(), one that  
takes an explicit port and one that uses a default. If an explicit  
port is passed, the RMIHost would look for a cached Registry,  
creating one if needed.

> If a registry for the port
> already exists then we simply use that otherwise start one.  So if is
> possible that a registry on a port will host more than one service.
>
> It is also a good idea that we clearly have one registry per host and
> implement it the way you have mentioned out here.  I am open to do  
> this as
> well.  Let me know your final thoughts on this.
>
One other thing is I think it is important for the business interface  
of the Reference (and probably the Service) not to have to extend  
Remote since the binding could be changed (I think you may have  
brought this up before). In this case, the binding should perform a  
mediation during the invoke.  What do you think?
> Jerermy and others what are your thoughts on this?
>
> Thanks
>
> - Venkat
>
>
>
> On 8/11/06, Jim Marino <jm...@myromatours.com> wrote:
>>
>> Thanks Venkat. Just a quick question: do you think it is best to have
>> one Registry per service or could we have one Registry per runtime
>> instance and have services register with that? If you think the
>> latter may be something that works better, one thing that could be
>> done is to create a separate system component that instantiates the
>> registry. This system component would be like ServletHost (RMIHost?)
>> and could be autowired to the builder which could then pass it to the
>> service implementation which would in turn perform the bind  
>> operation.
>>
>> Jim
>>
>>
>> On Aug 10, 2006, at 12:30 PM, ant elder wrote:
>>
>> > Hi Venkat, I've committed this patch now. Had some problems getting
>> > the
>> > patch to apply cleanly so  had to fiddle about a bit, could you
>> > check it
>> > looks ok to you? The code needs formatting so maybe you could  
>> send in
>> > another patch doing that? I've also not added the service and
>> > reference
>> > samples to the main samples pom.xml yet. As you've pointed out the
>> > testcases
>> > for them only work in eclipse so we'll need to figure out what to
>> > do about
>> > that.
>> >
>> > Looks great, really good to have a real binding working at last.
>> >
>> >   ...ant
>> >
>> > On 8/10/06, Venkatakrishnan (JIRA) < tuscany-dev@ws.apache.org>  
>> wrote:
>> >>
>> >>      [ http://issues.apache.org/jira/browse/TUSCANY-611?page=all ]
>> >>
>> >> Venkatakrishnan updated TUSCANY-611:
>> >> ------------------------------------
>> >>
>> >>     Attachment: Tuscany-RMI-Binding-Aug-10-Updated.diff
>> >>
>> >> Hi... there is one addition that has been missed out in the prev.
>> >> patch.  My sincere apologies for that goof-up.... here is the  
>> updated
>> >> patch.  Thanks.
>> >>
>> >> > RMI Binding
>> >> > -----------
>> >> >
>> >> >                 Key: TUSCANY-611
>> >> >                 URL: http://issues.apache.org/jira/browse/
>> >> TUSCANY-611
>> >> >             Project: Tuscany
>> >> >          Issue Type: Bug
>> >> >            Reporter: Venkatakrishnan
>> >> >         Assigned To: ant elder
>> >> >         Attachments: Tuscany-RMI-Binding-Aug-10-Updated.diff ,
>> >> Tuscany-RMI-Binding-Aug-10.diff,
>> >> Tuscany-RMI-Binding-Reference-Sample-Aug-10.diff ,
>> >> Tuscany-RMI-Binding-Service-Sample-Aug-10.diff
>> >> >
>> >> >
>> >> > SCA RMI Binding with samples for SCA Reference and SCA Service
>> >> using RMI
>> >> Binding.
>> >> > Here is a first cut implementation for this.  Could somebody  
>> please
>> >> review and apply?  Also I have had the following issues un-
>> >> resolved: -
>> >> > - The samples can be tested thro the Testcases in them.  These
>> >> testcases
>> >> work from eclipse as long as I have added the RMI-Binding Eclipse
>> >> project to
>> >> the classpath.  Otherwise the binding does get picked up.  The
>> >> same is the
>> >> issue when trying to execute the testcases from maven.  Could
>> >> somebody
>> >> please help in fixing this?  Thanks.
>> >> > Note :-
>> >> > --------
>> >> > I shall be working further with this binding to address the
>> >> following :
>> >> -
>> >> > - there is single attribute called 'uri' for the binding.  I
>> >> shall be
>> >> splitting this to host, port and service name with defaults to
>> >> each when not
>> >> specified.
>> >> > - it is now required the that SCA Service require a component to
>> >> implement the interface Remote.  I imagine this to be intrusive.
>> >> All that a
>> >> developer should do is pick up an existing component with a 'non
>> >> remote'
>> >> interface and simply deploy it exposing the service as RMI.  The
>> >> binding
>> >> should dynamically be able to generate a remote interface and a
>> >> proxy and
>> >> host it as a facade to this implementation.
>> >> > -  will be glad to take forward any other inputs from the
>> >> community as
>> >> well.
>> >> > Thanks
>> >> > - Venkat
>> >>
>> >> --
>> >> This message is automatically generated by JIRA.
>> >> -
>> >> If you think it was sent incorrectly contact one of the
>> >> administrators:
>> >> http://issues.apache.org/jira/secure/Administrators.jspa
>> >> -
>> >> For more information on JIRA, see: http://www.atlassian.com/
>> >> software/jira
>> >>
>> >>
>> >>
>> >>  
>> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
>> >> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>> >>
>> >>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
>> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>>
>>


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


Re: [jira] Updated: (TUSCANY-611) RMI Binding

Posted by Venkata Krishnan <fo...@gmail.com>.
Thanks Ant and Jim.

Ant, I shall certainly work on the formatting and a couple of other issues
and posted an updated patch asap.

Jim, you point was something that I did vacillate about.  I was wondering if
the registry should be started by the binding or should it be done offline.


My imagination of the Registry is that it is lightweight and it should be ok
to host several instances of it on a host, ofcourse each on a different
port. Hence we might actually allow the assemblies to mention which port
number is preferred to host the RMI Service.  If a registry for the port
already exists then we simply use that otherwise start one.  So if is
possible that a registry on a port will host more than one service.

It is also a good idea that we clearly have one registry per host and
implement it the way you have mentioned out here.  I am open to do this as
well.  Let me know your final thoughts on this.

Jerermy and others what are your thoughts on this?

Thanks

- Venkat



On 8/11/06, Jim Marino <jm...@myromatours.com> wrote:
>
> Thanks Venkat. Just a quick question: do you think it is best to have
> one Registry per service or could we have one Registry per runtime
> instance and have services register with that? If you think the
> latter may be something that works better, one thing that could be
> done is to create a separate system component that instantiates the
> registry. This system component would be like ServletHost (RMIHost?)
> and could be autowired to the builder which could then pass it to the
> service implementation which would in turn perform the bind operation.
>
> Jim
>
>
> On Aug 10, 2006, at 12:30 PM, ant elder wrote:
>
> > Hi Venkat, I've committed this patch now. Had some problems getting
> > the
> > patch to apply cleanly so  had to fiddle about a bit, could you
> > check it
> > looks ok to you? The code needs formatting so maybe you could send in
> > another patch doing that? I've also not added the service and
> > reference
> > samples to the main samples pom.xml yet. As you've pointed out the
> > testcases
> > for them only work in eclipse so we'll need to figure out what to
> > do about
> > that.
> >
> > Looks great, really good to have a real binding working at last.
> >
> >   ...ant
> >
> > On 8/10/06, Venkatakrishnan (JIRA) < tuscany-dev@ws.apache.org> wrote:
> >>
> >>      [ http://issues.apache.org/jira/browse/TUSCANY-611?page=all ]
> >>
> >> Venkatakrishnan updated TUSCANY-611:
> >> ------------------------------------
> >>
> >>     Attachment: Tuscany-RMI-Binding-Aug-10-Updated.diff
> >>
> >> Hi... there is one addition that has been missed out in the prev.
> >> patch.  My sincere apologies for that goof-up.... here is the updated
> >> patch.  Thanks.
> >>
> >> > RMI Binding
> >> > -----------
> >> >
> >> >                 Key: TUSCANY-611
> >> >                 URL: http://issues.apache.org/jira/browse/
> >> TUSCANY-611
> >> >             Project: Tuscany
> >> >          Issue Type: Bug
> >> >            Reporter: Venkatakrishnan
> >> >         Assigned To: ant elder
> >> >         Attachments: Tuscany-RMI-Binding-Aug-10-Updated.diff ,
> >> Tuscany-RMI-Binding-Aug-10.diff,
> >> Tuscany-RMI-Binding-Reference-Sample-Aug-10.diff ,
> >> Tuscany-RMI-Binding-Service-Sample-Aug-10.diff
> >> >
> >> >
> >> > SCA RMI Binding with samples for SCA Reference and SCA Service
> >> using RMI
> >> Binding.
> >> > Here is a first cut implementation for this.  Could somebody please
> >> review and apply?  Also I have had the following issues un-
> >> resolved: -
> >> > - The samples can be tested thro the Testcases in them.  These
> >> testcases
> >> work from eclipse as long as I have added the RMI-Binding Eclipse
> >> project to
> >> the classpath.  Otherwise the binding does get picked up.  The
> >> same is the
> >> issue when trying to execute the testcases from maven.  Could
> >> somebody
> >> please help in fixing this?  Thanks.
> >> > Note :-
> >> > --------
> >> > I shall be working further with this binding to address the
> >> following :
> >> -
> >> > - there is single attribute called 'uri' for the binding.  I
> >> shall be
> >> splitting this to host, port and service name with defaults to
> >> each when not
> >> specified.
> >> > - it is now required the that SCA Service require a component to
> >> implement the interface Remote.  I imagine this to be intrusive.
> >> All that a
> >> developer should do is pick up an existing component with a 'non
> >> remote'
> >> interface and simply deploy it exposing the service as RMI.  The
> >> binding
> >> should dynamically be able to generate a remote interface and a
> >> proxy and
> >> host it as a facade to this implementation.
> >> > -  will be glad to take forward any other inputs from the
> >> community as
> >> well.
> >> > Thanks
> >> > - Venkat
> >>
> >> --
> >> This message is automatically generated by JIRA.
> >> -
> >> If you think it was sent incorrectly contact one of the
> >> administrators:
> >> http://issues.apache.org/jira/secure/Administrators.jspa
> >> -
> >> For more information on JIRA, see: http://www.atlassian.com/
> >> software/jira
> >>
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> >> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
> >>
> >>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>
>

Re: [jira] Updated: (TUSCANY-611) RMI Binding

Posted by Jim Marino <jm...@myromatours.com>.
Thanks Venkat. Just a quick question: do you think it is best to have  
one Registry per service or could we have one Registry per runtime  
instance and have services register with that? If you think the  
latter may be something that works better, one thing that could be  
done is to create a separate system component that instantiates the  
registry. This system component would be like ServletHost (RMIHost?)  
and could be autowired to the builder which could then pass it to the  
service implementation which would in turn perform the bind operation.

Jim


On Aug 10, 2006, at 12:30 PM, ant elder wrote:

> Hi Venkat, I've committed this patch now. Had some problems getting  
> the
> patch to apply cleanly so  had to fiddle about a bit, could you  
> check it
> looks ok to you? The code needs formatting so maybe you could send in
> another patch doing that? I've also not added the service and  
> reference
> samples to the main samples pom.xml yet. As you've pointed out the  
> testcases
> for them only work in eclipse so we'll need to figure out what to  
> do about
> that.
>
> Looks great, really good to have a real binding working at last.
>
>   ...ant
>
> On 8/10/06, Venkatakrishnan (JIRA) < tuscany-dev@ws.apache.org> wrote:
>>
>>      [ http://issues.apache.org/jira/browse/TUSCANY-611?page=all ]
>>
>> Venkatakrishnan updated TUSCANY-611:
>> ------------------------------------
>>
>>     Attachment: Tuscany-RMI-Binding-Aug-10-Updated.diff
>>
>> Hi... there is one addition that has been missed out in the prev.
>> patch.  My sincere apologies for that goof-up.... here is the updated
>> patch.  Thanks.
>>
>> > RMI Binding
>> > -----------
>> >
>> >                 Key: TUSCANY-611
>> >                 URL: http://issues.apache.org/jira/browse/ 
>> TUSCANY-611
>> >             Project: Tuscany
>> >          Issue Type: Bug
>> >            Reporter: Venkatakrishnan
>> >         Assigned To: ant elder
>> >         Attachments: Tuscany-RMI-Binding-Aug-10-Updated.diff ,
>> Tuscany-RMI-Binding-Aug-10.diff,
>> Tuscany-RMI-Binding-Reference-Sample-Aug-10.diff,
>> Tuscany-RMI-Binding-Service-Sample-Aug-10.diff
>> >
>> >
>> > SCA RMI Binding with samples for SCA Reference and SCA Service  
>> using RMI
>> Binding.
>> > Here is a first cut implementation for this.  Could somebody please
>> review and apply?  Also I have had the following issues un- 
>> resolved: -
>> > - The samples can be tested thro the Testcases in them.  These  
>> testcases
>> work from eclipse as long as I have added the RMI-Binding Eclipse  
>> project to
>> the classpath.  Otherwise the binding does get picked up.  The  
>> same is the
>> issue when trying to execute the testcases from maven.  Could  
>> somebody
>> please help in fixing this?  Thanks.
>> > Note :-
>> > --------
>> > I shall be working further with this binding to address the  
>> following :
>> -
>> > - there is single attribute called 'uri' for the binding.  I  
>> shall be
>> splitting this to host, port and service name with defaults to  
>> each when not
>> specified.
>> > - it is now required the that SCA Service require a component to
>> implement the interface Remote.  I imagine this to be intrusive.   
>> All that a
>> developer should do is pick up an existing component with a 'non  
>> remote'
>> interface and simply deploy it exposing the service as RMI.  The  
>> binding
>> should dynamically be able to generate a remote interface and a  
>> proxy and
>> host it as a facade to this implementation.
>> > -  will be glad to take forward any other inputs from the  
>> community as
>> well.
>> > Thanks
>> > - Venkat
>>
>> --
>> This message is automatically generated by JIRA.
>> -
>> If you think it was sent incorrectly contact one of the  
>> administrators:
>> http://issues.apache.org/jira/secure/Administrators.jspa
>> -
>> For more information on JIRA, see: http://www.atlassian.com/ 
>> software/jira
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
>> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>>
>>


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


Re: [jira] Updated: (TUSCANY-611) RMI Binding

Posted by ant elder <an...@gmail.com>.
Hi Venkat, I've committed this patch now. Had some problems getting the
patch to apply cleanly so  had to fiddle about a bit, could you check it
looks ok to you? The code needs formatting so maybe you could send in
another patch doing that? I've also not added the service and reference
samples to the main samples pom.xml yet. As you've pointed out the testcases
for them only work in eclipse so we'll need to figure out what to do about
that.

Looks great, really good to have a real binding working at last.

   ...ant

On 8/10/06, Venkatakrishnan (JIRA) < tuscany-dev@ws.apache.org> wrote:
>
>      [ http://issues.apache.org/jira/browse/TUSCANY-611?page=all ]
>
> Venkatakrishnan updated TUSCANY-611:
> ------------------------------------
>
>     Attachment: Tuscany-RMI-Binding-Aug-10-Updated.diff
>
> Hi... there is one addition that has been missed out in the prev.
> patch.  My sincere apologies for that goof-up.... here is the updated
> patch.  Thanks.
>
> > RMI Binding
> > -----------
> >
> >                 Key: TUSCANY-611
> >                 URL: http://issues.apache.org/jira/browse/TUSCANY-611
> >             Project: Tuscany
> >          Issue Type: Bug
> >            Reporter: Venkatakrishnan
> >         Assigned To: ant elder
> >         Attachments: Tuscany-RMI-Binding-Aug-10-Updated.diff ,
> Tuscany-RMI-Binding-Aug-10.diff,
> Tuscany-RMI-Binding-Reference-Sample-Aug-10.diff,
> Tuscany-RMI-Binding-Service-Sample-Aug-10.diff
> >
> >
> > SCA RMI Binding with samples for SCA Reference and SCA Service using RMI
> Binding.
> > Here is a first cut implementation for this.  Could somebody please
> review and apply?  Also I have had the following issues un-resolved: -
> > - The samples can be tested thro the Testcases in them.  These testcases
> work from eclipse as long as I have added the RMI-Binding Eclipse project to
> the classpath.  Otherwise the binding does get picked up.  The same is the
> issue when trying to execute the testcases from maven.  Could somebody
> please help in fixing this?  Thanks.
> > Note :-
> > --------
> > I shall be working further with this binding to address the following :
> -
> > - there is single attribute called 'uri' for the binding.  I shall be
> splitting this to host, port and service name with defaults to each when not
> specified.
> > - it is now required the that SCA Service require a component to
> implement the interface Remote.  I imagine this to be intrusive.  All that a
> developer should do is pick up an existing component with a 'non remote'
> interface and simply deploy it exposing the service as RMI.  The binding
> should dynamically be able to generate a remote interface and a proxy and
> host it as a facade to this implementation.
> > -  will be glad to take forward any other inputs from the community as
> well.
> > Thanks
> > - Venkat
>
> --
> This message is automatically generated by JIRA.
> -
> If you think it was sent incorrectly contact one of the administrators:
> http://issues.apache.org/jira/secure/Administrators.jspa
> -
> For more information on JIRA, see: http://www.atlassian.com/software/jira
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>
>