This week's book giveaway is in the Spring forum.
We're giving away four copies of Pro Spring MVC with WebFlux: Web Development in Spring Framework 5 and Spring Boot 2 and have Marten Deinum & Iuliana Cosmina on-line!
See this thread for details.
Win a copy of Pro Spring MVC with WebFlux: Web Development in Spring Framework 5 and Spring Boot 2 this week in the Spring forum!
  • 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
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Bear Bibeault
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh

Is it proper to consider using RMI in this case ?

 
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 1143
1
Eclipse IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
High Plains Drifter
Posts: 7289
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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...
 
permaculture is giving a gift to your future self. After reading this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic