Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is a good open source message bus for embedded Linux?

I'm looking for a good open source message bus that is suitable for embedded Linux devices (Linux and uClinux).

It needs to satisfy the following criteria:

  • Must be free software and LGPL or a more liberal license due to uClinux only supporting static linking
  • Must have a C API
  • Must have a relatively small footprint and not depend on third party libraries
  • Must be compatible with Linux/uClinux 2.4.22+
  • Should be well tested and preferably have an existing test framework set up
  • Should have a well documented protocol
  • Should be portable to other platforms

The message bus would primarily be used by applications on our system in order to communicate configuration parameters etc so it doesn't need to satisfy realtime requirements.

like image 460
David Holm Avatar asked Nov 21 '08 14:11

David Holm


4 Answers

There's D-Bus. It runs in userspace. It generally requires a daemon though (but maybe you could just have processes specifically connect to each other rather than going through the central daemon).

like image 176
Reed Hedges Avatar answered Oct 19 '22 11:10

Reed Hedges


It all depends on your architecture. Are you intending to message across a backplane to other nodes in a cluster, or is this all within a single node, but in different address spaces?

If the latter, then like carson said: man mq_overview.

If the former, then look first to your embedded linux vendor. Many vendors will provide some sort of distributed messaging library. Failing that, take a look at 0MQ or the MPICH2 MPI library.

Update: I should add, too, that much of my last year was spent writing just such an API for a distributed processing framework, and I can tell you that POSIX-compatibility is worth retaining. Use POSIX message queue if at all possible.

like image 21
Ben Collins Avatar answered Oct 19 '22 10:10

Ben Collins


This sounds like a good use for SYSV or POSIX message queues. They can meet all the needs you have listed. POSIX are newer so they won't match the Kernel requirements but SYSV is in the older Kernels.

like image 38
carson Avatar answered Oct 19 '22 10:10

carson


If you mean IPC, socket works fine for uclinux.

like image 34
plan9assembler Avatar answered Oct 19 '22 10:10

plan9assembler