Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
DISCONTINUED - https://github.com/zeptobus will be an indirect continuation of this project
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
bin
include
lib
test
.gitignore
Doxyfile
LICENSE
Makefile
README
TODO

README

        Busybus ALPHA (development in progress)

What is it?

  Busybus is a lightweight, simple and portable message bus and IPC system
  for embedded, Linux-based systems. The main objective is to create an
  intuitive, easy-to-use and small message bus using binary data marshalling
  without any external dependencies other than a standard Unix-like C library
  (glibc, eglibc or uClibc). It shall work out-of-the-box - ie. server daemon
  bbusd will be fully functional without any kind of configuration files - just
  simple command line options will suffice.

Why busybus?

  Having D-Bus on small flash-based embedded systems is often overkill. Other
  than that there are no many alternatives. There is ubus, but it's
  integrated with OpenWRT, there's abus, but it uses JSON for serialization
  and there's embus, but it doesn't seem to be actively developed and it
  doesn't offer much functionality either.

Is it ready?

  Not yet - right now I'm working on an initial alpha version of this program,
  which will act basically as a working proof of concept. Once a working
  version is ready I will try and get some attention on various mailing lists
  and open-source focused websites.

Compilation and installation:

  This will probably change, but for now it's a simple 'make all' in order to
  build the libbbus.so library and all the binaries. Additionally there's
  the 'make test' command, that will run the test suite located in the test/
  directory. For more info just type 'make help'.

  There's no installation procedure for now - just make sure your loader can
  locate libbbus.so and put the binaries where you like.

  It is already possible to view partial documentation - just run 'make doc' to
  generate html, TeX etc. output from doxygen comments in the API header file.

How easy is it?

  Here's an example of a simple user session - a program connects to the server
  and calls a method (error checking has been left out).

    bbus_client_connection* conn;
    bbus_object* arg;
    bbus_object* ret;
    char* retstr;

    conn = bbus_connect();
    arg = bbus_obj_build("s", "Hello world!");
    ret = bbus_callmethod(conn, "bbus.bbusd.echo", ret);
    bbus_obj_parse(obj, "s", &retstr);
    printf("%s\n", retstr);
    bbus_closeconn(conn);
    bbus_obj_free(ret);
    bbus_obj_free(arg);

  Example echo method implementation on the service provider side:

    static bbus_object* echo(const char* UNUSED method, bbus_object* arg)
    {
            char* str;

            bbus_obj_parse(arg, "s", &str);
            return bbus_obj_build("s", str);
    }

    struct bbus_method method = {
            .name = "echo",
            .argdscr = "s",
            .retdscr = "s",
            .func = echo
    };

    bbus_service_connection* conn;
    struct bbus_timeval tv;

    tv.sec = 0;
    tv.usec = 500000;
    conn = bbus_srvc_connect("some_provider");
    bbus_srvc_regmethod(conn, &method);
    while (bbus_srvc_listencalls(conn, &tv) >= 0);
    bbus_srvc_closeconn(conn);

  Functions used by bbusd are a bit more complex, but user programs don't
  even need to look at them.

Questions and suggestions => Bartosz Golaszewski <bartekgola@gmail.com>

Something went wrong with that request. Please try again.