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.