RMI optimizations (stub sharing, local calls)

Hi,
Suppose I have the following scenario involving one client and one server:
1. the server exports a RMI object implementing "MyInterface" with a method "void op(MyInterface myObject)"
2. the client obtains two references to the same remote object instance, lets call them myObjectRef1 and myObjectRef2
3. the client calls the given method with one of the obtained references as a parameter, say myObjectRef1.op(myObjectRef2);
My two questions are:
In step 2: Will the RMI implementation automatically recognize that both remote reference point to the same object instance and use one shared stub? Or will there be two totally independent stubs?
In step 3: When the client invokes the method, the stub that is passed points to a RMI object that could be accessed via a local object reference on the server that is executing the method.
Theroretically either the serialized stub could be substituted by a local object reference when the method call is unmarshalled or at least upon invoking a method on the stub, the RMI system could optimize away marshalling and TCP/IP by directly calling the implementation method in the RemoteRef.invoke method. Is there some optimization like this in the Sun RMI implementation? Or is it totally unaware of such scenarios and just performs a remote call involving marshalling+TCP/IP communication?
Thanks for your replys.

In step 2: Will the RMI implementation automatically recognize that both remote reference point to the same object instance and use one shared stub? Or will there be two totally independent stubs?As a matter of fact there is a shared stub at the remote object, but by the time they're acquired by the client they will be distinct, because of serialization over distinct ObjectOutputStreams (a new one per call). But why would it matter to you either way? How could you even tell? The stubs all point to the same remote object, and the equals() methods return true.
In step 3: When the client invokes the method, the stub that is passed points to a RMI object that could be accessed via a local object reference on the server that is executing the method.If it's a stub it will always perform RMI.
Theroretically either the serialized stub could be substituted by a local object reference when the method call is unmarshalled or at least upon invoking a method on the stub, the RMI system could optimize away marshalling and TCP/IP by directly calling the implementation method in the RemoteRef.invoke method.No, it can't. That would change the pass-by-copy semantics of RMI into pass-by-value as in local method invocation. It can't do that.
Is there some optimization like this in the Sun RMI implementation?No. Nor in IBM's either.

