Re: IPC mechanisms under Linux



Wellu wrote:
Hi all,

I'm trying to develop a system for Linux platform that consists of
several different parts. Firts of all there would be Engine part that
listens for incoming messages or events. Then there is several modules
that are controlled by this Engine. Let's call these merely Modules.
Modules could then call other APIs or create processes. Once Module is
done it returns and Engine knows that particular Module is done
processing. There can be several modules (e.g hundreds) running at the
same time so everything is asynchronous. At the same time Engine can
get new messages from upper levels using some IPC mechanism. For
example there might be message saying "Pause Module 1 for 10 secs" or
"Run Module 10 again" Modules could also send messages to upper levels
(e.g by calling simple API) and wait for responses. So, all in all
Engine must listen to events from Modules and from upper levels.

Engine and Modules run in the same machine and programming language
would be C.

Since the Engine part would mostly wait for messages and/or events (where's the difference?), I'd say the standard networking API would be appropriate, select/poll thrown in to aid in keeping the lid on the zoo of connections.

As for truly asynchronous events (e.g. the pausing and resuming of a Module), signals could be used, e.g. SIGTSTP and SIGCONT.

Just a few ideas from

Josef
--
These are my personal views and not those of Fujitsu Siemens Computers!
Josef Möllers (Pinguinpfleger bei FSC)
If failure had no penalty success would not be a prize (T. Pratchett)
Company Details: http://www.fujitsu-siemens.com/imprint.html

.



Relevant Pages

  • Re: IPC mechanisms under Linux
    ... listens for incoming messages or events. ... Engine must listen to events from Modules and from upper levels. ... Posix message queues, ... For signalling, you can use ...
    (comp.os.linux.development.apps)
  • IPC mechanisms under Linux
    ... listens for incoming messages or events. ... that are controlled by this Engine. ... At the same time Engine can ... "Run Module 10 again" Modules could also send messages to upper levels ...
    (comp.os.linux.development.apps)
  • Re: misc, pointless: physics api
    ... >> internal redesign of an engine). ... > C++ will give you a much cleaner API. ... >> axis, and the cross-products of each pair of axis). ... >> collision occures and the base axis miss it...). ...
    (comp.games.development.programming.misc)
  • Re: [PATCH 1/2] utrace core
    ... the API. ... Engine which is not attached is either just allocated or scheduled ... talking about the "user of utrace" code.) ... This "mystery" is addressed in the comments and the documentation. ...
    (Linux-Kernel)
  • Re: games and game-engines
    ... term "game engine"? ... the graphics API will be only 1% of the code so it ... For example if you want to load a texture you must first check ...
    (comp.graphics.api.opengl)