Re: Using ServiceStarter to launch a "proxy is service" service

Dan Creswell <[email protected]>
Newsgroups gmane.comp.java.sun.jini
Message-ID <[email protected]>
Gregg Wonderly wrote:
> Francisco Dário Mourão wrote:
>> So, I want my application to have a parameter in each client saying
>> "how" it will use the service:
>>  (a) using it remotely through a proxy (RMI proxy model)
>>  (b) using it locally ("proxy is service" model)
>>
>> Basically, I want to write a service which is prepared to be used with
>> both models...
>>
>> Is this thought valid? Is there an easy way to do this?
>
> For me, this should be a configuration issue.  There is one predominate
> issue
> with service lookup which makes it difficult to do this.  The issue is that
> service discovery through multicast has no avenue for injecting different
> LookupDiscovery or for unicast LookupLocatorDiscovery implementations,
> short of
> very specific Configuration design.  If you really have the need, then I
> think
> it can be done, just thinking about it.
>
> There would be multiple places where you'd create some static Hashtables
> that
> would be inside of classes that would need to be loaded from the same
> classloader.
>

I'm not sure this is necessary......or even appropriate?  Here's what
I'm thinking:

If we want services co-located such that they avoid RMI overhead
(although I'd like to see a benchmark to prove we really need to do
this) then the only real option I can think of is for all these services
to run inside of one JVM and use Bob's experimental endpoints.

[ Even if you choose not to use those experimental endpoints, if all
these services aren't located within a single JVM you'll need to use
some nasty inter-process comms between JVM's to make it work, bleuch. ]

Multicast/lookup locators would then discover as usual albeit that you
wouldn't want remote users finding these strictly local services.
Unless you want to aggregate endpoints (also in Bobs experimental
endpoints package) with one in-memory and one TCP.

Thoughts?

Dan.

--------------------------------------------------------------------------
Getting Started:     http://www.jini.org/wiki/Category:Getting_Started
Community Web Site:  http://jini.org
jini-users Archive:  http://archives.java.sun.com/archives/jini-users.html
Unsubscribing:       email "signoff JINI-USERS"  to [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.