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

There is a total of 751 posts.

Weblog: category "desktop"

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

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.

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.

On to new motorcycle adventures

Posted on 2009-08-08 10:11:45 UTC in 60° 10.524 N 24° 55.158 E Helsinki, FI to .

Like many years before, it is again time to head out on a motorcycle trip. This time we're traveling together with Suski on my old Triumph Legend, the bike that has taken me around Europe and the Black Sea, and has been out of commission for last three years. But now it runs again.

Motorcycling in a Georgian sunset

Tonight we're taking the ferry to Gdynia, and then the idea is to head south through Poland, Slovakia, Hungary, Serbia and Bulgaria towards Asia Minor and the Caucasus. There are no strict plans or schedules, except that we must be back in Finland by the beginning of September.

You can follow our trip on Qaiku (feed) and Flickr. If you are somewhere on that prospective travel route, feel free to send me an SMS and maybe we can have a beer :-)

Technorati Tags: ,

Will content repositories kill the file?

Posted on 2009-07-30 17:10:24 UTC in 60° 10.524 N 24° 55.146 E Helsinki, FI to .

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.

Technorati Tags: , ,

Attention is difficult

Posted on 2009-07-22 22:13:18 UTC in 60° 10.524 N 24° 55.146 E Helsinki, FI to .

Why can't we concentrate? is an excellent book review about Rapt on Salon:

"Immersing myself in a book or a lengthy article used to be easy," he wrote. "Now my concentration often starts to drift after two or three pages. I get fidgety, lose the thread, begin looking for something else to do. I feel as if I'm always dragging my wayward brain back to the text." For my own part, I now find it challenging to sit still on my sofa through the length of a feature film. The urge to, for example, jump up and check the IMDB filmography of a supporting actor is well-nigh irresistible, and once I'm at the computer, why not check e-mail? Most of the time, I'll wind up pausing the DVD player before the end of the movie and telling myself I'll watch the rest tomorrow.

Exactly the same symptoms I'm having. This is the reason I've written some of my best code while offline at the countryside or on a road trip, and why it was so relaxing to be without a phone for a week recently.

How to solve the issue of constant distractions? Maybe we'll need to be sometimes offline. And even while connected, we need attention profiling and better user interfaces. Something for the developers of the future free desktop to consider.

Confession: I must've switched browser tabs a dozen time while reading the Salon article. Concentration indeed...

Technorati Tags: