Wednesday, December 15, 2010

I'm back. (Hopefully) For good.

Hi, everyone. It's been a long, long time since I posted something. I'm sorry for that.

Well, a couple of things happened in recent times:

1) I've finally met my fellows of kde-br. We had such a good time at Natal (RN) in the III KDE Forum - Northeast Edition (within IV ENSL). My talk was about GSoC, KDE, how to get involved, etc. It was pretty cool. My intent for the next events is to talk about more technical stuff (e.g. an introductory Solid tutorial or something like that)

2) Google funded me (thanks, Carol!) to attend Google Developer Day at São Paulo, and it was awesome. There were excellent talks about Android, Google App Engine, Cloud Computing, etc. Unfortunately, it lasted only one day.

3) I've got a partial-time job as a teacher (yes, who could tell?) in a city nearby (about 180km), called Patos. I'm lecturing two subjects: OO (with Java :p) and something like AI. It's being really nice, actually. Teaching is the better way to learn. :)

Well, that's the good news. The bad news is that my masters work is kind of stuck and it will take a few more months beyond the expected. I'm really not happy with that, believe me. From January on I expect some real progresses on this matter.

Other bad news I have to tell is about my Solid backend (UPnP). Seems like KDE is crashing because of something related with UPnP (yes, guys, I saw the bug reports, just a little bit of patience ;) and I'll investigate this ASAP (my KDE trunk install is really messed up). Actually, I've decided to change the whole underlying layer of UPnP backend. Currently, it's using a library called HUPnP. I've decided to change this library and replace it for another Qt-based UPnP stack called BRisa. In a few days I'll post another blog entry explaining my reasons to do that. Sadly, this change only will be seen in the 4.7 release, since the 4.6 branch is frozen now and the monthly releases are for bugfixes only.

Back to the good news, I'm intending to get back to the KDE work this weekend and address the bugs reported (btw, thanks to the ones who did it). I will try to manage my time properly from now on, I swear. :p

See ya.

Monday, October 25, 2010

H4ckb33r

Hey, it's been a while... This post isn't actually related with KDE, but I found interesting to share the experience of the first sprint-like event that me and some FOSS-enthusiast fellows organized. We called it the H4ckb33r. Pretty obvious name, right? At least for code and beer lovers like us...

The only KDE running at the place :-((

andredieb sleeping with his beloved N900

Unfortunately, we wasted some time trying to share a 3G internet connection. Besides, the rain in João Pessoa didn't help so much to make the work start right on time. We had all things set up by 1 p.m. It's a bit late for a one day-only event.

Well, the main goal was to get started with Git development and develop something using it. To warm up, we improved our IRC bot, making it plugin-oriented and adding some dumb funcionalities. After that, we had lunch (chicken FTW) and some basketball (yeah, geeks can do sports, too ;-).

daniloqueiroz, thiagoss, vitoravelino

diofeher, me, vitoravelino

So, once the repository was ready we needed something to develop (we really should thought about this earlier) and after a loooong time discussing was decided we could have a web-based tool to help organizing the next h4ckb33r's. This tool would keep a ranking of candidate projects to work into, a "who bring what" system, etc. Due time, we couldn't get out of there with a working version, sadly. I believe soon we will have it running over Google App Engine.

Besides the rain and logistical problems, we had a great time. Hope to see more people (and more code) in the next editions. :-D

To the gran finale, check out all the soccer skills of participants:


I'd like to thank daniloqueiroz for hosting all these geeks at his home and also all participants. Looking forward to the next H4ckb33r! You can see us at #ufcg @ Freenode.

Cheers.

P.S.: Soon I'll be posting some news about Solid UPnP backend...

Sunday, September 19, 2010

Farewell, Spain. Hello, São Paulo.

Sad, sad. My passport won't be ready until the Solid Sprint date, so I'm not coming anymore :-(. Now my plan is to participate remotely somehow (afiestas said they will try to stream the sprint, let's hope so). I know it's not the same, but I can buy some beer and do some hacking from here, I guess ;-).

Anyway, you can bet I'll have this god damned document soon, so Desktop Summit, here I go (first I need a job or something, but there is time until August :-)!

BUT, everything isn't lost yet. Last week I got an invitation to the Google Developer Day, at São Paulo. I got some help to the flight tickets, too (sometimes I wish Brazil couldn't be such a big country!). Quite good for a consolation prize, right?

So, this week we'll have the the workshop of masters and PHDs thesis at my university. I believe next weekend I get back to the work on the UPnP backend, finally.

Oh, and the Software Freedom Day here yesterday was really awesome! Congratulations to all involved!

Well, that's all for now.

Hail.

Wednesday, September 15, 2010

Solid Sprint at Madrid

Hey,

Seems like all the budget submitted to KDE e.V. for the Solid Sprint was approved (yay!). Looking forward to meet some of the metalworkers in person, but there is the possibility of I'm not attend because I've never traveled outside Brazil and guess what? I don't have passport (damn it!). I've asked at the local federal police office to emit it, but these things often take a while here, and I'm afraid that it will not be ready until the likely day for me to travel, September 29th. Let's pray. I'll try to push the guys to hurry up.

See ya.

Wednesday, September 8, 2010

Pong

Hey, all.

If you're wondering about the Solid UPnP backend state after the end of GSoC, here I am to satisfy your anxiety. :-p

Well, there is not so much to update, sadly. I've fixed some bugs on IGD and updated the code to be compliant with the most recent version of HUPnP (thanks, Nikhil).

The reason for the little flow of work has name, but no title: masters thesis. I have a workshop coming and really have to rush with this stuff. But I'll do my best to keep all the things running fine in parallel. :-)

That's it for now.

Cheers.

Sunday, August 22, 2010

emit remmus

This was a really cool summer. Actually, a really cool winter, since I live in the southern hemisphere (Brazil, for those whom don't know already). I believe that the most cool thing on this GSoC for me was finally get involved in the community, know the people behind and contribute with the KDE project after about 5 years using it. I'm really glad to see lines of code written by me in the tree and looking forward to do more cool stuff from now on.

As a not so much experienced Qt/KDE developer, I had some problems on the way. However, I think I can say that the basis for a consistent UPnP support on KDE is ready. Obviously, there is more things to do and refine, and I'm happy with that, because it means that I'll keep working with Kevin and the others 'metalworkers' :-D.

Today we have a nearly full media server support on Solid and the KIO slave developed by Nikhil with the Amarok people will help to get UPnP media servers available for browsing on Dolphin, for instance. As you can see, they are already appearing in the kfileplaces KPart (and in the device notifier as well). This is the actual user-visible part:

We have some IGD support, too. Given an UPnP router available, it's possible to add/remove port redirects (and other vendor-optional operations, like toggle the internet access in the router):

Solid::Device dev(deviceUdi);
Solid::InternetGateway *igd = dev.as();
igd->addPortMapping("192.168.0.1", 80, "TCP", 80, "192.168.0.136");

The API needs a little bit of refinements, but I think we are on the right way. My plan is to add more operations in the API soon and integrate the IGDs within the network manager.

So, what about the plans for the future? Well, along with the IGD integration, a debug app using BRisa framework and a plasmoid showing the UPnP neighborhood are intended, too. In the future, my desire is to implement other UPnP devices, like printers and media renderers. The HUPnP library (used in the project) need some adjustments, too. So, work is not lacking here :-). I'll keep you posted about how things are going here in the blog.

Finally, I want to thank Kevin Ottens, my mentor, for the support and patience in the past 3 months. I'd like to thank Bart Cerneels, Nikhil Marathe and Tuomo Penttinen, too, for the help, feedback, and hints. Honorable mention to Lydia Pintscher and Leo Franchi, the SoC managers. Thank you all, guys, you rock!

Oh, almost forgot. There will be the Solid sprint soon, in Madrid. Don't know if I will can attend in person, but I'll participate somehow. Looking forward to meet the Solid people personally and put some faces in the (nick)names. :-)

Cheers.

Friday, August 6, 2010

Moving out

Hello, all. This will be a quick (and late) post.

Oh, hell, I'm moving out the apartment. And it sucks. Really sucks. This week I've been pretty busy taking care of the process and stuff. My masters advisor also had an epiphany and asked me the first two chapters of the thesis. The work didn't flow much well this week. :-(

On Sunday I intend to keep you up about the integration of the Solid UPnP backend with Dolphin and Plasma Device Notifier. The pencils down date is approaching... May god (or anything similar) have mercy on my soul. :-p

See ya.

Sunday, July 25, 2010

(GSoC) And god said: "Let there be an Internet Gateway"

Hi, all.

Last week I said to you that HUPnP did not recognize UPnP internet gateway devices in the network. Now I think I can say it used to not recognize. :-)

Seems like Tuomo's patch fixed the problem and now the Solid UPnP backend is able to "see" my wireless router and finally invoke the UPnP actions available on it (like to do some port redirect and toggle the internet access, for instance). I have made some tests and seems like the action invocations are working well from the HControlPoint instance in the UPnPDeviceManager. Now it's time to refine the API and add more operations, probably.

However, "the world is cruel". This week Nikhil and Bart pointed to me and Kevin some problems with the media server stuff. Besides some mistakes on the HUPnP use from my part, seems like there is something wrong with the creation of the UPnPDeviceManager. According to him, due to the use of a QThreadStorage on the backends manager, a new HControlPoint is created for every thread using Solid, causing some inconsistent results. The expected behavior is only one control point across Solid stack (frontend -> iface -> backend). I'm working on the backend part, but the Solid thread-affinity stuff I prefer to let the more experts metalworkers to decide what's better.

Another thing Nikhil opened my eyes is about that I'm not running KDE trunk (I'm using that script development strategy from Techbase). I know, it's a blasphemy and I will build and use the SVN trunk ASAP. My unit tests are not enough and I need to do real system tests.

Well, I really hope this week to get the backend working fine to go into the little desktop integrations and the debugging app using an UPnP framework developed by some fellows here in the lab, called BRisa. I have to run a little bit with the schedule.

See ya.

Sunday, July 18, 2010

No, I'm not dead ;-)

It's been a while, right? Sorry for that. I'll try to post here once per week from now on, I swear.

Well, since my last post some things happened. Let's see... I've got a motorcycle. And I've got a motorcycle accident. My left arm is not so good but I will survive :-). I've began to write my master thesis, too. But I'm not here to talk about me, but about my GSoC project.

The midterm is gone now and Kevin granted me a "passed" status :-D. This is a motivation, indeed. About the work: I've implemented the media server (Solid::Backends::UPnP::UPnPMediaServer) and internet gateway (Solid::Backends::UPnP::InternetGateway) classes. The media server implements the Solid::DeviceInterface::StorageAccess interface, with the idea of treat UPnP media servers as remote folders or something like that. Actually, you can think in a media server as a remote pendrive, with some media there. The internet gateway (could be a router, an ADSL modem, etc.) implements an interface made by me to these kind of devices, so it can and will be improved with the time, since the actual API is pretty bounded with the UPnP forum specifications, and it is exactly what we can avoid in Solid (flexibility is the law).

I've made some unit tests with the media server and seems like the things are fine. Actually, Nikhil's work in Amarok will tell what we could improve on that part. Using the HUPnP library, the backend is able to detect UPnP devices available on the network, as you can see here.

The IGD tests are kind of stuck, because HUPnP has some problems in detecting UPnP internet gateway devices. I've been trying to test with two wireless routers, but without success so far. I'm in touch with Tuomo (library's author and maintainer) and in this afternoon we spent a good time debugging HUPnP and talking about heavy metal :-p. Looks like he figured out what is going on and will patch the library ASAP.

The next steps now is keep working in the IGD issue and in parallel work at the device notifier integration (at least with media servers). I'm having some difficulties in understanding the device notifier code, but nothing that we can't ask, right? :-)

