Corba Performance

download Corba Performance

of 22

Transcript of Corba Performance

  • 8/6/2019 Corba Performance

    1/22

    ByS.Venkatesan

  • 8/6/2019 Corba Performance

    2/22

    In CORBA a Servant is the invocation tar et containin

    methods for handling the remote method invocations.

    In the newer CORBA versions, the remote object on theserver side is split into the Object (that is exposed to remoteinvocations and Servant to which the former art dele atesthe method calls).

  • 8/6/2019 Corba Performance

    3/22

    Stateless Servants is not associated with an a lication

    specific state in memory. This does not implies that theCORBA object, which is implemented by the servant, is.

    Stateful Servants is associated with some a licationspecific state.

  • 8/6/2019 Corba Performance

    4/22

    The number of remote method invocations that are made.

    The amount of data that is transferred with each remotemethod invocation.

    y u ythe system

  • 8/6/2019 Corba Performance

    5/22

    In LAN environment the number of remote method

    invocations will often have the greatest impact.

    In a high speed network with low latency, the marshallingcosts might become more pronounced.

    The performance given for one environment is not commonfor all the environments. The performance will get change

    depend up on the configuration of hardware, network,operating system, programming language, and object request

  • 8/6/2019 Corba Performance

    6/22

    #include interface Holding;typedef sequence HoldingSeq;interface portfolio {Money getCurrentValue();HoldingSeq getHoldings();};Interface Holding{Unsi ned lon etNumberOfSharesStock getStock();};

  • 8/6/2019 Corba Performance

    7/22

    Portfolio Object

    Holding Objects

    Portfolio Manager Server

    getHo ngs

    getStock()getStock()

    MangerGUI

    getSymbol()

    getStock()

    getSymbol()

    getSymbol()

    Data Broker Server

  • 8/6/2019 Corba Performance

    8/22

    //CORBA IDL .

    interface Holding;interface Portfolio{Mone etCurrent ValueSymbolSeq getSymbols();Holding getHoslingBySymbol (in Symbol aSymbol);};

    //Javapublic void displaySymbols (_portfolioRdf the Portfolio){SymbolSeq symbols = thePortfolio.getSymbols();or n x= ; x sym o s. eng ; x

    {holdingList.add(holdings.buffer[idx]);}

  • 8/6/2019 Corba Performance

    9/22

    Portfolio Manager Server

    Portfolio Manager Portfolio Object

    getSymbols()

    GUI

  • 8/6/2019 Corba Performance

    10/22

    First Version (1 + 2 * N RMIs)

    Second Version (1 RMI)

    Duration

  • 8/6/2019 Corba Performance

    11/22

    Number of Invocation

    Amount of data transfer Marshalling and unmarshalling overhead

  • 8/6/2019 Corba Performance

    12/22

    A si nificant amount of time is s ent onlTota cost o RMI wit out

    marshalling/unmarshalling of object references.

    with marshalling/unmarshalling of object

    references

    First Version (1 + 2 * N RMIs)

  • 8/6/2019 Corba Performance

    13/22

    Each request sent over a network connection imposes a delay,usually referred to as network latency.

    each CORBA remote invocation, especially in TCP/IP networks.

    The network latency imposed by each request and reply is not theonly cost factor involved in each remote invocation.

    There are other factors, like server side lookup, that contribute to aconstant cost factor for each remote invocation.

  • 8/6/2019 Corba Performance

    14/22

    Section Message Size Throughput

    I Small Low

    II Relatively large High

  • 8/6/2019 Corba Performance

    15/22

    High throughput rate can usually achieved by using few, ,

    instead of many request, each transferring a smallamount of data.

    There is also problem with transferring extremely largeamoun s o a a n a s ng e message e messagegets too big, the throughput rate decreases again.

    Reason for this decrease in throughput include TCPbuffering issues and growing process sizes.

  • 8/6/2019 Corba Performance

    16/22

    Marshalling Overhead for Different IDL Data Types

    Octet marshalling overhead is very small

    Struct is also very simple, therefore the marshalling overhead is quite small.

    Union Unions are slightly more complex than structs, since they can store.

    String A string is a variable length data type. The problem with variable lengthdata types is that they usually involve costly memory management operations.

    Sequence A sequence is not only a variable length data type, it can also storecomplex IDL types.

    Any It is more complex, since it is essentially a dynamic data type and has tohandle dynamic type codes during marshalling and unmarshalling.

    Object reference Object references provide a powerful abstraction mechanism.They encapsulate information such as host addresses and object identifiers, andmappings to active network connections.

  • 8/6/2019 Corba Performance

    17/22

    Marshalling/Unmarshalling cost of different data types

    IDL Type

    struct

    Octet

    Union

    String

    Sequence

    any

    Object reference

    Marshalling Cost

  • 8/6/2019 Corba Performance

    18/22

    IDL data t es do not su ort inheritance.

    IDL data types cannot be used describe recursive datastructures.

  • 8/6/2019 Corba Performance

    19/22

    Diagram

    *

    ge apes

    Shape1..*

    Compound Shapename:string

    LineStart: point

  • 8/6/2019 Corba Performance

    20/22

    struct CompoundShape {string m_name;sequence m_shapes; (1) Error!}Struct Line {point m_start;point m_end;};union Shape switch (short) {case 1: Line m Line; _case 2 : compoundShape m_CompoundtShape;};

  • 8/6/2019 Corba Performance

    21/22

    Struct Shape

    Any m_details;};struct Com oundSha e {string m_name;sequence m_shapes; (1) Error!

    };

    point m_start;point m_end;};

    union Shape switch (short) {case 1: Line m_Line;case 2 : any m_CompoundShape;

  • 8/6/2019 Corba Performance

    22/22