Motorcycle Adventures and Free Software
Henri Bergius
Biker, free software consultant, neogeographer

There is a total of 768 posts.

Weblog

First year of Qaiku, and a travel writing challenge

Posted on 2010-03-09 21:00:09 UTC in 3° 3.806 S 60° 6.420 W 10km NW of Manaus, BR to . 3 comments.

1st birthday of QaikuQaiku, the conversational microblogging service that launched a year ago had a refresh that launched today. While it hasn't yet convinced the twittering masses, it has already proven itself as a lot more thoughtful platform for the Finnish online community, and as a valuable workstreaming tool.

The new version looks quite nice and fresh. Notice the privacy information on the right-hand side, which is relevant as Qaiku allows channels and profiles that are private or invitation-only:

qaiku-onmytravels-small.png

Technically the new version is also remarkable as it is the first major website to run fully on top of the legacy-free Midgard2 platform. So yes, every entry you see there is a GObject. And D-Bus signals fly when you post.

On to the challenge, then

To highlight Qaiku's threading, conversational nature I started a new "On my travels, I have" thread for sharing your most extraordinary travel experiences. This is not on Twitter or Buzz as with Qaiku it is so easy to keep the conversation together and accessible for the future as well.

To contribute, sign up on Qaiku, go to the thread and add your experiences as a comment. If you have a link or picture to include, you can also do so. My first entry was:

seen ice descend from the heavens and provide us with cold beer on a hot day in Lesotho

Will be interesting to see what comes out of this :-)

Sponsored links

Microsoft Certification Exams โนเกีย Nokia มือถือ Online Project Management save money using, phone card
Reviews มือถือ Mobile All Apps

Getting started with the Midgard content repository

Posted on 2010-03-09 15:50:26 UTC in 3° 3.806 S 60° 6.420 W 10km NW of Manaus, BR to . 3 comments.

I'm doing a talk today in the Bossa Conference about using Midgard as a content repository for mobile applications. As part of my presentation I wrote some simple example code for using the Midgard APIs in Python, and thought they would be good to share to those not attending the event as well.

The idea of a content repository is that instead of coming up with new, isolated file formats or database setups for your application you can just work with objects and signals, and let Midgard handle the rest. This is something that lots of people are doing with CouchDB as well, but we feel Midgard, with its light footprint and native APIs for languages like Python, C, Vala and PHP fits better in the mobile applications context.

Installing Midgard

Midgard packages are available for many different Linux distributions through the OpenSuse Build Service. To find the right repository for your setup, go to the OBS project page. For example, on my Ubuntu Karmic netbook the URL to add to apt sources.list is deb http://download.opensuse.org/repositories/home:/midgardproject:/mjolnir/xUbuntu_9.10/ ./. Then I just:

sudo apt-get update
sudo apt-get install python-midgard2

Midgard is also available in Maemo extras and for OS X on MacPorts.

Defining a schema

The first thing when developing a Midgard application is to define your storage objects. This is done using the MgdSchema XML format. In this case we're doing a simple "attendee" object that amends Midgard's built-in person record with information related to the conference:

<?xml version="1.0" encoding="UTF-8"?>
<Schema xmlns="http://www.midgard-project.org/repligard/1.4">
    <type name="openbossa_attendee" table="openbossa_attendee">
        <property name="id" type="unsigned integer" primaryfield="id">
            <description>Local non-replication-safe database identifier</description>
        </property>
        <property name="person" type="unsigned integer" link="midgard_person:id">
            <description>Person attending the event</description>
        </property>
        <property name="registration" type="datetime">
            <description>Registration date of the attendee</description>
        </property>
        <property name="likesbeer" type="boolean">
            <description>Whether the attendee likes beer</description>
        </property>
    </type>
</Schema>

Then we just save this XML file into /usr/share/midgard2/schema/ so that Midgard will find it.

Initiating the repository connection

Once the MgdSchema is in place it is time to import antigravity and start hacking in Python. The code works pretty much in the same way in other languages Midgard is available for, but Python is used here for the sake of simplicity. First we load the Midgard extension:

import _midgard as midgard

Then we setup the repository connection. With these settings we will store our content into an SQLite database located in ~/.midgard2/data/midgardexample.db:

configuration = midgard.config()
configuration.dbtype = 'SQLite'
configuration.database = 'midgardexample'

# Open a Midgard repository connection with our config
connection = midgard.connection()
connection.open_config(configuration)

As this is the first time we're interacting with the repository we need to tell Midgard to prepare the storage for itself and also for our new openbossa_attendee class:

midgard.storage.create_base_storage()
midgard.storage.create_class_storage('midgard_person')
midgard.storage.create_class_storage('midgard_parameter')
midgard.storage.create_class_storage('openbossa_attendee')

Interacting with data

First we create a person object with our attendee:

person = midgard.mgdschema.midgard_person()
person.firstname = 'Leif'
person.lastname = 'Eriksson'
person.create()

Then we create our attendee object and link that with the person we just created:

attendee = midgard.mgdschema.openbossa_attendee()
attendee.person = person.id
attendee.likesbeer = True
attendee.create()

Querying data

Later we'll want to find out about all Leifs attending the event. We do this by using the Midgard query builder:

qb = midgard.query_builder('openbossa_attendee')
qb.add_constraint('person.firstname', '=', 'Leif')
attendees = qb.execute()

The query builder returns us a list of matching attendee objects. We can go through them and also fetch the associated persons:

for attendee in attendees:
    person = midgard.mgdschema.midgard_person()
    person.get_by_id(attendee.person)
    if attendee.likesbeer:
        print "%s, %s is attending the event" % (person.lastname, person.firstname)

Then we can update the persons with their email addresses:

    person.email = 'leif@vinland.no'
    person.update()

For basic data handling, that's it! When you need more, you can extend objects with file attachments or parameters. You can also create joined records using Midgard views. Midgard provides D-Bus signals, transactions, centralized metadata, synchronization and many other things.

CMS Watch on their Midgard usage

Posted on 2010-03-08 18:24:26 UTC in 3° 3.806 S 60° 6.420 W 10km NW of Manaus, BR to . 0 comments.

Which CMS does The Real Story Group Use? (Tony Byrne / CMS Watch):

The answer is, we use an open-source platform called "Midgard." We picked it nearly ten years ago, and it has held up fairly well.
...

One of the things we like about Midgard actually makes it rather unsuitable for many simpler publishing scenarios: it is highly object-oriented. This allows us to run multiple sites off largely a single codebase -- at the cost of quite user-unfriendly administrative and authoring facilities.

Also, Midgard is very much a development platform, and we have had to create a fair amount of custom code, especially to handle structured content. In that regard, our CMS experience probably resemble yours. As an industry we remain very far from plug-and-play content management technology for all but the simplest of websites.

While the post contains many negative points about older Midgard (the UIs are a bit better now than they used to be, quite a lot of development has since been happening especially in the LTS branch), it is remarkable that CMS Watch has been able to run their services through the same CMS setup for ten years. This really shows the durability and commitment to long-term stability we have in the Midgard community. We've been doing this for more than ten years, and will likely keep going for quite a bit longer.

As for usability and popularity of Midgard, there is quite little we can do about it in the Midgard1 area, as that is now in long-term support phase that won't allow major changes. But Midgard2 is a new world with new opportunities. Midgard's content repository is pretty much there already, as is the MVC layer, and this spring we should be able to unveil the new, quite revolutionary CMS concept as well. Watch this blog for updates!

Register and log into meego.com using your maemo.org account

Posted on 2010-02-24 13:57:09 UTC in 60° 10.080 N 24° 55.578 E Helsinki, FI to . 4 comments.

MeeGo is the new mobile Linux platform developed by Nokia and Intel. As the community is forming up, we thought that it would be good to enable people to use their maemo.org identities also on the MeeGo web services (as well as on any other OpenID enabled website). For this, let me introduce Maemo's OpenID provider.

First of all, go to meego.com and click login:

meego-login.png

Select the "Log in using OpenID" option, and provide your maemo.org OpenID URL:

meego-maemo-openid.png

Then the request will be redirected to maemo.org where the site will check your credentials and ask whether to relay your information on to meego.com:

maemo-openid-meego.png

And that's it, suddenly you can use your maemo.org account with meego.com!

 

The same OpenID provider component can also be utilized on any other Midgard-powered website.

Wallpapers for Ubuntu 10.04: my submissions

Posted on 2010-02-24 11:03:08 UTC in 60° 10.080 N 24° 55.578 E Helsinki, FI to . 1 comments.

Ubuntu 10.04 "Lucid Lynx" is coming and they're looking for suitable wallpapers. I made some submissions and was pretty happy to see one of them in the Top 15 wallpapers for Ubuntu Lucid post:

Shnjaka sailing on lake Onega, Russia

Here are some other submissions I made:

Lights of the Itaipu dam, Brazil Sunset on the Aegean sea, Turkey Motorcycling on mountain roads, Albania

Going to the Bossa Conference

Posted on 2010-02-23 12:38:44 UTC in 60° 10.194 N 24° 56.304 E Helsinki, FI to . 0 comments.

Bossa Conference, an event about mobile development with free software technologies will be held on March 7th-10th in Manaus, Brazil. This year I'm speaking about using Midgard as a replicated storage layer in mobile applications, with examples for multiple programming languages and toolkits.

The idea behind the Midgard content repository is that instead of coming up with your own file formats you can just keep working with objects and signals, and let the repository deal with the rest.

bossaconference-small.png

It is always fun to go to Brazil and meet the vibrant free software community there. The plan is to fly over this weekend, spend a few days in Sao Paulo and then head for the Amazon. Feel free to ping me if you're around.

Maemo's community involvement infrastructure is what MeeGo needs

Posted on 2010-02-16 09:39:35 UTC in 60° 10.566 N 24° 55.206 E Helsinki, FI to . 1 comments.

Nokia's Maemo and Intel's Moblin are merging to form MeeGo, a development environment for a new class of internet-connected devices ranging from smartphones through netbooks to TV sets. This may be finally what provides the free software world with a consistent and modern alternative to the iPhones and iPads that the proprietary world has come up with, the "magical user experiences" Linux Foundation's Jim Zemlin was asking for.

meego-small.png

Unlike Android, both Moblin and Maemo stacks have been very promising in the sense that they've been closely aligned with existing and well-known Linux desktop technologies. All RPC communications happen through D-Bus, Qt or Clutter is used as the GUI toolkit, there is Telepathy for integrated VoIP and IM communications, and Moblin even comes with the GeoClue location service.

So far the discussion about this merge has very much focused on technical terms: what toolkit to use (Qt is recommended), what package manager (RPM) and so forth. However, what hasn't been discussed yet is what will happen to Maemo's excellent infrastructure for community involvement:

  • Brainstorm is a tool for proposing ideas and solutions to them, and then voting to qualify them. This is a very good way to gather ideas and feedback from the community, and some brainstorms have even ended up having community-led free implementations available, freeing Nokia from having to write all platform functionality
  • Talk is the very popular forum for both Maemo end users and developers. Having an open forum to discuss it all, and having also people from Nokia and Intel there would help to communicate the aims and decisions around the platform a lot better
  • Packages and Downloads provide a fully open and crowdsourced "app store experience" where the community is free to develop, upload and install Maemo applications through a consistent service that provides quality control, nice installers and a free API for browsing the software available
  • Community Council and the Sprint process have been the way Maemo's community infrastructure has been designed and developed out in the open. The various tasks have been documented in the Wiki, and people have been able to follow the progress through a Qaiku workstream
  • Karma is a way to credit community members for their involvement. The involvement can be technical (for instance, developing a popular Maemo application) or social (publishing popular blog posts or helping people on Talk), and has been used as a criteria for Community Council and other elections. Karma also helps Nokia to qualify community members, to find the people who should have access the developer devices for instance. In a large community it is hard to identify the people who are just loud and the people who are doing actual valuable contributions from each other without such tools
  • Social News and Planet are a way for the community to aggregate and promote important posts around the project. We look at things like social bookmarking, blog links and votes happening on the Maemo site to determine the most important stories of the day, to provide an "automatic newspaper" for the project

Providing all or some of these services as part of the MeeGo infrastructure would enable the community to feel involvement, and even ownership in the new project that is shaping up. This is critical for a project that has such a big reliance on new innovation and connectivity with the upstream, especially at the time of such big change.

Buzz may end segregation in microblogging

Posted on 2010-02-10 20:16:11 UTC in 60° 9.798 N 24° 55.674 E Helsinki, FI to . 15 comments.

Yet another interesting launch this winter: Google finally published their lifestreaming application, Buzz. These are still clearly early steps for the service as it doesn't provide any APIs yet, and the user interface feels slow in a quite un-Google-like way.

However, it still shows strong potential in several ways. First of all, it may help the people raised on Twitter to discover a more conversational culture. And secondly, it connects to any website providing some necessary feeds, promising an end to segregation where you had to follow some of your friends on Twitter, some in Qaiku and some in Facebook. If all those sites start providing proper feeds you can just follow everybody in the interface of your choosing.

buzz-in-gmail.png

What is even more promising is that instead of being built on direct API linkage between designated partner sites, all of this is based on quite simple building blocks of the upcoming semantic web: social graph discovery, Atom activity feeds, and possibly the Salmon comments aggregation protocol. Your website, marked up in a semantic way is your "API". This means any site can join the play, not just the big players.

