Wednesday, May 28, 2014

Location hackfest 2014 report

So the Location hackfest 2014 took place at the awesome Mozilla offices in London during last weekend. Even though some of the important participants didn't manage to be physically present, enough people did:
  • John Layt (KDE)
  • Hanno Schlichting (Mozilla)
  • Mattias Bengtsson (GNOME)
  • Jonas Danielsson (GNOME)
and some participated remotely:
  • Bastien Nocera (GNOME)
  • Garvan Keeley (Mozilla)
Unfortunately Aaron McCarthy of Jolla couldn't attend remotely either as he lives in a very incompatible timezone (AU) but we had a lot of productive discussion with him through email that still continues.

Some very fruitful discussions we had:

  • Why Mozilla doesn't make wifi data it gathers for its location service, available for everyone to download? Hanno explained in great detail how making this data available would seriously compromise privacy and even safety of people. One good example given was someone getting out of an abusive relationship and not wanting to be traceable by their ex- but if they take their wifi router with them, their significant other has a possible way to easily track them using the wifi database. There is an easy (even though very ugly) way to avoid your AP being scanned by harvesters of such services but most people do not possess enough technical knowledge to know to enable that.

    Hence their reluctance to making it available for download, even though they'd want to. If you are interested in more details, you should read up all about that on Hanno's blog.
  • Had some discussion with Firefox and Firefox OS using Geoclue2. Hopefully we'll at least have Firefox using Geoclue2 soon. I might need to add support for totally unmaintained ofono in Geoclue2 unfortunately for making a very compelling case for Firefox OS to adapt geoclue2.
  • We had a discussion about GPS-A support in Geoclue. There are two possible ways to do that:
    1. Give URL of a SUPL service to the modem and let it do everything for you.
    2. Get the geospacial data that (SUPL service would provide) from a custom service and feed that to the modem.
    Hanno informed us that the only free SUPL implementation out there is that from Google but nobody knows what the ToS really are. He also informed us of how many modem chipsets just don't implement the API to feed it geospatial data and that makes SUPL our only hope to implement GPS-A.
  • There was a discussion about POI and check-in UI in Maps between me and Mattias. We had a bit of disagreement about it but seems now we are coming to come conclusions about how it should look like.
It was a hackfest so we also did some hacking:

  • John spent most of his time getting familiar with Qt's location code and how to port to Geoclue2. He wrote a nice post about it so I wont get into details here.
  • Mattias worked tirelessly to finish off his routing branch to be finally merged. Its not a very easy task so its not surprising that he hasn't managed to finish it yet. I'm pretty hopeful it will be merged in the following few weeks.
  • Hanno added proper support for geoip-only queries in Mozilla location service, made it do better against queries w/ stale wifi data and improved accuracy of results from 300m to 100m among other things.
  • Jonas was doing live reviews of Mattias' patches (in Swedish!) and at the same time working on getting command-line options parsing to work in gjs so we can do so in Maps.
  • Garvan was working on adding Geoclue2 support to Firefox/Gecko.
  • I finished off my patches to port geoclue2 to directly use wpa_supplicant rather than NetworManager, which makes wifi-geolocation work on FreeBSD, Firefox OS and Jolla. The last two don't use Geoclue2 but I'm hoping that this is a step forward towards convincing them to use it. I provided a patch to wpa_supplicant to make its D-Bus policy a bit lenient, while at it.

    I also looked into ofono API but not only is the project unmaintained, it doesn't provide proper introspection on D-Bus and there is no API docs. :( To make things worse, both my modems don't seem to work at least out of the box. I'd really rather I didn't have to deal with it but if I can't convince Firefox OS folks to provide ModemManager API, adding ofono support is essential to get them to use Geoclue.

    I started refactoring of Modem sources in Geoclue so that:
    • all ModemManager code is isolated in its own module so that its easy to add a ofono handling code w/o changing anything in the sources themselves.
    • 3G source can more easily/cleanly share code with Wifi source, use Mozilla Location Service (rather than opencellid that it currently does) and also submit cell tower data to Mozilla.
