Aslam Chima

Greenhorn
+ Follow
since Aug 13, 2001
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Aslam Chima

All,
I have a little doubt about the design. There are two ways that you can implement the application the right way would be to complete the db have a session Facade Layer which also servers as the Remote server on the data base. this server will have 4 methods for booking a flight, searching a flight and getting all the airports. which is the way it should be the client does not need to make the direct calls on the data base server. Now for a typical reservation the client will get the remoteObject call the bookSeats(recNo,seats) method on it the server will do a getRecord(recNo) do a lock on the record and modify the rec and than do a unlock. In this case you don't need to keep the track of the client all the other clients have to wait before the current client releases the rec by doing a unlock.
Now the other approach which the assignments specifies is to hava all the public methods defined in suncertify.db.Data class in your client. that means if the client needs to make a reservation he has to first look the record than call the modify method and than the unlock method. So you are doing the complete transaction on the network which will decrease your performance and also you have to track the client ID when unlocking.
does this makes sense....

how have you guys/gals implemented it. plz respond asap as I have to follow a deadline and submit my exam this weekend.
Aslam
All,
Here is what I am thinking about my design....
Database(interface) has all the public methods for the Data class
RemoteDatabase extends Data class and implements Database interface overiding lock and unlock methods.
FlyServer extends Remote interface has the methods for booking a flight, searching for the flight, getting all the airport etc.
FlyServerImpl implements FlyServer extends UnicastRemoteObject provides impl.
Flight class that has the fields flightNo, price, destination, source airports etc.
Airport class which has the details about the airport, for now it only has a name.
RMI specification says that its not necessary that it will create a new thread for each request so I was thing of creating a factory register it with rmi which has only a single method getInstance to return another remote object FlyServer after getting the remoteobject the client will directly call the methods on Flyserver.
The thing I don't understand about most of the designs, ppl are using the DataInfo and FieldInfo on the client side which is not OO.
does this makes sense at all.. plz let me know asap.
thanks
What was this conversion tool for am I missing some thing here... I downloaded the assignment a couple of weeks ago and it didn't mentioned about any conversion tools.
Aslam
Hi All,
I am trying to implement the time out functionality for the locked records by a particular Client. Now I have gone throw the msgs posted on this list and what I have understand from here is to have a static synchronized map and store the recNo and the time at which the record was locked.
Now my question is here how is the timeout checked, have you guys/gals used a Timer to check the map after every min or so. I am a little confused here about the timeout. Do we even need to provide this functionality if not why every one is using a hashtable and not a vector for locking.
thanks
Aslam