So you are proposing to implement the D-Bus protocol in Scheme directly, instead of writing a Scheme wrapper for a C library that can talk D-Bus? In general, I would say this makes sense only if you need to send and receive complicated Scheme objects over the D-Bus link. For example, the mpi egg is a simple wrapper around the OpenMPI C library, because I only needed to send/receive homogeneous numeric vectors, and those are well supported by the Chicken FFI. But if I needed to send/receive Scheme closures (for example), then I would either have to use the s11n module and serialize the closures to bytevectors, which is not very efficient, or invent some fancy Scheme communication protocol that allows me to send and receive such objects.
From your description, it is not entirely clear what those s-expressions contain -- whether it is "simple" data, such as numbers and strings, that can easily be represented in C, or whether it is some complex structured data that S-expressions are best at representing. If the former, you might save some time by writing an FFI wrapper. If the latter, then a Scheme implementation might be better (and way cooler :-). -Ivan john <[EMAIL PROTECTED]> writes: > I have not had a chance to properly think this idea through yet but > thought I would throw it out to the lions (chickens) for some > feedback. > > In a mobile client application I am developing I currently embed > Chicken into Gtk+. The client communicates with 2 servers. One > connection uses plain s-expressions the other uses binary encoded > s-expressions. This works fine but does add complication to the > client. > > In the embedded Linux world D-Bus seems a popular inter-process > communication tool (http://en.wikipedia.org/wiki/D-Bus). > > So I was wondering if it is feasible to develop some kind of > s-expression based daemon which talks D-Bus. The Gtk+ client(s) can > then talk dbus to send/receive data. The s-expression daemon mux's the > communication to external TCP servers using s-expression based > protocols. The client will then not need to have Chicken embedded and > can use the in-built D-Bus features of glib. Ideally the s-expression > mux'er could be configured to switch between binary and text encoding > depending on requirements. Or even perhaps throttle traffic or try and > limit costs over an expensive mobile link. > > So any feedback on the idea appreciated, > > John. _______________________________________________ Chicken-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/chicken-users
