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.
Planet maemo: category "feed:533f5ff8469293460a7e02916e93a7ae"
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:
Select the "Log in using OpenID" option, and provide your maemo.org OpenID URL:
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:
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.
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.
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.
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.
Google launched a new mobile web service called Near Me Now that can recommend things like restaurants, bars and ATMs near you. This uses browser geolocation to provide only results relevant to where you are.
The idea is quite good: to replace business directories like Yelp or eat.fi with something that is easily accessible from Google's homepage and uses Google's great relevancy algorithms.
However, the implementation is not quite there yet. My main gripe is that they implemented this using browser sniffing so that the feature can be accessed only with iPhones and Android devices. Even though I'm using N900, a mobile device that has GPS and provides geolocation through the browser I cannot access that site. That reeks of the bad old times of IE-only websites.
Lesson: if you need browser sniffing to provide some feature, implement it based on browser capabilities, not the user agent (which can anyway be spoofed easily).
Ping.fm is a useful tool if you have friends on many social networks as it allows you to write updates to all of them via a single interface. In addition to the web interface there are many tools that allow posting to ping.fm, including SMS and applications for Android handsets and the iPhone.
So far a problem with ping.fm has been that it doesn't support Qaiku, the conversational microblogging tool that we're using to handle workstreaming in Maemo.org Sprints. But now it is possible thanks to the Custom URL functionality on ping.fm.
If you already have a Qaiku account you can start posting to it via ping.fm in the following way:
- Enable Qaiku API in your settings and copy the API key
- Register to ping.fm
- Add a Custom URL to send statuses to
- Enter the URL http://www.qaiku.com/api/statuses/update.json?apikey=xx where xx is your API key as the Custom URL
- Testing posting via the ping.fm web interface:
- See your new post on Qaiku:
- If you want to post to a channel, just begin your message with #channelname
If ping.fm is not your thing, there are also other non-web ways to use Qaiku. For example Mauku for N900 and Gwibber for the Linux desktop work nicely with the service. Qaiku also has an XMPP bot that you can use by simply adding qaiku@jabber.org as your instant messaging contact.
Microfeed is a new D-Bus service for handling status updating and microblogging entries from various services. Just like Telepathy allows various applications to utilize instant messaging connections, Microfeed does the same for microblogging:
Microfeed is a specification and a reference implementation of client-server architecture providing access to various information sources that have a feed-type interface. Examples of those feed sources include micro-blogging services, such as Twitter, Facebook, Jaiku, Qaiku, and Laconi.ca. By utilizing Microfeed architecture, a client application can focus on user interface, while the actual feed fetching is done in the background independently. The communication between a local Microfeed server publishing information about feeds and a client application displaying that information to an user is done with the D-Bus messaging following the publisher-subscriber principle.
Microfeed service already is the power behind Henrik Hedberg's new Mauku microblogging interface for Maemo 5. Here you can see a stream of updates from both Qaiku and Twitter:
If you're implementing a tool that deals with microblogging services, please consider using microfeed for it. Advantages from this include:
- User accounts to various services need to be entered only once and can be reused
- You don't need to concern yourself with the particular features or quirks of a microblogging service API, just use the D-Bus interfaces provided by Microfeed
- Twitter? Qaiku? StatusNet? Facebook? You can let your users choose what services they want to use, without overhead of having to implement the protocols for each of them
More information from http://microfeed.org/
After a brief summer motorcycling break the fall is shaping up to be quite full with conferences. Here is the current list:
- September 30th - October 1st: OpenMind and MindTrek in Tampere, Finland
I'll give a talk about the Midgard project and how our company has evolved together with it. In addition Linux-tekijä awards, where I was in the awards committee, will be announced - October 9th - 11th: Maemo Summit in Amsterdam, the Netherlands
While I'm not giving a talk in the event it will be great to meet the rest of the maemo.org team, and the community around the project - October 17th: Finhack in Forssa, Finland
A free-form hacking event for the Finnish free software community. Expect some progress with Midgard's XMPP capabilities - October 23rd - 25th: Midgard Gathering Helsinki, Finland
Midgard users and developers get together to learn about the new capabilities of Midgard 9.09 Mjolnir and discuss the roadmap for the next release - October 29th: The Open Web in Ede, the Netherlands
NLUUGs conference on new web technologies where I'll be speaking both about GeoClue and the Midgard Content Repository - November 11th - 13th: Semantic Search workshop in Rome, Italy
Together with a general meeting of IKS Project participants - November 13th - 15th: FSCONS in Gothenburg, Sweden
The annual Nordic free software gathering where I'll be speaking about Midgard2
Looking forward to all the interesting discussions and ideas that will surely come up from these events. If you will be around in one of those, make sure to look me up and we can chat. The events will also be covered in my Qaiku stream.
MDK laments the demise of the simple file in the onslaught of storage services:
Sure, the applications still give you a way to share things and take them out of the storage. You can export a contact out of your address book as a vcard file. But the role of The File here is slowly being reduced to a role of an intermediate storage medium. The business card is temporarily put in the .vcf file before it gets injected into somebody else’s database (another address book?).
As more and more applications operate on databases, the computer is becoming a monolithic black-box that “has things”. How exactly (and where) the data is stored is becoming less clear. The application and the interface becomes united with the user data. It becomes one.
This echos the sentiments of Alex Payne when he warned against what he calls Everything Buckets:
Computers work best with structured data. Everything Buckets discourage the use of structured data by providing a convenient place to commingle “structureless” data like RTF and PDF documents. Rather than forcing the user to figure out the rhyme and reason of their data (for example, by putting receipts in a financial management application and addresses in an address book), Everything Buckets cry: “throw it all in here! Search it! Maybe I’ll corrupt my proprietary database, but maybe I won’t and you’ll have the joy of sifting through a mire of RTF documents. Doesn’t that sound great?”
And yes, I agree that obscure application-specific databases are not really better than obscure proprietary file formats.
This is exactly why I've been talking about content repositories, services like Midgard2 and CouchDb that not only can provide superior content storage and organization, but do it in a way that multiple applications can share. You can easily write your own scripts to perform batch operations on the data, and receive D-Bus notifications when something changes.
And good repositories also provide easy synchronization tools so you can have your data available on all of your computers, and even on the web. If they can also do peer-to-peer sharing, we're close to achieving the fully free cloud.
Today in the State of the Map conference I gave a lightning talk introducing Till Harbaum's OSM2Go, a wonderfully simple tool for contributing to OpenStreetMap.
If you want to contribute to a freely available map of the world, download OSM2Go to your tablet and start mapping! My slides are available on SlideShare.
See also my Qaiku notes for SoTM day 1 and SotM day 2. Really amazing to see how far the project has advanced since the 2007 conference. Much of Western countries is already mapped, and many NGOs are working to get the developing world mapped, in many places for the first time ever in digital format.
Technorati Tags: maemo, openstreetmap, sotm09
I gave my Midgard2: Content repository for desktop and the web talk yesterday in GCDS. The slides are available on SlideShare. The main idea was that any application that deals with structured data could benefit from using a content repository like Midgard2 or CouchDB.
So, what is a content repository? It is a service that sits between an application and a data store. It provides several advantages:
- Common rules for data access mean that multiple applications can work with same content without breaking consistency of the data
- Signals about changes let applications know when another application using the repository modifies something, enabling collaborative data management between apps
- Objects instead of SQL mean that developers can deal with data using APIs more compatible with the rest of their desktop programming environment, and without having to fear issues like SQL injection
- Data model is scriptable when you use a content repository, meaning that users can easily write Python or PHP scripts to perform batch operations on their data without having to learn your storage format
- Synchronization and sharing features can be implemented on the content repository level meaning that you gain these features without having to worry about them
Midgard2 is a content repository library that is built on top of glib, libgda and dbus, making it fit the general free desktop infrastructure very well. You can use it in any application that is written in C, Objective-C, Python, PHP, or soon Mono. Learn more from the slides!
CouchDb is a really cool document-oriented map/reduce database that is nowadays an Apache project. Previously we created the distributed CRM application Ajatus on top of the system and ported CouchDb to Maemo.
Here in Gran Canaria Desktop Summit CouchDb has been somewhat a hot topic, as the Ubuntu project is planning to use it as the content repository for desktop applications.
We had a lunch with Jan Lehnardt today and discussed how to make Midgard2 and CouchDb interoperate better, and as it happens, it is actually very easy: CouchDb has a replication protocol that we can support also in Midgard, making the two repositories able to synchronize content with each other.
There is now a first test implementation of Midgard-to-CouchDb synchronization support, with better Midgard integration and CouchDb-to-Midgard coming soon. Check out the Midgard MVC component on Github. Anyway, already pretty cool!
Setting up replication on CouchDb admin UI:
Midgard record replicated successfully into CouchDb:
I'll talk more about this and repository-oriented application development in my Midgard2: Content repository for desktop and the web talk tomorrow at 16:45. Be there!
Technorati Tags: couchdb, midgard, replication