Remote Client Code
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
"The remote client code that you write must provide all the public methods of the suncertify.db.Data class."
What exactly does this mean? Does it mean that regardless of whether you use RMI or sockets you must have the code for the public interface of Data on both the Client and the Server? I'm probably trying to read too much into this, but what exactly does it mean by provide. They must exist there explicitly or just have ACCESS?
Thanks.
With Respect,
Matt DeLacey
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
As I read the requirement, it meant that there should be 3 discrete pieces of software - a database server, a database client (which must expose all of the public methods of suncertify.db.Data), and a GUI. The last two are then used together to make a single client program. The advantage of this architecture is that only the GUI is specific to the flight reservation schema - you could use the client and server for any flat file database, replacing only the user interface part.
So, yes, the database client should explicitly provide all the public methods of suncertify.db.Data.
Jerry
P.S. Note that they don't say what class or interface has to provide these methods in the client and server, or that the two sides have to use the same class or interface. I took advantage of this...
[This message has been edited by Jerry Pulley (edited January 30, 2001).]
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
With Respect,
Matt
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
I thought when we provide all the public methods of the Data class, all we need to do is to provide the methods, not the signatures, and not the exact implementation.
For example (RMI implementation) in my design:
I have a remote interface that has all public methods of Data.class, my Data.class will implement this.
My DataServer.class simply starts the server.
My client (no the GUI one), has two constructors, one takes the Data.class object for local access, one takes an object of my remote interface.
All the public methods will be provided, but not the exact signatures of the Data.class, and the implementations are simply calls the same methods in the Data class object, or the remote interface.
Any suggestions?
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Swapan.
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Yes, that is exactly the way I did it too. Not sure what I said that was contrary. Sorry for the confusion.
With Regard to DatabaseException.class residing on both the client and the server, I don't really see a way around it.
With Respect,
Matt
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
I agree with you guys on the DatabaseException class. I don't think that having DataInfo and FieldInfo classes are neccessary on the client side. I'm pretty sure you guys are doing the samething.
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
If you don't use DataInfo and FieldInfo class in the client side, how are you identifying the Recordno for the selected record and update db.data.
with respect
joey
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
.So, the only class is not on the client side is the Data class? I think that kinda silly. I'll try to work on some ideas to solve this.
Is it possible to just a client (not the GUI), make it download all neccessary classes at runtime?
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
With Respect,
Matt DeLacey
P.S. I think you're going to HAVE to have everything on the client because when you run in local mode, it will need to be there, but when you run in network mode, the server doesn't have to have everything per se (because it's already on the client).
Just my $0.02
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Lets imagine a common scenario. The app is running on networked mode. The client wants to have a particular record and it routes the call to the server through RMI and the server calls its data class and then, the data class should have the knowledge of DataInfo class as it return this type for any record. So, the helper classes should reside both in the server and the client. Am i seeing something absolutely wrong ?
With Respect,
Swapan.
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
With Respect,
Matt
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
With Respect ,
Swapan.
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
joey
Originally posted by Adrian Yan:
Hold on a minute.
I thought when we provide all the public methods of the Data class, all we need to do is to provide the methods, not the signatures, and not the exact implementation.
For example (RMI implementation) in my design:
I have a remote interface that has all public methods of Data.class, my Data.class will implement this.
My DataServer.class simply starts the server.
My client (no the GUI one), has two constructors, one takes the Data.class object for local access, one takes an object of my remote interface.
All the public methods will be provided, but not the exact signatures of the Data.class, and the implementations are simply calls the same methods in the Data class object, or the remote interface.
Any suggestions?
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
If your DataClient extends Data class, then that mean the dataclient has the knowledge of data class even if this runs on networked mode which in my understanding is not what we want. Actually, the main requirement is that the DataClient should get Data class locally if it is running on non-networked mode and should get Data class remotely if it running non-networked mode. If it extends Data class itself, I dont know how you will tackle issues when the application is running on networked mode.
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Just to share my experience. I must apologize, I didn't mean to mislead anyone, but I was mistaken. I have to have all the support classes on both the client and the server (namely, DataInfo.class, FieldInfo.class, DatabaseException.class, and of course Data.class). I was confused before, but I just ran my project on 2 separate computers (in different parts of the city--one at work one at home), and that is, in fact, the case. The more I think of it the more sense it makes, and the more I firmly believe that it is necessary unless you want to go to extraordinary measures. WARNING: I became confused because when I ran it before, it SEEMED to work, but now I know that I was running on the same machine and, although I didn't physically have the .class files on the server side, they were in my CLASSPATH. I think this could potentially trick many people. Be careful about this. Sorry if I have mislead or confused anyone.
With Respect,
Matt DeLacey
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
synchronized methods are not allowed in interfaces.How do you declare synchronized methods of te methods(add,delete etc) of Data class in your remote interface as synchronized methods.
-- joey
Originally posted by Adrian Yan:
Hold on a minute.
I thought when we provide all the public methods of the Data class, all we need to do is to provide the methods, not the signatures, and not the exact implementation.
For example (RMI implementation) in my design:
I have a remote interface that has all public methods of Data.class, my Data.class will implement this.
My DataServer.class simply starts the server.
My client (no the GUI one), has two constructors, one takes the Data.class object for local access, one takes an object of my remote interface.
All the public methods will be provided, but not the exact signatures of the Data.class, and the implementations are simply calls the same methods in the Data class object, or the remote interface.
Any suggestions?
[This message has been edited by joey phillip (edited February 21, 2001).]
[This message has been edited by joey phillip (edited February 21, 2001).]
[This message has been edited by joey phillip (edited February 22, 2001).]
[This message has been edited by joey phillip (edited February 22, 2001).]
| Just the other day, I was thinking ... about this tiny ad: Paul Wheaton's 16th Kickstarter: Gardening playing cards for gardeners and homesteaders https://coderanch.com/t/889615/Paul-Wheaton-Kickstarter-Gardening-playing |






