Wednesday, October 7, 2009

DBus API x DBus Specification

With the BlueZ meeting over and the suggestion made by the developers it seems we had made some very good decisions while designing the BlueZ 4.x. There has been some talks regarding this before, specially regarding round trips which have a very bad impact in performance, but I never really saw anyone commenting about using DBus as the only API. So how different it is to design a Specification to an API? Well lets start with a Specification:

DBus Specification

It is almost as defining a protocol over DBus, so its documentation normally define the data types, how they should be interpreted and so on. This directly reflect both in the server and in the client code, since the specification may define its own data types this is no longer only about DBus, but sometimes a real stack over it (see telepathy or NetworkManager).


- Easy to adapt, specially when the applications involved share the same libraries.
- Very efficient, it doesn't depend on DBus 'native' types it is easy to avoid round trips and heavy use of bus.


- Very hard to test and document, introspection may become meaningless in some cases.
- Extra build time dependencies may be required
- The more heterogeneous are the applications the worse it will be to maintain.


It is almost the opposite, it only uses DBus native data types, so the introspection data is normally enough to the developer to understand how to use the API (or not :D). As opposed to an specification the documentation might be very simple, actually this seems quite natural to me as one can use d-feet to explore it became quite easy to understand and test.


- Easy to test and document
- No extra build time dependency
- When done right can make use of args in matching rules


- Not so efficient as it may require some extra round trips or signals.

As you can see DBus can be used in very different ways, while an API is probably more suitable for system daemons, where the use of complex data types makes it difficult to became adopted by the various languages/toolkit as it may generate language/toolkit specific bindings where the maintenance become a nightmare, in the other hand a specification may fits the needs of applications that want to exchange very specific data where the applications interested in the data are probably part of the same package/solution and share the same dependencies/libraries.

Friday, October 2, 2009

Europe trip

Here Im in Germany, Stuttgart to be more precise, for BlueZ meeting and UPF. Meeting already started and we will probably make the notes available here: I will comment about the meeting latter on when I got some time.

UPF will be starting next week, oct 4th to 8th, and since this is my first time attending to such event I think there will be a lot of things to blog about, and finally after all the fun with bluetooth/BlueZ I will be heading to Amsterdam for the Maemo Summit where I will be participating on the BlueZ bof.

Thats it for today :D

Thursday, September 24, 2009

Bossa '10: Call for Presentation

For those interested in presenting something at bossa conference please follow this guidelines:

Monday, April 20, 2009

GSoC 2009

BlueZ was accepted as a organization in 2009 and granted with 6 slots (+1) on GSoC, we got a total of 37 proposals where just 2 were considered ineligible, and here are the projects as well as the students which will take part of program this year:

Student: Claudiu Coman
Mentors: Vinicius Gomes
Title: Generic HID

The idea is similar to remoko, which was part of last year GSoC program under openmoko organization, but aiming to be more generic and done as a plugin to bluetoothd.

Student: João Paulo Rechi Vita
Mentor: me
Title: A2DP Sink Role

Joao is back, he did the PulseAudio integration with bluez audio subsystem, but this time doing some work on the bluetoothd but not restrict to it since we want the plugins (alsa, PulseAudio and eventually gstreamer) too. Most of the code for avdtp/a2dp is already done so just small changes are really needed on bluetoothd, now for the plugins is a completely different story since the receiver can be a lot more complicated then the sender and sbc decoder is not as tested as the encoder.

Student: Gustavo Padovan
Mentor: Marcel Holtmann
Title: L2CAP Enhanced Retransmission Support

Marcel himself is going to mentor Gustavo which already started doing some code for either kernel and userspace. This is an optional L2CAP feature, that allows more control of the Error Rate and more information about the data flow, very useful for audio streaming.

Student: MO Faruque Sarker
Mentor: Claudio Takahasi
Title: A One-Step Bluetooth Device Setup Wizard Using 2D Data-matrix symbol

Very interesting and promising idea, very suitable for smart phones where cameras are very common. It can probably be used (or reuse) for other stuffs like cable association, so the devices doesn't need to stay on discoverable mode to be paired.