Well, that's it for now. Next Sunday I'm back here. With a good arm. I guess...

Cheers.

Monday, May 31, 2010

GSoC Code Week #1: Prologue

Hello, KDE planet! :-)

I'm a little bit late with this post, but finally here I am. And for those who are not aware of my project, just read this post. ;-)

Well, last week was my first coding week on this GSoC and as a pretty newbie KDE developer I had some problems with some noob stuff like cmake, dependencies and these kind of things, but I think that I'm close to solve it all. As I said to Kevin (my mentor), I'm a Java programmer who knows some C++/Qt, but I can say that I'm having some progresses at all.

Right now I have a general class which represents an ordinary UPnP device, that I called Solid::Backends::UPnPDevice (pretty obvious, right?). I've implemented a control point too, through the Solid::Backends::UPnPDeviceManager class. My intent is to get able to list the available devices ASAP. I'm with some linking problems (here are the newbie problems again) with HUPnP, but Nikhil Marathe (who has a related GSoC project with the Amarok people) gently offered himself to help, and very soon I'll be in touch with him. :-)

Since the main library used by my project (HUPnP) is under some license incompatibility (it uses GPLv3) with the rest of libsolid (LGPLv2), I've not committed anything yet, but soon I'll do it and disable the backend of the builds and distribution, to avoid any license crime. Tuomo Penttinen, the HUPnP creator and maintainer is aware of it and is planning to change the license in a near future.

Well, that's it for now. As soon as I can list the available UPnP devices I could post some screenshots here, right? People really like screenshots :-).

Regards.

Tuesday, May 18, 2010

GSoC: Discovering Solids

Hello, all. It's been a while since my last post, but here I am to update you about my progress with my Google Summer of Code project (explained here).

Well, this community bonding period aims to get students aware of technologies involved on the projects, documentation and, of course, the code. Since I'm pretty new with Solid, Kevin told me that a Techbase page explaining the libsolid architecture would be a good exercise of my current understanding about the project. So, the document is ready and the Techbase page will be up as soon as I discover how to create one. :-D

Besides that I've decided to put it here too, for the posterity and, of course, for any feedback you can give me. Any comments would be really appreciated. It's really simple and small, as you can see right below.

Cheers.

--

Solid (kdelibs/solid)

The KDE 4 provides seamless hardware integration through Solid framework. Using its API, developers become able to easily write applications with hardware interaction features, through a hardware discovery layer which allows the detection and use of devices regardless of operating system or architecture.

Solid was implemented using a frontend/backend approach aiming portability among platforms like Linux and Windows. The frontend provides the high-level API for developers using Solid and backends deal with the specific hardware issues for the different platforms.

Frontend View

The frontend classes provide the API for developers and are also wrappers for several kinds of devices. All frontend clases are available in kdelibs/solid/solid.

  • Solid::DeviceNotifier
The device notifier is a singleton used to obtain information about the hardware available on the system. It provides to applications the unique entry point for hardware discovery and/or notifications about changes (with the use of Solid::DeviceNotifier::deviceAdded and Solid::DeviceNotifier::deviceRemoved signals). This class calls the following Solid::DeviceManager.
  • Solid::DeviceManager

This (private) class maintains the state of all devices currently available on the system. Through it is possible to get, for example, the list of all devices or a list of device matching with some criteria (using Solid::Predicate).

  • Solid::Device

This class represents a general hardware device. A device contains one or more device interfaces (capabilities).

  • Solid::DeviceInterface

A device interface represents a certain feature that a device contains. This class is on the top of the device interfaces inheritance tree. All specialized device interfaces implement it.

  • Specialized classes (Solid::Processor, Solid::OpticalDrive, Solid::Battery, etc.)

