Introduction

This guide assumes that the reader is familiar with the basics of distributed application programming: RPCs, RMIs, IDLs, and the various distributed computing standards such as CORBA and ONC RPC. Readers who are unfamiliar with distributed computing should review these terms before proceeding through this manual.

1.1 What is Flick?

Flick is a flexible and optimizing compiler for interface definition languages (IDLs). The name "Flick" is an acronym for "Flexible IDL Compiler Kit." Like a traditional IDL compiler, Flick can read a high-level specification describing an interface to a software component or module, and from that, produce special functions called stubs to implement the interface in the C or C++ programming language. The stubs implement remote procedure call (RPC) or remote method invocation (RMI) semantics and allow separate client and server processes to communicate through what appear to be ordinary, local procedure calls or method invocations.

Unlike traditional IDL compilers, however, Flick is implemented as a set of programs, each implementing a single phase of compilation. These separate programs allow Flick to support features beyond the capabilities of ordinary IDL compilers:

Flick is being developed as part of the Flux Operating Systems Project at the University of Utah. However, Flick is intended to be an open "kit" that others will extend and adapt for their own projects.

1.2 Comparisons With Other Object, RPC, and RMI Systems

1.2.1 CORBA

Flick is not a drop-in replacement for a complete CORBA ORB. Rather, Flick is an IDL compiler -- one part of a complete ORB -- that generates code that works in conjunction with an ORB runtime library. Flick comes with a lightweight ORB runtime for C language stubs (described in Section 4.2), and this runtime provides only what is required for basic CORBA communication. Most importantly, Flick's C language runtime does not provide any "CORBA services," nor does it implement the Dynamic Invocation Interface (DII) or the Dynamic Skeleton Interface (DSI), etc.

Although Flick itself comes with minimal runtime support, Flick can be used in conjunction with more complete third-party ORB runtime environments. For instance, Flick's C++ components are designed to generate optimized stubs that work with TAO, the real-time ORB from Washington University in St. Louis.1 In this case, you get the best of both worlds: Flick-optimized stubs and a complete CORBA development environment.

Flick provides interoperability, speed, and flexibility. Clients and servers that use Flick-generated stubs can communicate with other CORBA-based clients and servers through the Internet Inter-ORB Protocol (IIOP). Moreover, because Flick-generated code is optimized, clients and servers that use Flick-generated stubs can run faster than their counterparts that use stubs generated for other ORBs. Finally, Flick's kit architecture makes Flick suitable for a wide variety of environments. Flick can be used to generate code for TAO, or for its own minimal CORBA runtime, or for Mach, or for ONC RPC -- in short, for any environment for which there exists Flick compiler components.

1.2.2 ONC RPC (a.k.a. Sun RPC, rpcgen)

Just as Flick is not a drop-in replacement for a complete CORBA ORB, neither is Flick a drop-in replacement for Sun's rpcgen program, the widely available compiler for the ONC RPC IDL. Flick-generated stubs can provide the same interfaces as those produced by rpcgen; further, those stubs can produce the same on-the-wire messages. But inside, Flick-generated stubs are very different than their rpcgen-generated counterparts. Flick does not, for example, provide an interface to XDR streams like those used by rpcgen-generated stubs. Flick does not provide the full ONC/TCP runtime. Rather, Flick implements the minimum "stuff" necessary for the top-level interface to ONC-style RPC.

So why use Flick instead of rpcgen? Performance! Flick-generated stubs are interoperable with rpcgen-generated code, but can encode and decode messages up to 17 times more quickly. ONC RPC clients and servers that make use of the high-level RPC interface, and not the lower-level interfaces offered by the ONC specification, can generally be recompiled or relinked without modification to use Flick-generated stubs, and thereby achieve greater network throughput.

1.2.3 Mach and MIG

Mach is a microkernel-based operating system that makes extensive use of IPC. The IDL compiler that creates client/server communication code for Mach is called MIG, the Mach Interface Generator. MIG is tightly integrated with its target language (C) and the Mach operating system. Flick supports nearly all of the presentation and transport features that MIG offers for Mach-based communication. In addition, Flick supports other IDLs to define Mach client/server communication over Mach ports, and this means that Flick supports notions that MIG does not: for instance, complex data types!