Motorcycle Adventures and Free Software
Henri Bergius
Biker, free software consultant, neogeographer
  • Nemein
  • Bergie, in 60° 10.272 N 24° 55.956 E Helsinki, FI weekend in the summer cottage, looking forward to sauna
  • +358 40 525 1334

Upcoming trips

  • Jan 13 -
  • Feb 05 - Feb 07
  • Jul 01 - Jul 09

Bergie's Home Page and Weblog

This site is the personal blog of Henri Bergius. Subjects discussed include content management, social web integration, neogeography, information society and motorcycle adventures. Henri's profile and consulting services are also available.

While I'm on the road you can follow more frequent updates via my Qaiku profile (feed).

Latest weblog entries

What is a content repository

Posted on 2009-11-19 10:02:03 UTC in 60° 10.272 N 24° 55.956 E Helsinki, FI to .

Joint post of Henri Bergius and Michael Marth cross-posted here and here.

Web Content Repositories are more than just plain old relational databases. In fact, the requirements that arise when managing web content have led to a class of content repository implementations that are comparable on a conceptual level. During the IKS community workshop in Rome we got together to compare JCR (the Jackrabbit implementation) and Midgard's content repository. While in some cases the terminology might be different, many of the underlying ideas are identical. So we came up with a list of common traits and features of our content repositories. For comparison, there is also Apache CouchDB.

So, why use a Content Repository for your application instead of the old familiar RDBMS? Repositories provide 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

feature JCR / Jackrabbit Midgard CouchDB
content type system In JCR structured or unstructured nodes are supported and can be mixed at will in a content tree. Content types are defined in MgdSchema types. All content must be stored to an MgdSchema type, but types can be extended on content instance level using the "parameter" triplets Type-free
type hierarchy Structured node types support inheritence of types, additional cross-cutting aspects can be added with "mixins". Node types can define allowed node types for child nodes in the content hierarchy. MgdSchemas allow inheritance, and an extended type can be instantiated either using the extended type or the base type Type-free
IDs Nodes with mixin "referenceable" have GUID. In practice the node path is often used to reference nodes. Every object has a GUID used for referencing. Objects located in trees that have a "name" property can also be referred to using the path All objects can be accessed via a UUID
References Nodes can reference each other with hard link (special property type) or soft link (by referring to the node path) MgdSchema types can have properties linking to other objects of same or different type. A link of "parentfield" type places an MgdSchema type in a tree. No reference support built-in
content hierarchy All content is hierarchical / in a tree Content can exist in tree, or independently of it depending on the MgdSchema type definition flat structure
interesting property types Multi-valued (like an array), binary properties (e.g. for files), nodes have an implicit sort-order Binary properties stored using the Midgard Attachment system Support for binary properties
transactions Multiple content modifications are written in transactions. Transactions can be used optionally.
events JCR Observers can register for content changes on different paths and/or for different node types and/or CRUD, receive notification of changes as serialized node All transactions cause both process-internal GObject signals, and interprocess DBus signals Support for one external event notification shell script
workspaces Workspaces provide separate root trees. No workspaces support in Midgard 9.03, coming in next version Multiple databases within one CouchDB instance
import and export nodes or parts of the repository (or the whole repo) can be imported or exported in XML. 2 formats: docview for human-frindly representation, sysview including all technical aspects Objects can be exported and imported in XML format. There are tools supporting replication via HTTP, tarballs, XMPP, and the CouchDB replication protocol JSON serialization is the standard way of accessing the repository. CouchDB replication protocol supports full synchronization between instances
versioning Checkin/checkout model to create new versions of nodes, optionally versions complete sub-trees, supports branching of versions. No versioning All versions of content are stored and accessible separately, no branching
locking Nodes can be locked and unlocked Objects can be locked and unlocked
object mapping Not in standard, but implemented in Jackrabbit. Rarely used in practice. Object mapping is the standard way of accessing the repository All content is accessed via JSON objects
queries In JCR1 Sql or XPath, in JCR2 also QueryBuilder. Query Builder Javascript map/reduce
access control Done on repository level, i.e. all access control is independent of application. In Jackrabbit: pluggable authentication/authorization handlers. No access control in Midgard repository, usually implemented on application level. Midgard proves a user authentication API No access control
persistence In Jackrabbit different Persistence Managers can be plugged in (RDBMS, tar file, ...) libgda allows storage to different RDBMS like MySQL, SQLite and Postgres CouchDB has its own storage
architecture Jackrabbit: library (jar), JEE resource, OSGi bundle or standalone server Library Erlang-based daemon
APIs Standard: Java-based, PHP coming up. In Jackrabbit: also WebDAV and HTTP-based API C, Objective-C, PHP, Python HTTP+JSON
full-text search Included in repository. In Jackrabbit: Lucene bundled No (SOLR used on application level) Plugin for using Lucene, not installed by default
standard metadata All nodes have access rights, jcr:primaryType and jcr:mixinTypes properties. JCR 2.0 standardizes a set of optional metadata properties. All objects have a set of standard metadata including creator, revisor, timestamps etc No standard properties

