Tuesday, November 15, 2011

Chapter 14 - Program Profilers

Program Profilers

Profiling allows you to know where your program used time and what functions (and together with other functions) were enabled during its execution creating knowledge of the parts of the program that are slower than expected and may need to be rewritten for better efficiency.   It can also tell you which functions are being accessed more or less often than you expected which will pinpoint bugs that would have been overlooked otherwise.  The profiler uses information discovered  during the actual execution of the program;  it can be used on programs that are too large/complex to analyze by reading the source but how your program is run will affect the information that shows up in the profile data and will omit information for that feature.(1)

The three program profiler tools discussed in this writing use static instrumentation of programs to monitor dynamic behavior, but are different in certain ways.

 Gprof,  the most limited of the three; it is only capable of producing a call graph, and is language dependent but it is easier to use than the others, and is portable across CPU architectures and OSs.

ATOM and Etch are more flexible - users define their own instrumentation code and are not limited to a single function and are both language independent but unlike Gprof, they work at the binary level (confined to a particular OS/architecture). If only the final binary executable is used, then Etch is the only tool of the three of use. Though static instrumentation of individual binaries are powerful profile tools in runtime behavior it is limited and the other layers of the system, (operating system and hardware), effect program execution greatly.  Events (scheduling, cache misses, interrupt handling, etc.) can cause  poor system performance, but  need code in the OS itself to be determined, or with hardware monitoring.(2)


(1) <http://www.cs.utah.edu/dept/old/texinfo/as/gprof.html#SEC1>. Web. 15 Nov.  2011.
(2) <http://www.cs.wustl.edu/~jain/cse567-06/ftp/sw_monitors2.pdf>. Web. 15 Nov. 2011.

CHAPTER 13 - CORBA

CORBA

A brief introduction to CORBA

CORBA  defines how distributed objects can interoperate and before the  World Wide Web, and in particular, the Java programming language, CORBA was basically a high-end, distributed-object solution primarily used by C++ developers.

The actual CORBA specification is controlled by the Object Management Group (OMG), an open consortium of more than 700 companies who together define open standards for object computing. CORBA objects can be written in any programming language supported by a CORBA software manufacturer (C, C++, Java, Ada, or Smalltalk) or in any platform supported by CORBA software manufacturers (Solaris, Windows 95/NT, OpenVMS, Digital Unix, HP-UX, and AIX, etc.). (1)


CORBA Services


CORBA Services entail specific interfaces defined by the OMG like security, persistence, transactions, query, object trading, naming, events, concurrency control, and collections and are constantly being defined although few appear in commercial products at present are not in Open Source or Freeware form but basic services (e.g., naming and events) are in  base CORBA implementation, and are noted where necessary. Stand-alone implementations are listed below.

JTrader
    JTrader is an implementation, in Java, of the COS Trading Object Service. Traders are objects that know about services and used to find an object by the type of service it offers. Graphical tools tmanage the service type repository, the service offers, and  performing queries but require ORBacus (OmniBroker) for operation and should be  portable to other ORB's. Itrader is used in Java, under the GPL.

CORBA Packages Guide

AdaBroker
    AdaBroker is a set of tools and libraries for applications in the Ada programming language; provided are an IDL parser, Ada code generator, the CORBA-defined Ada mapping support packages and released under the GPL.

ORBit
    ORBit is the ORB of choice (the Gnome project) and praised for very high performance when used locally (small footprint). The decision to pursue the development of ORBit followed poor experiences with three of the ORB's listed below (one had unacceptable licensing restriction/GPL'ed Gnome project, another was too fat/slow, and a third was missing critical "C" language bindings) but if you are doing GUI programming in Gnome, and want to write graphical plugins or controls use this ORB. Includes a variety of services, such as OAF for naming, and Bonobo for easy-to-use document and GUI programming interfaces.

OmniORB
    OmniORB from Oracle & Olivetti /explicit Linux port. Features a C++ IDL, uses IIOP and the IIOP has been tested with other ORB's, is multi-threaded, has a COS name server and OmniORB Source is GPL'ed.

        Commercial support