These classes actually represent the capabilities that a device can have. All classes extend Solid::DeviceInterface.

Backend View

A Solid backend deal with the platform-specific ways of handle devices. Developers using libsolid do not use the backend classes directly. Applications do it through frontend/wrapping classes in the Solid namespace.

All backends have to implement the interfaces in kdelibs/solid/solid/ifaces (namespace Solid::Ifaces) correspondent to its devices. These interfaces are the basics of which API a given device has to provide to the frontend classes.

UML Diagram

This diagram shows the relationships between the Solid frontend classes and the platform-specific backend classes (Foo backend example).

Saturday, May 1, 2010

Me, myself and my GSoC project

Hello, all.

I've finally aggregated my blog on the planet, and in this first post I'll talk a little about myself and my GSoC project for KDE. :)

Well, my name is Paulo, I'm brazilian and recently got my bachelor's degree on Computer Science. Now I'm a masters student at Federal University of Campina Grande, here in Brazil. I'm part of the Embedded Lab, where for years is made a lot of researching about pervasive computing and embedded systems, with publications all around and partnerships with big companies like the Nokia Institute of Technology (INdT) and Petrobras. In a later post I can talk about my current work on the masters course.

I begun to use Linux at the university, which gets the students involved with FOSS since the beginning of the Computer Science course. After my first glance on KDE (about 4 years ago or more) I've became an user and fan. Unfortunately I've woken up late for contribute to KDE, but before later than ever, right? ;)

So, back in 2009 I begun to study about the UPnP standard, since the Lab where I work has a quite active branch of research about UPnP (including the development of a framework widely used at Maemo community, called BRisa). Hence, in the last edition of GSoC I've applied for KDE, in a project proposed by Bart Cerneels which aimed to give UPnP support on Amarok. For my sadness at the time, the project was not accepted, but here I am now (yay!) and my project is quite related to that one: this year my intent is to work on the Solid backend (and frontend as well) for UPnP, and through it many KDE applications will have a transparent access to UPnP resources available on the network (MediaServers, MediaRenderers, InternetGateways, etc.). My mentor for the project is Kevin Ottens, from the Solid team (who is a very cool guy, by the way :).

The project will consist of two phases. In the first one the goal is to get the Solid backend working and stable, as well the wrapping side (frontend). For this first phase, the work of Friedrich Kossebau on the KUPnP backend will be taken as basis, and the tendency is that the UPnP library used will be the HUPnP stack, developed by Tuomo Penttinen. I'm not sure if the use of Cagibi, another UPnP framework developed by Friedrich, is intended too.

The second phase will consist of some integrations with the KDE SC, with the development of a plasmoid which will show some informations about neighbor UPnP devices and the improvement of Plasma device notifier to detect and show these devices, too. After that, a data-gathering application for debug purposes will be made, aiming to get all the information about the local UPnP environment and let developers aware of error situations that can happen with the integration. For this application, the Python version of BRisa framework will probably be used.

All of what I've said before is on my proposal (with the timeline for all activities), which can be seen here.

In this first week of community bonding period I've got my SVN account and now I'm setting up my development environment. I'm not sure about the necessary KDE modules, but I've checked out kdelibs, kdebase, kdenetwork and kdesupport. Any hints in that matter are welcome. By the way, I'm waiting for the first release of KDevelop4. ;)

Well, this is enough for now. I hope we can all enjoy this time working together and for now on I want to be more and more an active part of this crew.

Cheers.

Wednesday, April 28, 2010

GSoC 2010: I'm IN!! F**k Yeahh!!

Well, I'm not a huge fan of having a blog (Twitter for me is more than enough), but this one have a big purpose: advertise the KDE community about the progress of my Google Summer of Code project. Yeah, I've got selected this year after the frustration of 2009. You can applaud me now :D

Later I'll talk more about what is my project and how is going this community bonding period, that will last until the May 24th.

And let the games begin.