Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

database and server

 
Cathy Young
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I just downloaded the project and have two very basic questions:
1. I took it for granted that the database and the server is running on the same machine, all the time, and the option of RMI or object serialization only concerns the connection between client and server instead of server and database. Am I right? But I did find quite a few threads here which made me doubt it.
2. Why do we need to subclass Data? Im my understanding, we only need to implement 3 methods in it: criteriaFind, lock and unlock. Is that true?
Thanks for all help!
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Cathy.
1. Yes you are right RMI etc is to connect to the server. For local mode there will be no Server just direct acces to the Data classes, not the Data.class directly but through a Local interface that you will create.
Almost forgot about question 2.
2. Subclassing or Modifying the Data class to implement the criteriaFind, lock and unlock methods is up to you. That is one of the decisions you need to make. Either way you have to defend your choice. I myself modified the class, like you are thinking. But that doesn't mean that is right
Mark
Mark
[ March 03, 2002: Message edited by: Mark Spritzler ]
 
Cathy Young
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Mark Spritzler:
For local mode there will be no Server just direct acces to the Data classes, not the Data.class directly but through a Local interface that you will create.

Thanks, Mark. But I am still kind of confused: What is this local interface for? Where is the Data.class, server, or both server and client? Do we need two sets of programs to deal with the local or remote mode? Thanks again!
 
Kalichar Rangantittu
Ranch Hand
Posts: 240
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Cathy, the user requirements does not specifially state that the server will be always run on the same machine as the client nor does it state the other way round.
I chose to design my program so that the server could be run on a differnt machine if needed. You will need to ascertain the use case for your self and that will drive your design.
Regarding sub classing Data, well people have done it and not. It is a design choice where you must justify the need for either extending Data or modifying it directly. The forum discusses this quite a bit. Good luck..
 
Cathy Young
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Kalichar Rangantittu:
Cathy, the user requirements does not specifially state that the server will be always run on the same machine as the client nor does it state the other way round.
I chose to design my program so that the server could be run on a differnt machine if needed. You will need to ascertain the use case for your self and that will drive your design.

Thanks, Kalichar. But if this is the case, we need to consider the communication between the server and the DB
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
RMI handles the communication, and Object Serialization handles it through Sockets. Both have the ability to take a URI, like a URL and locate that machine, and connect to it.
So as far as local, imagine the server is on another machine. You can connect to it remotely, or if you want the client machine to run by itself, meaning no need for a server, then the client has its own instance of the Data classes on it's machine.

Think of it like MS Word, it runs only on your machine, and you save your Docs in your own computer. That's local mode
Remote is if there is a network server that has a shared directory and all the docs are there so everyone in your company can access it. Now in this case it is not a Server but a file sharere, but it is a close analogy
Hope that clears things for ya.
Mark
 
Cathy Young
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, that helps a lot. Thanks, Mark!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic