Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Reliable Object Transfer System  RSS feed

 
John Smith
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
""I have to design a system (to be implemented using a Distributed Object Technology such as Java RMI) which provides reliable exactly-once transfer of objects between client applications running on separate machines. Client programs should be able to upload arbitrary objects to servers able to store them. Other client programs should be able to retrieve these uploaded objects. You are required to design the components which these client programs will use to effect object transfer.""
I was wondering if the above means "Objects" or "Instances of an Object". Which one of the following points (1 or 2) is applicable::
1. We have a "Person" object with attributes Name, Age and Address. We have another object Dog with attributes Name, Owner etc. Should the client be able to upload random "objects" like Dog, Person, Cat etc to the server?
2. The other scenario is that there is one Object like Person (common to Server and Client i.e. class files exist on both sides) and only different instances of this person is uploaded and downloaded from the server. i.e. John is an Instance of Person, Alexander is another instance. Thus, the client uploads John which in turn is stored in the database along with the other attributes. Another client uploads Alexander, his age and address.
I have asked the above as I can imagine that if an "Instance of the Object" needs to be transferred between the server and the client, then the ".class" file should be present on both the client and the server side. Incase point 1 is true, then the Objects .class file needs to be tranferred between server and client using TCP Sockets (and not by RMI).

Any help would be appreciated.
 
Michael Ernest
High Plains Drifter
Sheriff
Posts: 7292
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"The_Renegade" --
Please review JavaRanch's naming policy and change your screen name accordingly.
Thank you,
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sounds like a job for JavaSpaces or Java Message Service to me - they use RMI and add capabilities for management, assured delivery, etc.
Most people use "Objects" as short for "instances of Objects." You will not be able to transfer ARBITRARY objects, they must be serializable for any of this to work.
JavaSpaces is a little hard to set up but has the cool capability of retrieving objects based on their contents, whereas JSM just moves messages that may contain objects.
Bill
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!