MICO
    MICO, the recursively named "Mico Is COrba", implements a C++ IDL, DII, DSI, IIOP, IR, a full BOA, a name server, support for "Any" types, support for loadable modules. Includes a graphical IR browser ( GPL'ed). Pre-compiled versions are available and current work is on a WinNT port.  Mico/E is an extension of mico (Eiffel programming language).

ORBacus (OmniBroker)
    The ORBacus (OmniBroker) from Object Oriented Concepts, Inc. includes Java and C++ IDL mappings, as well as IIOP, DII, DSI (Dynamic Skeleton Interface), COS, IR, nested method . Dynamic Any. Has an IDL-to-HTML converter - supports threads and naming service GUI. Third party tools include a COS Trading Object Service and a scripting language. Supports C++ threads. Source code is available. Free for non-commercial /commercial license with full support contracts.

OAK
    The OAK CORBA ORB from Paragon Software supports Objective-C bindings, a unique feature making it  suitable for use with NeXTStep/GnuStep. Supports IIOP, BOA, DSI, DII, IR, COS. Includes extensions for fault tolerance/load-balancing etc.   OAK is a commercially supported product; they offer a free trial evaluation period.

COOL ORB
    The COOL ORB form Chorus has a small footprint (50KB), real-time behavior and synchronization services
(use in embedded systems). Fully CORBAv2 compliant, offers IIOP, DSI, DII and IR. Inter-operates with the other Chorus embedded/real-time products; unlike most other ORB's listed here,  it is commercially supported. N.B. Chorus has been acquired by Sun.

ILU
    The ILU (Inter-Language Unification) ORB from XEROX -  support for IIOP, kernel threads, encryption, and "Any". Includes IDL compilers for C++, ANSI C, Python, Java, Common Lisp and Modula-3. ILU also includes a self-contained implementation of ONC RPC, making it possible to use existing RPC services as ILU objects. ILU includes  HTTP, allowing CORBA-based web servers/browser development -  highly customized - available as freeware.  Beware of the down-level code located on the Linux Sunsite (http://sunsite.unc.edu/pub/Linux/devel/corba/) repository; go to the main site for newest code.

Arachne
    Arachne  seeks reusable components for the medical domain;  continues and is evolving -  active use by the developers   Arachne runs on a variety of platforms, including 95/NT, Mac, SunOS, HP/UX, but Linux primarily -  includes a C++ ORB with DII, IR, Any, TypeCode, and IIOP -  includes a subset of COS, and an application development support framework/GUI components -  IDL language mapping is currently non-standard - predates CORBA-2 needs some update possibly. IIOP has been tested against Visigenics and ORBacus (OmniBroker) - possible python-based application authoring environment.

TAO
    The TAO (The Ace ORB)  definine real-time extensions to CORBA - TAO includes enhanced C++ IDL compiler, a BOA, and an implementation of standard IIOP on TCP/IPORB's from several vendors -  includes RIOP (Real-time IOP) extensions to GIOP, implemented on ATM and multi-gigabit hardware -  real-time event service, a real-time dispatcher/scheduler and an ROA (real-time object adapter). TAO is affiliated with the ACE (Adaptive Communications Environment),  experience with real-time communications in telecom and avionics environments. The code is currently (97) alpha-level, and runs on Linux, Solaris, and NT.

Electra
    The Electra Object Request Broker provides V2 CORBA support, including BOA, DII, a Tcl/Tk DII, IIOP, a fault-tolerant COS name server, a GUI availability monitor, and an event channel for C++/Java, allowing objects to subscribe to information servers - fault-tolerance emphasis and availability -  for reliable multi-cast & synchrony. Electra is not yet as of 97 stable on Linux.

COPE
    COPE is an ORB completely in Perl. It does not provide an IR (Interface Repository),- use third-party tools for that purpose (such as ORBacus (OmniBroker)).

JacORB
    The JacORB is a CORBA ORB completely in Java -  Java IDL compiler, supports threads, IIOP, IR, a COS compliant name service, and an alpha-level implementation of the COS Event service - run well under Linux - more standards-compliant than some of the big-name CORBA products - under GPL free.

Jorba
    Jorba is a CORBA implementation completely  in Java - includes the ORB, DII, DSI, and an IDL compiler -  states that this is alpha-level code, with many functions missing -   provided in source form under GPL.

CORBAPlus
    CORBAPlus from ExpertSoft - CORBAv2 - n Java - a Java IDL compiler, IIOP, DII, Any and typecodes. The licensing terms  unclear but freely available - LInus testing unsure - support contracts.

JavaIDL
    The JavaIDL is a  SunSoft's Java IDL compiler - a generic ORB core possibly run under Linux - requires porting ??. May require integration with an ORB core??

Jylu
    Jylu implements the Xerox PARC ILU CORBA core in Java - a Java IDL compiler - not talk IIOP, but does talk the ILU wire protocol (Sun RPC protocol??)..

Fnorb
    The Fnorb is an experimental ORB -  in Python - does not provide an IR (Interface Repository) - can use third-party tools for that purpose (such as ORBacus (OmniBroker)).

ROBIN
    ROBIN (RPC and Object Broker Interface)- a subset of the CORBAv2.1 spec. Supports an IDL and DII, does not currently support IIOP -  (data acquisition and control systems, including embedded computers).

DOME
    DOME from Object Oriented Technologies offers threading, callbacks, async operation, location brokering, as well as network monitors & tools. Strengths: runs on a large variety of platforms, and supports many different networking protocols. Weaknesses: -proprietary and non-portable. OOT offers a free version for Linux. Commercial redistribution appears to be prohibited, commercial in-house use appears not to be.(2)

Bionic Buffalo
    The Bionic Buffalo - basic ORB w/ C bindings- is a commercial product; A free version of the ORB, stripped of IIOP, is planned.
(1) <http://www.javaworld.com/javaworld/jw-10-1997/jw-10-corbajava.html>. Web. 15 Nov. 2011.
(2) <http://linas.org/linux/corba.html>. Web. 15 Nov. 2011.