The Artima Developer Community
Sponsored Link

Jini Forum
What contains the announcement packet sent by a service ?

1 reply on 1 page. Most recent reply: Mar 14, 2002 10:16 AM by Bill Venners

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
Bruno Baguette

Posts: 3
Nickname: bouchon
Registered: Mar, 2002

What contains the announcement packet sent by a service ? Posted: Mar 5, 2002 10:04 AM
Reply to this message Reply
Advertisement
Hello,

I'm doing a end-of-studies internship and i have to learn Jini.

After having read the third page of the Artima article titled "Jiniology" (http://www.artima.com/jini/jiniology/intro3.html ), i've some questions to ask in order to have some more knowledge about Jini.

In this part of the text :

As soon as you connect the drive to the network, it broadcasts a presence announcement by dropping a multicast packet onto a well-known port.The presence announcement contains an IP address and port number where the disk drive can be contacted by a lookup service. Lookup services monitor the well-known port for presence announcement packets.

When a lookup service receives a presence announcement, it opens and analyse the packet. The packet contains information that enables the lookup service to determine whether or not it should contact the sender of the packet. If so, it contacts the sender directly by making a TCP connection to the IP address and port number extracted from the packet.


So my questions about this text are theses ones :

1) Are the IP address and the port number the only informations contained inside the presence announcement packet ?

2) What is a multicast ? Do the service send that packet to all IP addresses ? I don't think so... How can the service determine to what IP address to send that presence announcement packet ?

3) What can do the lookup service to determine that he dont have to contact the sender of the presence announcement packet ?

4) Is it possible to have several lookup services at the same time ? What are the purposes of having several lookup services at the same time ?

Thanks a lot in advance for your replies !


Bill Venners

Posts: 2284
Nickname: bv
Registered: Jan, 2002

Re: What contains the announcement packet sent by a service ? Posted: Mar 14, 2002 10:16 AM
Reply to this message Reply
> 1) Are the IP address and the port number the
> only informations contained inside the presence
> announcement packet ?
>
The presence announcement from discovering entities contains:

* Groups the device wants to join
* IP address and port number where device can be contacted
* Lookup services it has already heard back from

> 2) What is a multicast ? Do the service send
> that packet to all IP addresses ? I don't think so...
> How can the service determine to what IP address to
> send that presence announcement packet ?
>
Multicast uses "class D" IP addresses: 224.0.0.1 to 239.255.255.255. Receivers "subscribe" to the multicast group (IP address). Anyone can send to the group (not just subscribers). All subscribers are eligible to receive the packet. So the discovering entity just writes to a well-known IP multicast IP address, and lookup services listen to that IP address.

> 3) What can do the lookup service to determine
> that he dont have to contact the sender of the
> presence announcement packet ?
>
If a lookup service doesn't register any of the groups listed in a presence announcement, it doesn't contact the announcer. Likewise, if the lookup service is already listed in the announcement as having already been discovered, it doesn't contact the announcer.

> 4) Is it possible to have several lookup
> services at the same time ? What are the purposes of
> having several lookup services at the same time ?
>
Yup. The main idea is for redundancy in case of failure. If one lookup service crashes or becomes disconnected from the network, the others are still there and can keep connecting clients with services.

Flat View: This topic has 1 reply on 1 page
Topic: Jin1 Previous Topic   Next Topic Topic: Codebase problem in Jini

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use