Student: Nehul Malhotra
Mentor: Claudio Takahasi
Title: SIM Access Client

SIM Access profile is one of the few profiles BlueZ has no support so far.

Student: Yasir Khan
Mentor: Vinicius Gomes
Title: Wireshark live capture integration

The idea is to have Wireshark fully replacing hcidump so we can really make use of wireshark for development.

Congratulations to all students.

Sunday, March 22, 2009

Bossa Conference ‘09

Bossa '09 was great, a lot of good old faces around but also some new 'troll' faces. For those that missed any presentation we plan to make them available here or subscribe to the RSS feed here.

Here are some of the available presentation that I recommend:

Elementary – small, scaleable touchscreen widget set for mobile devices - Rasterman

Making videoconferencing easy, also in your application - Olivier Crete

The future of Qt - Thiago Macieira

Friday, November 7, 2008

Jack of all trades, master of none

Pau pra toda obra (Brazilian Portuguese)

Aprendiz de todo, maestro de nada (Spanish)

devyni amatai – dešimtas badas (Lithuanian language)

Well, that is what reminds me some of so called portable/platform independent software we have around Linux environments. It sounds amazing specially in Brazilian Portuguese (literally, "wood for every construction") doesn't it? Just as in as it can be used in many platform a thing not even Office could do, so you can edit proprietary formats in many platforms including on the very own proprietary ones, really exciting don't you think?

When it comes to cross-platform everybody is interested, like recently from Linux userspace key Developers Aaron Seigo and Christian Schaller there was even a dispute between Phonon and Gstreamer where multi-platform shines like a popstar. Great so I can use Phonon with some proprietary framework on Windows or even better use Gstreamer as even it does work on windows too.

Oh, lets not forget Mono, the rockstar of the cross platform, wood for every construction even for those constructions that doesn't need wood, just a snake.

Sunday, September 21, 2008

plumbers conference

LPC was amazing, I might say it was the best conference I've attended so far. Im not a kernel hacker as someone may thought but even a userspace developer can say that we need more conferences like that. Let me summarize some talks/bofs I've been present at:


Lennart handled the audio miniconf which turns out to show how some alsa limitations, especially in its API documentation. The conclusion was that there are far too many project trying to solve but none offer a good pcm API which application could rely on. The audio bof was basically Lennart making sure Takashi know his alsa issues list. In addition to Lennart's list we also told Takashi we would like to have support for 'virtual' devices such as bluetooth headsets.


Video miniconf was very interesting too, most about v4l2. In the driver area it seems that some common code is being duplicated so there is a plan to create an API to be used as core of new drivers. But for me the most interesting was the idea of user space daemon very similar to Pulse but for video which should solve most of the problem when trying to use a webcam on user space.


WOW I must say this miniconf was the big show of the conference, at least for me, the very first thing was a netbook booting on 5 sec. If there is something that can grab the attention more than a fancy ui demonstration that is a very amazing boot time. Im pretty sure that this presentation might change what most distros are doing nowadays, especially when the super read ahead (sReadAhead for short) code was released.

Power Management

Another pretty good minconf, olpc guys showing how they handled power managment on their device. Basically XO doesn't have an acpi so all is handled directly, sometimes they even turn off some chips to gain more hours of usage. In another presentation it was discussed that the more drivers support power management the more we salve power, although this may sound very obvious the real idea is to make more drivers power aware instead of just quality of a few.


Ok, that is my area, and as all the other it went pretty well. It started with discussion how to improve desktop experiency. Basically how DBus is changing the daemons around the linux desktop offering a better support/service to applications. Then the presentation about upstart 1.0, it was pretty cool to see the API for jobs on upstart, this might be usefull for most application/daemons that do want to spawn processes. After a small interruption the presentation continue with Marcel Holtmann talking about DBus on kernel, the reception of the audience was very good with few concerns, the fact of upstart requiring DBus to be started early during boot process may make the idea even more compelling than before.

10/10 for LTC

Next, BlueZ meeting.