• 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
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

A little Confussion in design

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Paper beats rock. Scissors beats tiny ad.
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic