Win a copy of Fixing your Scrum this week in the Agile 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
  • Rob Spoor
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Holloway
  • Piet Souris
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Frits Walraven
  • Himai Minh

object by value passing in rmi

 
Ranch Hand
Posts: 179
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well i was practicing rmi.I can't find the reason what is the benefit of passing object as value and what is disadvantage of passing by reference if there would be a support in rmi.
Thanks.
Jawwad Ahmed
 
Ranch Hand
Posts: 1209
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by jawwad ahmed:
Well i was practicing rmi.I can't find the reason what is the benefit of passing object as value and what is disadvantage of passing by reference if there would be a support in rmi.
Thanks.
Jawwad Ahmed


In short, if the return type of a remote method happens to be a serializable, the client gets a local copy of the same. So any subsequent method invocations on this copy again turns out to be local method invocations. ie you have ended up caching information which is generally considered to be good.
If the return type happened to be remote then all the method invocations on tnat object w'd result in calls across the network which is costly.
So you will have to decide on whether you need to make an object implement Remote / Serializable
 
This will take every ounce of my mental strength! All for a tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic