Re: Why, at least, serialization?

Niclas Hedhman <[email protected]> Sun, 21 Jun 2009 22:22:49 +0800
Newsgroups gmane.comp.java.sun.jini
Message-ID <[email protected]>
--0016367f985eff4054046cdc7d6a
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

Not sure if I should at all try to answer this from a phone...

1. The client doesn't need to know where the services are located, and Jini
defines a way via the Discovery and Join protocols (btw, your use of Join
make me think you have not understand the concepts used), even to a point
where you don't need to know where the lookup service is or that the actual
service to run Java.

2. The smart proxy will carry the location information for the client when
registered to the lookup service. The proxy concept is also good as a
mechanism for zthe service author to balance server- and client- side
computations without bothering the client author.

3. Dynamic classloading is an RMI specific and can be used, or not.

4. By using JERI, Jini will also give you additional flexibility and
security options.

Jini's mission is built around the concept of location-independence,
configuration-free and self-healing networked systems.

So, to answer 'serialization'; No it is up to the service and proxy to agree
to any private protocol they like. It can be RMI, or it could be a
home-brewed protocol over UDP, SPX or what not. The service contract is only
between the client and the proxy running in the client.

Cheers
Niclas

On Jun 20, 2009 9:25 PM, "Alex Co" <[email protected]> wrote:

(Sorry if this msg is duplicated. Not sure about the registration on this
forum)

Hi all,
I am learnnig Jini.

I have a question for you that i till now didnt get an answer:
The subject is why serialization for Jini services. Please, read this
thought:

Jini does not mandate the use of rmi as the communication protocol between
client and server, right?
So, for those that do not want to use rmi, the service interface must at
least
implements serializable, right?

Then, on client side, if client needs to use a jini service it downloads
service
classes definitions by http (for example) and the jini service object comes
by
wire by using serialization on server side and deserialization on client
side. Then
the proxy is constructed on the client side by "joining" the downloaded
classes
definitions and the proxy object that arrives to client by deserialization.

My question is: why it is necessary downloaded class definitions and
deserialized proxy object to invoke jini service?

Why not just get the class definitions, instantiate them and call its
methods?
What is the role of the proxy object there?


When using mobile code i understand that the proxy object must travel too in
order to save data and state by for invoke a Jini method are proxy objects
really needed too?

Many thanks

Alex

--------------------------------------------------------------------------
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]

--------------------------------------------------------------------------
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]

--0016367f985eff4054046cdc7d6a
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<p>Not sure if I should at all try to answer this from a phone...</p>
<p>1. The client doesn&#39;t need to know where the services are located, a=
nd Jini defines a way via the Discovery and Join protocols (btw, your use o=
f Join make me think you have not understand the concepts used), even to a =
point where you don&#39;t need to know where the lookup service is or that =
the actual service to run Java.</p>

<p>2. The smart proxy will carry the location information for the client wh=
en registered to the lookup service. The proxy concept is also good as a me=
chanism for zthe service author to balance server- and client- side computa=
tions without bothering the client author.</p>

<p>3. Dynamic classloading is an RMI specific and can be used, or not.</p>
<p>4. By using JERI, Jini will also give you additional flexibility and sec=
urity options.</p>
<p>Jini&#39;s mission is built around the concept of location-independence,=
 configuration-free and self-healing networked systems.</p>
<p>So, to answer &#39;serialization&#39;; No it is up to the service and pr=
oxy to agree to any private protocol they like. It can be RMI, or it could =
be a home-brewed protocol over UDP, SPX or what not. The service contract i=
s only between the client and the proxy running in the client.<br>
</p>
<p>Cheers<br>
Niclas<br>
 </p>
<p><blockquote type=3D"cite">On Jun 20, 2009 9:25 PM, &quot;Alex Co&quot; &=
lt;<a href=3D"mailto:[email protected]">[email protected]</a>&gt; wrote:<br><br=
>(Sorry if this msg is duplicated. Not sure about the registration on this =
forum)<br>

<br>
Hi all,<br>
I am learnnig Jini.<br>
<br>
I have a question for you that i till now didnt get an answer:<br>
The subject is why serialization for Jini services. Please, read this thoug=
ht:<br>
<br>
Jini does not mandate the use of rmi as the communication protocol between<=
br>
client and server, right?<br>
So, for those that do not want to use rmi, the service interface must at le=
ast<br>
implements serializable, right?<br>
<br>
Then, on client side, if client needs to use a jini service it downloads se=
rvice<br>
classes definitions by http (for example) and the jini service object comes=
 by<br>
wire by using serialization on server side and deserialization on client si=
de. Then<br>
the proxy is constructed on the client side by &quot;joining&quot; the down=
loaded classes<br>
definitions and the proxy object that arrives to client by deserialization.=
<br>
<br>
My question is: why it is necessary downloaded class definitions and<br>
deserialized proxy object to invoke jini service?<br>
<br>
Why not just get the class definitions, instantiate them and call its metho=
ds?<br>
What is the role of the proxy object there?<br>
<br>
<br>
When using mobile code i understand that the proxy object must travel too i=
n<br>
order to save data and state by for invoke a Jini method are proxy objects<=
br>
really needed too?<br>
<br>
Many thanks<br>
<br>
Alex<br>
<br>
--------------------------------------------------------------------------<=
br>
Getting Started: =A0 =A0 <a href=3D"http://www.jini.org/wiki/Category:Getti=
ng_Started" target=3D"_blank">http://www.jini.org/wiki/Category:Getting_Sta=
rted</a><br>
Community Web Site: =A0<a href=3D"http://jini.org" target=3D"_blank">http:/=
/jini.org</a><br>
jini-users Archive: =A0<a href=3D"http://archives.java.sun.com/archives/jin=
i-users.html" target=3D"_blank">http://archives.java.sun.com/archives/jini-=
users.html</a><br>
Unsubscribing: =A0 =A0 =A0 email &quot;signoff JINI-USERS&quot; =A0to <a hr=
ef=3D"mailto:[email protected]">[email protected]</a><br>
</blockquote></p>
--------------------------------------------------------------------------
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]

--0016367f985eff4054046cdc7d6a--