• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

Design choices

 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have following questions/comments.
Your input is most welcome.
1. Record locking Vs synchronized methods
Multiple remote objects Vs single remote object

If one remote interafce object is shared between multiple clients then would it suffice just synchronizing on a static table containing locked record numbers instead of synchronizing each database update methods in the Data class.
Record locking provides finer granularity of locking compared to method synchronization.
Why synchronize each method in the Data class?
If each client uses a unique instance of Remote interface object does the performance of the whole application improve?.
I am assuming that the RMI Naming service will return an unique object instance for a given service. Is this right?
If I want 2 instances of the same remote interface object do I need to register under 2 different services in the server?
2. Modifying vs Extending data class
In my opinion there is no reason to preserve the state of the Data object once the data is updated to the database. For this reason it is better to modify this class than to extend it. Is this a valid design choice?.
3. I prefer to use record number as a unique key instead of the flight no since lock() and unlock() method use record number as keys. Since the JTable does not display record number I store the record number in a collection in the Model object for update operations. The model object also stores the DataInfo retrieved through a find operation in a collection. The model object identifies the correct record number to update based on the index of the row no in the JTable. I use ArrayList collection in the model to maintain correct sequence. There no file pointer implementation in the model object. Is this a valid design choice?
I fully tested my application and it works without any problems. Do you expect any major point cuts for this implementation?

thanks
Chandru
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!