I can't thank Mozilla and specifically Chris Lord enough for hosting this event for hosting this event.

    Monday, May 5, 2014

    Berlin, DX hackfest, Boxes, rain & sunshine

    I just flew back from Berlin where I spent the last week, mainly to participate in the GNOME Developer Experience hackfest. As you can see from blog posts from other awesome gnomies, the hackfest was a pretty big success.

    I focused on the use of virtual machines (as thats right up my alley) for making application development as easy as possible. I talked to Christian, who has been working on an IDE for GNOME about his idea of a simulator VM which allows the developer to quickly test their app in a pristine environment. We discussed if and how Boxes can be involved. After some discussion we decided that we probably don't want to use Boxes but rather create another binary that re-uses the existing virtualization infrastructure: libvirt, qemu, spice (and maybe libosinfo) etc.

    Another way to make GNOME development easy through VM would be what we already have on a very crude level: Distribution of ready-made VMs with all the development environment setup. Continuous already creates and distributes ready VM disk images of latest GNOME (almost everything from git) and Boxes can import these images. These images however are insufficient and unreliable since they do not contain any metadata, especially recommended/required system resources, about the VM. Christian recommended VMware's wmx format but that turned out to only contain metadata instead and you'd need a separate file (vmdk) for the disk image with that. What we really need here is a format that contains both metadata and all disk images in one file, in other words a virtual appliance. After doing some research on this, I once again came to the conclusion that OVF is our only hope here. Not only its one file that can contain all important aspects of a VM, its an open standard that is agreed and implemented by many different vendors. Boxes being able to import/export from/to this format and Continuous being able to provide these virtual appliances wouldn't just enable a more reliable producer-consumer relationship between Continuous and Boxes but also allow individual developers to be easily able to share their work with others: "Hey! I've been working on this project/feature X last few days and want to get some input. I'm sending you the VM, just import it in Boxes and let me know what you think..".

    We've actually been wanting to have this feature for a very long time and I've mentioned the need for OVF support quite a few times so I decided its about time I do something about it. So during the hackfest, I designed the minimum interface for a library to convert from/to libvirt domain (or configuration) to/from OVF files and started the implementation too. I hope to continue working on it to have something demoable by end of this month.

    Some other discussions/activities I had during/around the hackfest:

    * Talked with Aleksander about modem enabling/disabling. Currently geoclue has to enable the modem itself for using it but since it doesn't know if the modem is in use by another application, it doesn't disable it after using it. This results in waste of battery power. I suggested to Aleksander that the best thing would be for ModemManager to take care of that as it knows if modem is in use or not. The alternative would be some kind of explicit UI but throwing this decision on user would be a terrible thing to do. Aleksander liked the idea and he promised to look into implementing it.

    * I took part in Gtk+ roadmap discussion, mostly as a silent observer (Gtk+ hackers and designers covered it nicely so I didn't feel like saying anything) but during the meeting I learnt of a widget that was introduced in 3.12 that I had missed completely, GtkFlowBox. Since developers were unhappy that we introduced a widget that is not used by any GNOME app and I realized that use of this widget in Boxes will bring me very close to my aim of dropping libgd usage, I decided to make Boxes the first user of this widget soon.

    * I realized (very late) that both my SoC studends live in Germany so I asked both of them if they can join us for any of the days. While it was impossible for baedert to join us on such short notice, Lasse was still able to make it for the last day. It was really nice to meet this very bright young fellow. We had a lot of discussion about past, present and future of Boxes. Lasse has already written a very nice and detailed blog post about that so I'll leave you with a link to that if you are interested.

    * Talked with Cosimo about use of Geoclue by Endless mobile.

    * Tested gnome-clang against Geoclue to provide feedback to Philip and it resulted in him fixing some important bugs.

    * Talked briefly to Lennart about
      * How authorization of geoclue-using apps will/can work in the kdbus world.
      * The best way to allow Boxes to access USB devices with ISO9660 filesystems on them.

    Thats mostly it! I would like to thank Lennart for providing me with a nice accommodation, Endocode for providing us a great venue (+ endless supply of Club mate) and GNOME foundation for sponsoring my travel.