CORBA Record and Replay - PowerPoint PPT Presentation

1 / 17
About This Presentation
Title:

CORBA Record and Replay

Description:

Recording CORBA Traffic. Logging. Debugging. Auditing. Tracking. Replaying CORBA Requests ... CORBA Record and Replay. Example System Exception reply ... – PowerPoint PPT presentation

Number of Views:26
Avg rating:3.0/5.0
Slides: 18
Provided by: irfanp
Category:
Tags: corba | record | replay

less

Transcript and Presenter's Notes

Title: CORBA Record and Replay


1
CORBA Record and Replay
  • Irfan Pyarali
  • TAO Workshop

2
Motivation for Recording and Replaying CORBA
Traffic
  • Recording CORBA Traffic
  • Logging
  • Debugging
  • Auditing
  • Tracking
  • Replaying CORBA Requests
  • Compare original reply with the new reply
  • System determinism
  • Identify behavior anomalies

3
Where to Record CORBA Traffic
4
CRR Architecture
Client
Server
request replies
Client
request
Logger Manager
Generic Client
new reply
5
How to Record CORBA Traffic
  • Recording level
  • GIOP level
  • Black box testing can be done by recording GIOP
    messages
  • Difficult to tell exactly what has changed
  • Interceptor level
  • Individual parameters can be inspected
  • Can tell exactly what has changed
  • Filtering what is recorded
  • Interfaces
  • Implementations (servants)
  • Methods
  • Clients this might be difficult since servers
    typically do not know which client is issuing the
    request
  • Parameter values will probably need a ETCL like
    mechanism

6
What to Record
  • CORBA Request
  • Interface name
  • Operation name
  • Operation type oneway or twoway
  • IOR
  • For each parameter
  • Mode in, inout or out
  • TypeCode
  • Value for in and inout but not out parameters
  • Result
  • TypeCode
  • Exceptions
  • TypeCode
  • Successful reply
  • TypeCode and value for inout, out and result but
    not in parameters
  • Failed reply
  • TypeCode and value for exception raised

7
Example IDL
  • interface Test
  • exception error
  • long reason
  • long method_longs
  • (in long a,
  • inout long b,
  • out long c)
  • raises (error)

8
Example Recorded Request (1)
interface Test exception error long reason
long method_longs (in long a,
inout long b, out long c) raises
(error)
  • ltrequestgt
  • ltinterfacegtIDLTest1.0lt/interfacegt
  • ltoperationgtmethod_longslt/operationgt
  • ltoperation_typegttwowaylt/operation_typegt
  • ltiorgtIOR010000000d0000004...lt/iorgt
  • ltparametergt
  • ltmodegtINlt/modegt
  • lttypecodegt
  • ltbasictypegtlonglt/basictypegt
  • lt/typecodegt
  • ltvaluegt1lt/valuegt
  • lt/parametergt
  • ltparametergt
  • ltmodegtINOUTlt/modegt
  • lttypecodegt
  • ltbasictypegtlonglt/basictypegt
  • lt/typecodegt
  • ltvaluegt2lt/valuegt
  • lt/parametergt

ltparametergt ltmodegtOUTlt/modegt lttypecodegt
ltbasictypegtlonglt/basictypegt lt/typecodegt
lt/parametergt ltresultgt lttypecodegt
ltbasictypegtlonglt/basictypegt lt/typecodegt
lt/resultgt
9
Example Recorded Request (2)
interface Test exception error long reason
long method_longs (in long a,
inout long b, out long c) raises
(error)
ltraisesgt lttypecodegt ltexceptiongt
ltnamegterrorlt/namegt ltidgtIDLTest/error1.0lt/idgt
ltmembergt ltnamegtreasonlt/namegt
ltbasictypegtlonglt/basictypegt lt/membergt
lt/exceptiongt lt/typecodegt lt/raisesgt lt/requestgt
10
Example Successful Reply
  • ltreplygt
  • ltreply_statusgtSUCCESSFULlt/reply_statusgt
  • ltparametergt
  • lttypecodegt
  • ltbasictypegtlonglt/basictypegt
  • lt/typecodegt
  • ltvaluegt7lt/valuegt
  • lt/parametergt
  • ltparametergt
  • lttypecodegt
  • ltbasictypegtlonglt/basictypegt
  • lt/typecodegt
  • ltvaluegt8lt/valuegt
  • lt/parametergt
  • ltresultgt
  • lttypecodegt
  • ltbasictypegtlonglt/basictypegt
  • lt/typecodegt
  • ltvaluegt9lt/valuegt

