sprink951 / busybus Goto Github PK
View Code? Open in Web Editor NEWThis project forked from lubing521/busybus
Lightweight, simple and portable message bus and IPC system for embedded Linux.
License: GNU General Public License v3.0
This project forked from lubing521/busybus
Lightweight, simple and portable message bus and IPC system for embedded Linux.
License: GNU General Public License v3.0
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 <[email protected]>
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.