Sponsored links

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

Raise the hammer! Midgard2 Mjolnir goes live

Posted on 2009-11-18 13:21:07 UTC in 60° 10.272 N 24° 55.956 E Helsinki, FI to .

Mjolnir, the new major release of Midgard2 Content Repository is now out. Named after the hammer of Thor, this release finally provides a real content repository that can be used by both desktop and web application developers.

mjolnir-narrow.png

In addition to being a GObject-powered content repository for PHP, Python and Objective-C, the Mjolnir release provides several significant goodies on top of the older Midgard2 series:

We've been testing running the Qaiku microblogging service with Mjolnir. The exactly same PHP code that we used with Midgard 8.09 LTS performs 20-60% better when running on Mjolnir.

Get Midgard2 9.09 Mjolnir while it is hot! Builds for various Linux distributions are already starting to hit OBS repositories...

In defence of URLs and the Open Web

Posted on 2009-11-17 19:19:36 UTC in 60° 10.272 N 24° 55.956 E Helsinki, FI to .

An increasing number of web services and applications are emphasising search terms or pre-selected websites instead of allowing users to enter any address they choose. This is worrying, as while searches are more user-friendly, URLs are the heart of an open web where anybody can publish without obscure business dealings or oppressive app store policies.

There are many examples of this happening, from Facebook's framing of web to netbooks systems like the JoliCloud not having an address bar. Certainly many companies are looking at Mozilla's search engine revenue and Apple's app store model and want to emulate that, moving the web into silos of their own control. But at the same time, we're thinking of Linked Data and open, interoperable web standards.

Web indeed is at new crossroads.

Chris Messina predicts the death of URLs:

a future without URLs and without the infinite organicity of the web frightens me. It’s not that I know what we’ll lose by removing this artifact of one of the most generative periods in history — and that’s exactly the point! The URL and the ability for anyone to mint a new one and then propagate it is what makes the web so resilient, so empowering, and so interesting! That I don’t need to ask anyone permission to create a new website or webpage is a kind of ideological freedom that few generations in history have known!

Tim O'Reilly presents a call to arms:

It could be that everyone will figure out how to play nicely with each other, and we'll see a continuation of the interoperable web model we've enjoyed for the past two decades. But I'm betting that things are going to get ugly. We're heading into a war for control of the web. And in the end, it's more than that, it's a war against the web as an interoperable platform. Instead, we're facing the prospect of Facebook as the platform, Apple as the platform, Google as the platform, Amazon as the platform, where big companies slug it out until one is king of the hill.

And it's time for developers to take a stand. If you don't want a repeat of the PC era, place your bets now on open systems. Don't wait till it's too late.

 

Will we learn to hide the complexity in Open Source?

Posted on 2009-11-08 10:15:37 UTC in 60° 10.272 N 24° 55.956 E Helsinki, FI to .

Chris Messina has a pretty good story comparing Apple's Magic Mouse and the recently announced OpenOfficeMouse that was targeted to power users of OpenOffice.org:

At base, these products represent two polar opposite ends of the spectrum: Apple prefers to hide complexity within the technology whereas the open source approach puts the complexity on the surface of the device in order to expose advanced functionality and greater transparency into how to directly manipulate the device. Put another way, the reason that people would buy the $69 Apple MagicMouse is because they want Apple’s designers to just “figure it out” for them, and provide them with an instantly-usable product. The reason why someone would pay $75 for this mouse is because it strictly keeps all the decision-making about what the mouse does in the hands (pun intended?) of the purchaser.

What I worry about, however, is that pockets of the open source community continue to largely be defined and driven by complexity, exclusivity, technocracy, and machismo. While I do support independence and freedom of choice in technology — and therefore open source — I prefer to do so inclusively, with an understanding that there are many more people who are not yet well served by technology because appropriate technology has not been made more usable for them.

More focus on usability and clarity would be needed with most Open Source projects, but there are already some bright spots. GNOME, for example, has good tradition in simple interfaces. I recently made the jump from Mac OS X to Ubuntu Netbook Remix, and have generally been quite happy with it.

But for Open Source projects the challenge is more difficult than for proprietary products. On the other hand we want to provide a nice, usable experience, but we also want to let our users delve deeper into the functionality, to make changes and maybe even become contributors to the project. This is where new tools like OLPC's View Source button can do wonders if implemented more widely.

Got a mystery book

