• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Remote client and Data client

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Two questions are confusing me:
1. The remote client code that you write must provide all the public methods of the suncertify.db.Data class.
My understanding is for the local mode, the client will definitely implement all the public methods of suncertify.db.Data. But is this what this remote client refers to?
In network mode, the client will just make the connection with the rmi server and get a server handle and whenever client wants to do something with db on the server side, it just call the server method through the handle. Why should the remote client need to implement all the public methods of Data class? Why should the remote client care since the server already does this for him?
2.
Writing Data Client
To connect with your server, you should create a client program. This implementation should include a class that implements the same public methods as the suncertify.db.Data class, although it will need different constructors to allow it to support the network configuration.
This talks about the same as implementing all the public methods as the Data class. I guess the remote client is probably the same as Data client. But I still don't get it why client needs to implement all the public methods as in Data class in remote mode. I understand the client needs to do that in local mode.
Could somebody have the same kind of questions and somebody else have different thought? Any comments are appreciated!

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My take on this is that the client side application should know very little about the transport layer. In other words they should choose whether to connect locally or remotely but should not "see" any RMI initialization etc. The DataClient should protect them from such intracacies. Other wise the Data interface is just a bunch of delegation.
 
It's never done THAT before. Explain it to me tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic