Opened 12 years ago

Last modified 6 years ago

#424 new enhancement

RPC/IPC generator — at Version 1

Reported by: Jiri Svoboda Owned by:
Priority: major Milestone:
Component: helenos-infrastructure Version: mainline
Keywords: gsoc13, gsoc14, gsoc15, socis15, gsoc16, gsoc17, gsoc18 Cc: Jiří Zárevúcky
Blocker for: Depends on:
See also:

Description (last modified by Jiri Svoboda)

In the majority of cases we have converged to using IPC as a means of performing remote procedure calls. We 'trivially' wrap IPC communication into a C API. There is a lot of repetitive effort associated with writing such code, which could be automated.

We should introduce a simple interface definition language and generate the IPC code from that. An interface definition might consist of:

  • interface name
  • optionally list of interfaces that we accumulate/extend
  • list of methods (calls)
  • list of events (callbacks)

A method or event declaration shall have:

  • a name
  • return type
  • list of input and output arguments (and their types)

The allowed types depend on the level of sophistication of the implementation and can range from simple (integer) to more complex (string, struct, array).

By compiling an interface definition we would obtain a set of C+header files containing:

  • enums declaring method and event codes
  • typedefs encapsulating the interface instance for server and client
  • method and event ops structures
  • method and event dispatcher (switch statement) - on the called side
  • method and event call marshalling functions - on the calling side
  • method and event call unmarshalling functions - on the called side
  • code to set up and tear down the interface (mainly the callback session)

Change History (1)

comment:1 by Jiri Svoboda, 12 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.