L4Re: C++ or DICE for IPC

Norman Feske norman.feske at genode-labs.com
Thu Feb 24 10:06:55 CET 2011

Hi Valery,

> Ada is nice, but what if no OOP exist in the language at all, like in plain C? A
> combination of C with IDL was good enough to use.
> So, Genode is using a dynamic IPC marshalling too? But I also see a 
> "Liasis RPC stub-code generator by Stefan Kalkowski" in the Genode wiki, 
> so maybe, a mixed approach can be used too...

Indeed, dynamic RPC marshalling was motivated by and first introduced
with Genode (back then called Bastei). On Genode, we use to define each
RPC interface using an abstract base class. This class is inherited by
two classes 'client' and 'server'. The 'client' class implements the
client-side RPC stubs by implementing the abstract interface. The
'server' class implements a server-side 'dispatch' function that calles
the abstract functions. The 'server' class is further inherited by a
'component' class that implements the actual server semantics (the
functions declared in the abstract RPC interface). This way, interface,
marhalling code, and server semantics are well separated. Furthermore,
for client code working with the abstract RPC interface class only, it
becomes transparent whether it is using a remote or locally implemented
service. Liasis meant to automate the task of implementing the 'client'
and 'server' classes by parsing the abstract RPC interface and
generating the marshalling code. However, we never started using it in
practice because we figured that maintaining the 'client' and 'server'
stub codes manually is actually not as cumbersome as we expected. ;-)

> Is Liasis publically available and ready? or maybe, some other RPC stub
> generators exist? -- I used Fiasco with DICE and L4env, now L4env and DICE
> are discontinued. Maybe, other RPC stub generators/IDL compilers, compatible
> with Fiasco API, exist?

In my opinion, throwing an IDL compiler at the problem of interfacing
components in a microkernel-based system is a misconception. I guess the
original line of thought for doing this was "A multi-server OS is some
kind of distributed system, isn't it? What do the distributed-systems
guys use to communicate? CORBA, IDL? It works for them, so it should
work for us, too." However, this argument discards the fact that
communication partners in a microkernel-based system operate on an
entirely different abstraction level. The interfaces of such components
are as low-level as the system-call interface of a monolithic kernel
because those components address very similar concerns. No one argues
that such a system-call interface is tied to one particular systems
language. It is just common sense to use one particular language (mostly
C) for this purpose. When going to up to application level, there are
established frameworks for inter-component interaction that could be
used in a microkernel-based system via an additional level of
abstraction (e.g., virtual network interfaces).

In retrospect I consider the decision of taking the IDL compiler out of
the loop as a big success for Genode. It boosted our productivity by a
wide margin and eliminated a source of constant trouble.


More information about the l4-hackers mailing list