Posted on 2009-10-27 18:27:06 UTC in 60° 10.272 N 24° 55.956 E Helsinki, FI to .

When returning from lunch today I found a package on my office desk. The handwriting on the envelope looked familiar from pictures I had seen on Qaiku before, so it was clear: I had received my own mystery book:

mystery_book.png

Mystery books have been received by many prominent Qaiku members before. They are beautifully handcrafted notebooks personalized for the recipient, often containing hints about Qaiku involvement, like having the inner covers made in printed version of that user's profile background. There is no information about the sender or the reason for making them. All are sent from random Turku post offices.

My copy of the mystery book is a mobile notebook, a bit in Moleskine-like style. The inner covers have a map of Europe from 1810, fitting my interest in history and geography spot-on. The book came with a pen, and had been sent from Turku 10 at 12:02 yesterday.

Several Qaiku members have posted pictures of their books on Flickr with tag "mysteerikirja", and there is a Qaiku channel about it. It remains to be seen whether the books are some viral marketing campaign, or have been made by some individual with Amélie-like tendencies. Anyway, quite a delightful surprise!

Microfeed could be to status updates what Telepathy is to instant messaging

Posted on 2009-10-26 09:12:23 UTC in 60° 9.816 N 24° 55.686 E Helsinki, FI to .

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.png

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:

mauku_twitter_qaiku.png

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/

Open Source and why forking is good

Posted on 2009-10-14 09:28:57 UTC in 60° 10.272 N 24° 55.956 E Helsinki, FI to .

Fake Steve Jobs on the Trouble with Android:

Um, hello? Folks, the whole point of doing open-source code is to let it fork. The idea is to accelerate evolution by encouraging weird mutations. Creating an open source program and hoping it won't fork is like decorating your house with a zillion Christmas lights and a forty-foot inflatable Santa and hoping nobody stops to look at it.

This is an interesting way to look at Open Source. Traditionally freedom to fork has been seen as a safeguard against dead projects or vendors, as a way to hand maintainership over to parties that are still interested.

But what FSJ is talking about is forks being beneficial by themselves. This is the model that Distributed Version Control Systems like git also promote: every developer has their own fork of the software, and merges to "blessed" repositories happen under the watchful eye of a maintainer.

This is quite a different model than the traditional centralized way of working with projects. Merging between forks has its costs, but if we embrace this model we gain lots of new developer flexibility and possible new workflows. DVCSs haven't been with us for a long time yet and so it takes some time for this new distributed way of working to take root.

Midgard Weekly Summaries are back

Posted on 2009-10-02 12:39:48 UTC in 60° 10.272 N 24° 55.956 E Helsinki, FI to .

Midgard is a very active free software project, and it is quite difficult to keep up with all the changes, decisions and discussions happening around it. Therefore I decided to bring the Midgard Weekly Summaries back.

MWS has been running before, with 66 issues released between 1999 and 2002, and 8 issues in 2007. This time we follow the idea of a Collaborative MWS.

Notices about new published summaries will be sent to the Midgard user mailing list, Qaiku #midgard channel, Twitter @MidgardProject and are available via RSS. Enjoy!

Technorati Tags:

Fall conference schedule

Posted on 2009-09-27 15:58:47 UTC in 60° 10.272 N 24° 55.956 E Helsinki, FI to .

After a brief summer motorcycling break the fall is shaping up to be quite full with conferences. Here is the current list:

Explaining signals at Gran Canaria Desktop Summit

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.

Content management starts with the repository

Posted on 2009-09-07 14:16:47 UTC in 60° 10.272 N 24° 55.956 E Helsinki, FI to .

Gadgetopia makes an argument for building your own CMS:

"See — the problem with a full scale Content Management System is that it has too many opinions. Those opinions were though of by somebody other than you and the needs of your organization. The more developed a content management system (or any piece of software, really) the more “opinions” it has. And the more “opinions” it has, the more likely one of them is going to really tick you off."

I can relate to this. We work with one system in particular that makes an astonishing array of presumptions about how you’re going to use it, and if you try to step outside those presumptions, demons fly out of the abyss and try to suck your eyeballs out.

This goes back to a previous discussion we had about Content Management as an API. In that post, we had a great experience with hand-rolling a CMS...

The term they are looking for is Content Repository, a service that provides common APIs for content storage, retrieval, signaling and so forth. With Midgard we're following this approach, providing content retrieval and web functionality APIs first, and then building some reusable user interfaces on top of that.

In addition to Midgard some content repositories to look at include Apache CouchDB and Jackrabbit. All of them allow you to stop worrying about storage and retrieval methods and focus on the actual end user functionalities, while keeping the whole system accessible and scriptable for integration purposes.

Technorati Tags: , ,