Passionate Development From Journeyman to Master


Ok, so for this assignment, I need to write a Peer to Peer (P2P) application using Java, the example from the book is using JINI and RMI, I have no clue whatsoever about this two technologies.
So JINI is for resource discovery over network and it can use different backend, with one of them being RMI. Still don’t get it, and I can’t run the program.. argh! @@
PS: First try of using Scott’s wasn’t sucessful. But I like the idea of blogging from commandline tho. will give it a try again later.
Update: OK, so LookupBroswer in JINI works now, apparently I have to specify a non existent directory for Reggie for log files.nnBuilding a Peer to Peer (P2P) application using Java. nAssignment specifications can be found here.
JINI discovery of services can be of the method of Unicast (when the host address is known) or Multicast (when the host address is not known). Multicast method listens to the broadcast message from lookup services.
ing the discovery service (JINI client) requires me to specify the security policy level “java unicastdiscovery”, where policy.all is the file name that contains the security policy. I don’t actually understand this bit, deitel doesn’t dwell on this security bit, and policy file that they give is actually dodgy :) this what it is:n// policy.alln// grant AllPermission to all code (DANGEROUS!)ngrant {n permission “”, ““;n};nuhm, shouldn’t they teach us how to create a policy which is not dangerous instead??
So a JINI application would consists of: n1. RMI Object or servicen2. Lookup service, of which the no 1 above can register its service.n3. Clients which will contact the lookup service in requesting a service.nIs my understanding correct?
Articles that would help in understanding all the buzz about JINI:nJavaworld article on implementing JINI-like lookup service for RMI
Assignment 3n30/05 - Trying to compile and make the simple Messenger service using JINI as provided by Deitel book.nSo far my understanding of the Messenger is:n- Service part, IMServiceImpl is the implementation of IMService interface and it’s responsible for providing a co
ection between to clients, I’m bit confused with the core method co
ect which takes IMPeer sender as input and output IMPeer. I AM NOT SURE WHAT THIS DOES. It implements UnicastRemoteObject. n- Client Part, appropiately called Peer by Deitel, but I am more comfortable with the term client, peer to peer is essentially (for me) having client acts as server as well. IMPeerListener is for handling the GUI part of the client, I renamed it to IMClientGUI, it will be called in IMPeerImpl(.displayMethod()) to.. well display the GUI.
Problem so far:n- 4/6/2005: I’m stuck with the error message: stub file can’t be found.. I am giving up.. sigh. Chapter 22 example (the seminar) i managed to make it works, but this chapter 28 example, I du
o.. I guess now I will just start code without being able to test whether it’s working or not.. sigh sigh sigh.nThere is a link that explains why this error occurs:nTroubleshooting Jini Applications