Regarding Performance Issue In EJB


EJB design: Regarding Performance Issue In EJB

  1. Regarding Performance Issue In EJB (3 messages)

    Hi Friends,
    I want to know that, passing the number of parameters will effect to the Performance in distributed Architecture.

    I will give a small example.

    My Client is jsp client. from jsp i am looking a Session Bean. while calling a remote method. so in that method i am passing some DataObjects, which are Serialized,and also i am passing some primitive type data types.

    So whether performance depends on no of parameters.

    Please Clarrify .

    Thank You
  2. I am not very sure but I feel it depends on the amount of data that is passed. A fat object will take more time to serialize that a thin one.

  3. It does not take a lot of time to serialize primitive data types however serializing a java object depends on how deep the object graph is. As far as network traffic is concerned, it is quite optimum since data is represented in CDR format in RPC.
  4. I'm not 100% sure, but I think I remember some statements made in a book by Orfali (Something like "CORBA and Java"); They tested performance and came to the conclusion that RMI's (JRMP) performance gets worse with more parameters passed, but CORBA's (GIOP/IIOP) performance is not degraded as much (proprtional);
    However, I guess this is not an issue at all because:
    *) Many vendors use CORBA as architecture
    *) The vendors who do not use CORBA use their own protocol (I think BEA and Orion) instead of JRMP
    *) When calling an EJB so many things have to be done (transaction context, security, remote,...) that the small performance penalty you may get will be irrelevant.

    The conclusion is IMO that you can reduce the whole thing to "performance penalty directly proportional to amount of data" for one emthod call, for an application "performance penalty indirect proportional to amount of data passed within one call" (given that you somehow need to pass the data)... the usual "reduce remote calls" issue.