Similar Messages

  • RMI, RPC, LOCAL CALL, CORBA???

    In a distributed system, when are RMI, RPC, LOCAL CALL AND CORBA most appropriate to use. RMI is used to communicate with objects that are not on the same application server, but when would you use RPC instead, is there any such case? Also if 2 components reside on the same server, is it more appropriate to make a local call rather then RMI, which has significant overheads if used like this. Am confusing myself between local calls and RPC I think.
    An explanation of all and their appropriate users would be most useful.

    RMI IS an RPC.

  • How can use EJB local call in WLS 7.0 without EAR

    I have web application as jsp files.
    and I made .jar for some EJBs
    and I used local call for calling EJB from jsps in WLS 6.1
    but in WLS 7.0 .. occured error calling EJB as Local call
    while JNDI lookup.
    So I packed all applications as EAR and deployed then all works good.
    but in developing I want to use JSPs as jsp files.
    There is no way to use Local call to EJB in WLS 7.0 without packing EAR ? (like
    WLS 6.1)

    The way JNDI lookups were implemented in 6.1 allowed to deploy individual ejb-jars
    and access their local interfaces via JNDI lookups from other ejb-jars during
    development. In production all ejb-jars will be packaged into an ear.
    This is extremely helpful on large projects. E.g. my current project has over
    120 CMP entity beans and over 40 session beans. Even on 2GHz class machine with
    1Gb memory and JDK 1.4 (to enable full-speed debugging) it takes almost a minute
    to deploy the ear (no matter whether it is exploded or not). It takes minutes
    with 1.3 and debugging turned on.
    6.1 implementation allowed to "pre-deploy" relatively static ejb-jars and still
    access their local interfaces (by putting them on WL system classpath and deploying
    as individual ejb-jars, so classes are accessible to local clients; it requires
    WL restart when they are changed, but they don't change often). So during development
    only changed jars (typically session facade) need to be redeployed on changes,
    which takes only seconds. We didn't have problem with JNDI lookup performance
    since we use the EJBHomeFactory pattern.
    The behind-the-scene JNDI optimization "improvement" introduced in 7.0 makes it
    no longer possible to use this technique, since even though classloading still
    works in the same way, no objects are bound to JNDI tree and thus could not be
    access from another ejb-jar. This significantly impacts developer productivity
    (in our large project). It's not only about minutes lost (which btw makes hours
    over time), it just disrupts developer's train of thought to have such long round
    trip times. In fact this is the reason we are not going to migrate to WL 7.0.
    Is it possible to provide an option to turn this "optimization" off and actually
    bind JNDI objects?
    Thank you,
    Sergey
    "Dimitri I. Rakitine" <[email protected]> wrote:
    Park <[email protected]> wrote:
    Thanks Rakitine.
    I wonder if I use EAR while developing could I apply changes to EARwhithout packing
    again.Sure - you can simply deploy your app as an 'exploded' EAR during development.
    There is no probelm delivering time but in developing time ..
    If I can not use that kind of way how can I make modification ?
    Plz. let me know.
    And I have one more question.
    When I use EAR I met some problem.
    I packed all JSP into one .war file.
    fot that I had to inclde requred classes into .war because jsps usethese classes.
    then I packed EAR file with WAR and some EJB jar files.
    After then I deployed EAR file to WLS.
    But If remove classes from classpth while EJB deploying Error occured.Because
    EJBs reference these classes.
    I thoght if I packed classes into .WAR .. there is no problem.
    But Error occured.
    I have to include classes into classpth for that ? or
    Any mistakes in my way.No, you do not have to add anything to the system classpath. In fact,
    you should
    make sure that none of your application classes are in the system classpath.
    thank you.
    "Dimitri I. Rakitine" <[email protected]> wrote:
    Yup, that appears to be the difference between 6.1 and 7.0 - in
    6.1 success of a local invocation depended only on the Classloaders
    arrangement, so everything worked when you added your classes to the
    system classpath. In 7.0 looks like it also depends on the application
    context - that's why you cannot do a JNDI lookup from another deployment
    unit.
    Is there any reason why you do not want to use EAR's ???
    Park <[email protected]> wrote:
    in WLS 6.1 ..
    I have EJB as jar files. (deployed each to WLS)
    and I added EJB interface class to classpath.
    and I made WebApplication as Directory (not war file).
    in that webappication jsp call EJB as Local interface.
    These environment .. local call workes well in WLS 6.1.
    but in 7.1 not works .. (JNDI look up error)
    of course Remote call works well. and If I make EAR .. works well.
    Rob Woollen <[email protected]> wrote:
    You can have an exploded EAR and have it work.
    Can you give some more detail on how you are deploying in 6.1. Is
    it
    an
    exploded EAR, or do you have the ejb interfaces in the classpath?
    This behavior should not have changed between 6.1 and 7.0.
    -- Rob
    park wrote:
    I have web application as jsp files.
    and I made .jar for some EJBs
    and I used local call for calling EJB from jsps in WLS 6.1
    but in WLS 7.0 .. occured error calling EJB as Local call
    while JNDI lookup.
    So I packed all applications as EAR and deployed then all works
    good.
    but in developing I want to use JSPs as jsp files.
    There is no way to use Local call to EJB in WLS 7.0 without packingEAR ? (like
    WLS 6.1)
    Dimitri
    Dimitri

  • What is the best way to Optimize a SQL query : call a function or do a join?

    Hi, I want to know what is the best way to optimize a SQL query, call a function inside the SELECT statement or do a simple join?

    Hi,
    If you're even considering a join, then it will probably be faster.  As Justin said, it depends on lots of factors.
    A user-defined function is only necessary when you can't figure out how to do something in pure SQL, using joins and built-in functions.
    You might choose to have a user-defined function even though you could get the same result with a join.  That is, you realize that the function is slow, but you believe that the convenience of using a function is more important than better performance in that particular case.

  • ANOTHER Step BACKWARDS - NO, You CANNOT SEE Your LOCAL Calling Area ONLINE !!

    Why check your LOCAL calling area? TO SAVE Yourself MONEY. If you can check the calling area quickly, you can tell if it will be a TOLL CALL. Sure, this is not an issue depending on your calling plan. It is to a lot of folks like me; and you may be calling from a different phone at times.
    Up until at least January 2008 you could EASILY determine your LOCAL CALLING AREA on Verizon's website by entering your phone number. The link WAS
    http://www22.verizon.com/CallingAreas/localCallFinder/LocalExchangesList.htm , but NO MORE.
    I SUSPECT it was discontinued because Verizon realized that by making a MONEY-SAVING 'device'
    easily available was NOT GOOD FOR THE BOTTOM LINE.
    I went thru all of Verizon's hoops to get an answer, but they have their roadblocks firmly planted.
    Their is A LOT OF JUSTIFICATION for CONSUMER REPORTS to give its highest ratings to Verizon's SERVICES...... WHILE AT THE SAME TIME RATING THEIR CUSTOMER SERVICE "DREADFUL". 

    Hi GimmieDps,
    I'm sorry you are having difficulty with your calls from home. I have escalated your concern and an agent with access to your account will reach out to you directly by email, private message in the Forums and/or the billing telephone number on your Verizon account for more information or to help you resolve your issue.
    Regards,
    SunshineF

  • What Prefixes Are Included In My Local Calling Area?

    I am in the former GTE service territory, specifically, the Elsinore Main California exchange.
    On Friday, December 11, 2009, I spoke with a service representative and a supervisor (who admitted that she was "filling-in" and is really an hourly employee), who are in the soon to be divested Everett, WA call center.
    I was calling to find out what prefixes are included as part of my local calling area, specifically ZUM 1 AND ZUM 2 (some also call it Zone 1 and Zone 2, but the correct designation in most southern California service areas of Verizon is ZUM).
    Both representatives had no idea what a "ZUM" is, and the "supervisor" said she had never heard of the term ZUM or Zone.
    What made me upset is that I was told that they (Verizon) did not have this information, and I would have to contact the CPUC (California Public Utilities Commission) to obtain this information as Verizon's staff would not have it.
    My reply was how would Verizon not have the information, because they would need the ZUM prefix list for each exchange so they could bill correctly.
    I then asked how does Verizon gather all the calls that are made from their exchanges each month and send this data to the CPUC so that Verizon can then determine if the call is ZUM 1, ZUM 2, ZUM 3 or intralata or interlata?
    The "supervisor", said yes, because Verizon would not know what prefixes are included, and relies upon the CPUC to review the calls from Verizon's exchanges and prefixes so that Verizon can bill their customers each month, and this has been the process for many years (according to the "supervisor").
    I kid you not, this what was said to me by the Verizon representatives, and I shoulld have advised the employees that I was recording the call. It would have been a great play for You Tube. What a bunch of (edit)  from these two Verizon call center representatives!
    I'm glad Verizon is divesting the Everett call center along with other assets to Frontier, as people like these should not be employed by Verizon, in fact, they should be terminated for cause. Good luck to Frontier with the Everett call center.
    Using Verizon's web site when trying to determine what prefixes are in my local calling area (ZUM 1 AND ZUM 2), you are directed to use the following two "very helpful" (my words...lol) links for information...please try for yourselves:
    To obtain Local Calling Area information
    http://www22.verizon.com/Content/CommonTemplates/sorry.html
    Zone Usage Measurement (ZUM) Information
    https://www22.verizon.com/ResidentialHelp/Phone/Calling+Plans/Local+And+Regional+Calling+Plans/Gener...
    Great Information Verizon!! Both are dead links.
    Anyway, point me in the direction where I can obtain the current and accurate prefixes that can be called without charge to ZUM 1 and ZUM 2, and with a charge to ZUM 3 for my exchange and prefixes. DO NOT point me to a white pages directory because that is already outdated (and I do not have a white pages directory).
    Again, my exchange is Elsinore Main, and the prefixes are 951-245 and 951-674.
    Thank you.
    Solved!
    Go to Solution.

    Home Exchange, Zone 1 and 2 are Local Calling
    Zone 3 (ZUM) 13-16 Miles:
    PEAK PERIOD RATES: Day 8A-5P   M-F
                              1st Min of Use       Addl Min of Use
                                   $.10                          $.04
    OFF-PEAK RATE PERIOD: Evening 5P-11P M-F
                                   $.07                          $.028
    OFF-PEAK RATE PERIOD: Night 11P-8A M-F; SA, SU, & HOLIDAY - All Hours
                                   $.04                          $.016
    COMMUNITY ---NPA ---NXX ---ZONE  -----
    ELSINORE ---951 --- 226 245 253 285 471 579 609 674 678 805 --- Home Exch
    LAKEVIEW-NUEVO --- 909 --- 251 --- Zone 3
    LAKEVIEW-NUEVO --- 951 --- 878 916 928 --- Zone 3
    MURRIETA --- 909 ---3 32 --- Zone 2
    MURRIETA --- 951 --- 200 219 239 249 304 440 445 461 473 600 671 677 691 696 698 704 813 816 834 837 894 970 973 ---Zone 2
    PERRIS --- 909 --- 330 --- Zone 2
    PERRIS --- 951 --- 210 229 230 238 259 287 345 378 385 436 442 443 490 550 570 575 581 591 623 657 722 796 940 943 956 --- Zone 2
    RANCHO VIEJO --- 949 --- 259 269 284 292 303 326 350 446 480 584 625 702 728 874 --- Zone 3
    SUN CITY --- 909 ---508--- Zone 1
    SUN CITY --- 951 --- 244 246 301 566 639 672 679 723 746 821 --- Zone 1
    TEMECULA --- 909 --- 298 507 668 828 --- Zone 3

  • Local Calling Area

    Why, with all the technology Verizon so proudly touts in all its commercials, can we not find out our local calling area on the web site? Instead, we're directed to go look it up in the paper phone book. Give me a break. It's all stored away in a database somewhere and it's really a no-brainer to allow access to it. Honestly, that is just completely lame in this day and age.

    Thats a great idea! This would be a perfect candidate for the Verizon Idea Exchange. Please search on the idea exchange and cast your vote. There may be another member who made the same suggestion. If not, please add a new idea so your fellow community members can comment and vote on your suggestion. http://forums.verizon.com/t5/Verizon-Idea-Exchange/ct-p/ideaexchange . The Verizon Idea Exchange is there for you to submit your ideas and suggestions to Verizon so that we can consider them as we innovate our products and services.
    Anthony_VZ
    **If someones post has helped you, please acknowledge their assistance by clicking the red thumbs up button to give them Kudos. If you are the original poster and any response gave you your answer, please mark the post that had the answer as the solution**
    Notice: Content posted by Verizon employees is meant to be informational and does not supersede or change the Verizon Forums User Guidelines or Terms or Service, or your Customer Agreement Terms and Conditions or plan

  • LOCAL CALLING AREA FOR HOME PHONE (landline)

    Verizon has not resolved my issue with my ability to call ONE of my LOCAL CALLING AREAS.  They have passed me NUMEROUS times over and over to many different problems and have not resolved anything.  They say they cannot hold on the line while they wait for a supervisor, I keep hearing i will be called back, and do not get any calls back.  They "say" they are working with me and a supervisor, and yet still nothing.  I contacted the Local Access Transport Area (LATA) and have been told that the numbers I am trying to reach ARE local. Also, I have NEVER had any problems reaching these numbers in the past and ALL OF A SUDDEN 1 out of the 7 local calling areas I cannot call. The local calling area HAS NOT changed and never will according to LATA.  One of the reps had the nerve to tell me that another of the "local calling areas" I have is regional, so I had to burst her lil "tell me anything to shut me up" bubble, that she was not gonna feed me that line of **bleep** seeing how I just got off the phone with someone in that area.  Verizon seems to be feeding me a lot of **bleep** to try and silence me or so they dont have to try and figure this out. (cause apparently they cant) I have been dealing with this for over a week, many Reps, many repair techs and NOTHING. The repair Techs (automated recording) calls me back and says We cannot find the problem but your line is working properly.  ARE YOU KIDDING ME!!  DUH!  NOW, I have no choice but to contact Consumer Affairs and file a complaint, and I have also been advised to contact the BBB and local television station so that they can run a story.  WHAT TO DO NOW!!!

    Hi GimmieDps,
    I'm sorry you are having difficulty with your calls from home. I have escalated your concern and an agent with access to your account will reach out to you directly by email, private message in the Forums and/or the billing telephone number on your Verizon account for more information or to help you resolve your issue.
    Regards,
    SunshineF

  • Are there any apps which will allow local calling using data only that do not require any special numbers called out initially and does not require the receiver to have a similar app or account?

    Are there any apps which will allow local calling using data only (not minutes, no extra charge) that do not require any special numbers called out initially and does not require the receiver to have a similar app or account?  Just for random local calling.

    Yup.
    Here is a way you could solve this by adding an extra column and a small lookup table:
    The lookup table is here for the copying:
    0
    1
    k
    kilo
    2
    M
    mega
    3
    G
    giga
    4
    T
    tera
    5
    P
    peta
    6
    E
    exa
    7
    Z
    zetta
    8
    Y
    yotta
    In table 8 (the one on the left in the image) column A is where the values are. 
    B1=A1÷(1024^VLOOKUP(INT(LOG(A1, 1024)), Binary Prefixes::A:D, 1))&" "&VLOOKUP(INT(LOG(A1, 1024)), Binary Prefixes::A:D, 2)&"B"
    this is shorthand for... select cell B1, then type (or copy and paste from here) the formula:
    =A1÷(1024^VLOOKUP(INT(LOG(A1, 1024)), Binary Prefixes::A:D, 1))&" "&VLOOKUP(INT(LOG(A1, 1024)), Binary Prefixes::A:D, 2)&"B"
    select cell B1, copy,
    now select all the cells in column B, paste

  • Dialing area code for local call - is this normal?

    Just had my FIOS triple play installed over the weekend. In the recent past I've used VOIP providers Optimum Voice, Vonage, Packet8, MagicJack and Ooma, and FIOS is the only one that makes me dial my area code to make a local call (I'm in area code 516, where it is not normally necessary to do so).
    Is this a bug in the system, and if so, are there any plans to fix it? When I first signed up with Optimum Voice they had a similar problem, but that was 9 years ago!

    It is disgraceful that when I signed up for FIOS that I was  not informed that I would have to us my area code to call my next door neighbor!!! My realtives that use Fios do not have to do that. They advertise like everything is local buy when I called to complain I'm on the phone with people in Texas who do not even work for Verizon!!!  I will be call the Public Service Commission, Better Business Bureau and Consumer Affairs on Monday. The Technical Support  people who I waited on hold 15 minutes to speak to were rude and say if I pay more I can have this issue resolved!!!  Bait and Switch if I ever heard it!!

  • Lifeline Service removed and Unlimited Local Calling added, what gives?

    I received quite a shock when I received my bill recently. Apparently, my Lifeline Service was removed and Unlimited Local Calling was added instead, tacking on an additional $12 to my landline bill. What gives? I do plan to call Verizon to investigate the matter on Monday, but I am wondering why this is. Is it because Lifeline Service requires that I renew after a number of years, or what? 

    I'm afraid that's the kind of answer you can only get from Verizon.  It looks like your issue may require a Verizon representative to review your account details. Please contact our customer service team via live chat or email at:
    http://www.verizon.com/contactus
    Choose “Live Chat.”
    If a chat agent is available to assist you, the chat link will become live after the page is fully loaded.

  • Local calling when CCM is in another state

    My CallManager cluster is in my office, and I'm trying to set up some phones in another office in another state over a WAN link. The phones are going to register with my gateway in my office, but the users in the remote office want to be able to dial local calls in that state. Has anyone set up something like this? I'm assuming I would need to set up a separate partition and CSS and route the local calls over our long distance trunks, but I don't know how to make this seamless to the end user. Thanks.

    you're on the right track, what you're trying to do is very common. toll bypass is the name of this, the way you need to configure it is to have a route pattern for the phones at the remote location that will use the local gateway to route the calls, if the main site will use the PSTN to route the calls and a local GW users from that site should reach another route pattern which uses the local GW
    if you mean users want to do 7 digit dialing while you need 10 digits to route the call, all you need to do is create a route pattern for remote users and use the called party transformation mask to add the 3 digits or use the prefix field to add the digits
    HTH

  • Use Shared Local Object with Javascript

    Hi to everybody!
    I have to make a javascript component that have to take some
    data from a Shared Local Object;What I have to do in order to use
    the Shared Local Object in javascript? It maybe that I have to
    create an ActionScript file in which I use the Shared Local Object
    and than import that file in Js?
    Furthermore, do you know if it possible to lanch a waba
    application (is a java application for pocket pc and pda ) from a
    flash application?
    And if yes, What I hava to do?
    Thanks

    Have you downloaded and read the Acrobat SDK yet?  That's your starting point.

  • Making local calls doesnt work

    i have just moved nto the 01590 exchange area yet when i try and make a local call within that exchange my phone returns a dull buzzing noise.. not even the number unobtainable
    everywhere i have lived before you could call within the exchange without the national dially code.. so whats happening?
    it making me pay national rates for a local call...
    Sue

    SueF wrote:
    i have just moved nto the 01590 exchange area yet when i try and make a local call within that exchange my phone returns a dull buzzing noise.. not even the number unobtainable
    everywhere i have lived before you could call within the exchange without the national dially code.. so whats happening?
    it making me pay national rates for a local call...
    Sue
    Hi Sue.
    Are these calls via BB Talk, or your "normal" telephone ? If the former then Keith has the info, if the latter then that sounds like it could be a fault. Can you say what the next two digits are you are dialling ? That usually pinpoints the destination exchange.
    Have you tried dialling yourself ? (without the 01590). If you've got the 1571 service, you should get through to your own call minder system (and may cost you for a call, depending on your package) or just get engaged.
    Have you tried dialling a few different numbers (e.g. taxi, chip shop etc - of course it's best to have a reason to call rather than just "try") ?
    Is it just one particular number getting the response you are seeing ?
    Sorry for all the questions, a tiny bit of extra info can help
    http://www.andyweb.co.uk/shortcuts
    http://www.andyweb.co.uk/pictures

  • Refund local calls PREMIUM account in order to get...

    I recently bought a Skype number and Premium subscription at the same time.
    When I subscribed, there was only one option which was to buy Premium for local calls in my country.
    I discovered afterwards that paying 1 more € will get me unlimited European calls. 
    I would like to switch, but after I had a chat with Skype staff they said it's not possible (i.e. it's a burden for them).
    What can I do without the obvious bad solution of buying a 2nd unlimited plan... ?
    Thanks

    http://www.networkworld.com/news/2012/020612-mdm-apple-255756.html says that for push and developer there are different requirements.
    Also, http://www.air-watch.com/downloads/GenerateAPNsCertificate.pdf says that
    "This does not have to be an Apple Developer Account. It can be any AppleID."
    But still with free apple ID I don't see anything that let's me create a certificate

Maybe you are looking for