interface Test exception error long reason
long method_longs (in long a,
inout long b, out long c) raises
(error)
11
Example System Exception
interface Test exception error long reason
long method_longs (in long a,
inout long b, out long c) raises
(error)
  • ltreplygt
  • ltreply_statusgtSYSTEM_EXCEPTIONlt/reply_statusgt
  • ltraisesgt
  • ltcomplexvaluegt
  • ltidgtNO_IMPLEMENTlt/idgt
  • ltminorgt1413545984lt/minorgt
  • ltcompletedgtNOlt/completedgt
  • lt/complexvaluegt
  • lt/raisesgt
  • lt/replygt

12
Example User Exception
interface Test exception error long reason
long method_longs (in long a,
inout long b, out long c) raises
(error)
  • ltreplygt
  • ltreply_statusgtUSER_EXCEPTIONlt/reply_statusgt
  • ltraisesgt
  • lttypecodegt
  • ltexceptiongt
  • ltnamegterrorlt/namegt
  • ltidgtIDLTest/error1.0lt/idgt
  • ltmembergt
  • ltnamegtreasonlt/namegt
  • ltbasictypegtlonglt/basictypegt
  • lt/membergt
  • lt/exceptiongt
  • lt/typecodegt
  • ltcomplexvaluegt
  • ltvaluegt-1lt/valuegt
  • lt/complexvaluegt
  • lt/raisesgt
  • lt/replygt

13
Alternate Recording Schemes
  • Portable Interceptors pass parameters as Anys
  • Interpretive Recursively traverse each parameter
    represented by an Any to find base type and value
  • Compile Added new backend to the IDL compiler
    that generates logging code that knows exactly
    the TypeCode and layout of the parameters
  • Classic tradeoffs size, speed, requiring updates
    whenever IDL changes

14
Basic Types
  • null
  • void
  • short
  • long
  • ushort
  • ulong
  • float
  • double
  • boolean
  • char
  • octet
  • TypeCode
  • objref
  • longlong
  • ulonglong
  • longdouble
  • wchar

15
Complex Types
  • any Record type of what is in the any
  • structure Record the names and types of each
    member
  • union Record the discriminator type for each
    member, record the case label, member name, and
    member type
  • enumeration Record the enumerators
  • string Record the bounds if any
  • sequence Record the bound (if any) and the
    element type
  • array Record the dimensions and element type
  • alias Record the type of the aliased type
  • exception Record the names and types of each
    member
  • fixed Record digits and scale

16
Generic Client Replaying Requests
  • Parses XML representation of CORBA requests
    converting it into CORBA IIOP request using DII,
    replay it, and returning the result in XML
  • ACEXML SAX based parser
  • Create IOR - tricky if being redirected to
    alternate server
  • For each method that needs to be replayed
  • Set method
  • For each parameter, create TypeCode, and then
    fill in value
  • Set TypeCode of return value
  • Set TypeCodes of all possible exceptions
  • Record new reply from replay
  • Compare with original reply to check for
    differences
  • Implementation notes
  • Creating TypeCode using TypeCode factory
  • Union label have values
  • Filling values using DynAny
  • Anys are very tricky

17
Conclusions and Future Work
  • CORBA Record and Replay may become a CORBA
    specification through the C4I Task Force
  • Standardization of XML schema
  • Integration into Ovation
  • Only works with skeletons based servers
  • This limitation comes from Portable Interceptors
  • Add value type support
  • Compiled logging was initially designed for Orbix
    3
  • Need to be modified to support CORBA 3 ORBs
  • Record QoS properties
  • Including real-time and protocol properties
    related to the CORBA traffic
Write a Comment
User Comments (0)
About PowerShow.com