• Post Reply Bookmark Topic Watch Topic
  • New Topic

Is it proper to consider using RMI in this case ?  RSS feed

 
Steve Yu
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We found it slow to run some complex java 2D graphics on unix box, but it is faster to run it on windows (maybe many people have realized this). However the Oracle db is installed on unix machine and we need to use the database prior to creating java 2D. How about this --- Use RMI mechanism to split the code between unix and windows, let the unix part access local db, then pass objects to windows and let the codes on windows generate java 2D graph ? But this requires sending objects through network, it may slow down the process too ?
Can any expert give any comment ?
Thanks,
steve
 
Avi Abrami
Ranch Hand
Posts: 1141
1
Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Steve,
We use RMI with our java client applications (running on Windows) that need to communicate with our Oracle database (running on a SUN computer). The operation that we find takes the longest time is the process of serialization. We solved this problem by customizing the serialization process. Jack Shirazi talks about the performance benefits of customized serialization in his Java Performance Tuning book -- but you don't need the book in order to implement customized serialization.
Good Luck,
Avi.
 
Michael Ernest
High Plains Drifter
Sheriff
Posts: 7292
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Steve Yu:
We found it slow to run some complex java 2D graphics on unix box, but it is faster to run it on windows (maybe many people have realized this). However the Oracle db is installed on unix machine and we need to use the database prior to creating java 2D. How about this --- Use RMI mechanism to split the code between unix and windows, let the unix part access local db, then pass objects to windows and let the codes on windows generate java 2D graph ? But this requires sending objects through network, it may slow down the process too ?

For starters, you might compare the performance of a Unix box running both Oracle and complex 2D graphics against a Windows box doing the same thing. From a performance perspective, it sounds like you've compared apples to oranges to get to your current need for a solution.
Oracle databases in particular are usually designed to be limited in scalability to the number of CPUs available. In other words, it tends to be a pig on both memory and compute time. So does crunching graphic data.
The cost of sending objects across the network is dependent on their size, not their format. RMI is not so much the issue, unless it does an inefficient job of deserializing your objects, as is calculating how much data you'd need to send across.
If they're pretty big objects, you may find the constraint to be the amount of time spent just unrolling large objects into data streams, as has been said. The Unix machine would still have to do that work.
Another approach to consider: share a portion of the Unix box' file system to the network, which would allow the Windows machine -- properly outfitted with NFS client drivers -- easier access to the objects as files.
 
Steve Yu
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks experts. Now, how about the following idea ---
Can we let the application mainly run on the windows ? I mean, let the application access raw data from database on a Unix box and then create customized objects on windows directly, and then run the graphics on windows directly ? This way we don't need to send any objects across network, right ? But I am not sure how slow it is to access database on a unix box from windows ? And what potential problem may arise ?
your idea and experience appreciated again...
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!