But to be fully usable Buzz needs to provide a few things:
  • Language filtering. I had to unfollow some Portuguese-speaking friends already
  • Discovery of interesting discussions. Now I only see things my friends post, not the things they comment
  • Groups or channels people can post to
  • and yes, Salmon so comments to my posts on Buzz will trickle down to Qaiku or my blog
As things stand for now, Qaiku will remain the conversation platform of my choice. It provides more flexible privacy, including our company's internal conversation channels, and does better job of geolocation and multilingual microblogging. You'll also find my Qaikus syndicated to Twitter.

Halti.com provides contextual product recommendations

Posted on 2010-02-10 15:33:05 UTC in 60° 9.984 N 24° 55.050 E Helsinki, FI to . 0 comments.

Last week the Finnish outdoor brand Halti launched a pretty interesting web service. While many outdoor brands focus on extreme sports that don't really have much to do with the reality of most of their customers, Halti connects their product lineup to the needs of the site visitor by utilizing both weather and location. This means where ever they are or are planning to go, they can get product recommendations personalized to their needs:

halti-small.png

This is another case of location context being used to serve users better. To figure out where the user is coming from the site uses a combination of IP positioning and browser geolocation, while weather information comes from Foreca's feeds. Map visualization uses CloudMade's OpenStreetMap-based maps. And of course the whole thing runs on the stable Ragnaroek series of Midgard.

In other news, Jos et jaksa is another pretty interesting recent site launch, especially for the fact that it is the first-ever website running on the legacy-free Midgard2 platform and Midgard MVC.

iPad and information appliances, a free software angle

Posted on 2010-01-28 09:51:43 UTC in 60° 10.572 N 24° 55.212 E Helsinki, FI to . 0 comments.

Apple iPad is certainly interesting. It seeks to challenge the concept of PCs by providing something that is at the same time more personal, and a lot easier to use. The personal computer of the future.

Gone is difficult file organization - instead, applications use their own purpose-build content repositories. Instead of seeking software from many places, all of it is easily available in an App Store, all quality-controlled by Apple. And same thing with content - forget about bookshelves and stacks of CDs, instead simply dowloading all you need from iTunes.

This sort of user experience obviously comes with a cost. Important computing concepts like multitasking are not supported. The iTunes/App Store experience means that Apple is in the position to ensure no software or content competing with its or its business partners' business model gets on the device. And most of the content you buy for the device is DRM'd, meaning that you're only renting it for the time allowed by content owners, never buying.

Even with the limitations concerned I can see myself buying an iPad. It would serve as a very nice device for web surfing from the couch and as an e-reader on business trips. I can also see myself running demos and presentations from it instead of a laptop.

Even with the limitations concerned, it is likely that the iPad will happen, and will blaze the trail towards a new way of personal computing. Stephen Fry says it well:

Like the first iPhone, iPad 1.0 is a John the Baptist preparing the way of what is to come, but also like iPhone 1.0 (and Jokanaan himself too come to that) iPad 1.0 is still fantastic enough in its own right to be classed as a stunningly exciting object, one that you will want NOW and one that will not be matched this year by any company. In the future, when it has two cameras for fully featured video conferencing, GPS and who knows what else built in (1080 HD TV reception and recording and nano projection, for example) and when the iBook store has recorded its 100 millionth download and the thousands of accessories and peripherals that have invented uses for iPad that we simply can’t now imagine – when that has happened it will all have seemed so natural and inevitable that today’s nay-sayers and sceptics will have forgotten that they ever doubted its potential.

The success of iPad will mean more than just a completely new level of App Store economy. Other companies will certainly seek to emulate the model, coming up with their own post-WIMP devices and their own content and software ecosystems. This all will be a challenge for the free software movement.

The world of free software is still very much stuck in what computing was in the 90s. We think of desktop computers, we do not integrate with the web. And we do not get the transformation that is happening with personal computers. Taught by smartphones and cloud applications, users are moving from desktops through simple netbooks towards information appliances.

With information appliances you need a seamless user interface. You need an ecosystem where content comes alongside the software to utilize it. You need to move past the old WIMP metaphors and the idea of separation between data stored in a a file system and the software manipulating it.

So far the first convincing attempt towards this direction I've seen in the free software world is KDE's Social Desktop initiative. It allows users to connect with each other straight through the desktop, and it allows discovery of new applications and content to download and use straight in the applications. We also use it with Maemo's new App Downloader.

Threatened by the cloud from one end, and closed-ecosystem appliances from the other, it will be interesting to see how we react. Will we rise to the challenge and start providing new user experiences? Will we build a free cloud? Will we integrate with initiatives like Project Gutenberg and Creative Commons to provide the content integration? Will the open web be our safe haven?

Definitely interesting times to be a software developer.