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

RMI + JDO + Value Objects

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Guys,

I have an swing application that uses JDO as it's persistence layer. The application has a centralized server and the clients run at remote locations over a 512mbs ADSL line. As you have probabley guessed we are experiencing performance related problems which relate to data retrieval and the number of sql statements that are being executed.

One solution I am considering is to use the value object pattern to access the data, and to remove all database access from the client. Is this a good idea? I have done some tests and the performance increase is huge, but I just want to know what other peoples opinions are on using this method. I know this method has other advantages as well, beyond the performance gain, so it is quite attractive.

The other solution (which is going to happen anyway, as our JDO vendor no longer supports the product) is to move from JDO to Hibernate, but I am not sure that this alone will solve all of the performance problems. Again, anyone have experience in this field.

Any help would be greatly appreciated as I would hate to go down the wrong track only to find I have made the wrong decision!

Regards,
Brian
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Brian Knight:
One solution I am considering is to use the value object pattern to access the data, and to remove all database access from the client.



I guess you mean the (Data) Transfer Object pattern?
 
Brian Knight
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sure do!
 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Brian,
Value objects(VAO) are just Plain old java objects for coarse grained access and hence anyway there are efficient in usage .
But your problem seems to be involve lot of network traffic and hence VAO's will be a good option .

VAO's are just objects and dataacess code to populate and transfer them over network has to be developed . Which I pressume you might be already having.

Now coming to your problem Hibernate provides the same functionality that I just mentioned above.

Hibernate provides caching of SQL statements and provides an OR mapping solution. In case of OR solution you will get POJO's of data and you don't need to write VAO's ..

Hence Hibernate anyway is a better solution . Also from your point of view no need to rewrite the code to make it Hibernate compliant as Hibernate does runtime byte code modification . What it means is your existing code can be made Hibernate compliant with no changes . Only some chnages in config needs to be done ....

Hope it helps
-nikhil
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic