Midgard and the Properties pattern

Steve Yegge’s long discussion of an universality of a Properties pattern can be supplemented with a Midgard as an example. Midgard itself represents its “objects” as a set of properties with links within and between object hierarchies to represent relations. All those articles, topics, pages, sites and so on represent a Prototype pattern design pretty well though once application has started its structure and objects’ set of properties cannot be changed. We even represent code parts and dependencies as data with snippets and page elements. In Vinland release even messaging about property-related activities will work (send event to subscriber if an article’s title has been changed or it is moved to a different topic, for example).

What lacks from Midgard’s implementation of the Properties pattern, is an ability to treat actions performed on objects and their properties as first-class objects. There is little in the Midgard’s core that allows you to operate activities as part of object’s structure, resulting effectively in closures and other niceties of good programming languages unavailable at schema definitions. We currently imitate much of it with a help of PHP5 or Python on an user application level but that isn’t convenient and is not portable across all the languages. We try to overcome this by introducing language-neutral communication channels like D-Bus to signal and perform actions across language boundary but still lack of activity’s integration into the object’s structure makes it suboptimal.

What could be done to overcome it? First, we could introduce a notion of callable property for Midgard schemas, turning our (implied) getters/setters into a proxy that calls specific interfaces which can be announced and subscribed to by an user application or by a Midgard core itself (for relation purposes, for example). Upon loading the schema, Midgard core would create appropriate GObject classes and implement proxy methods for callable properties, similar to what is done in GTK+ UI builder. The real difference would be to have these method callers to propagate through language boundaries, giving an application developer an easy way to connect his specific activities to object hierarchies. This could reduce fair amount of class inheritance and simplify applications.

Second, above change is applied to a class hierarchy. It doesn’t allow you to handle an instance differently to what class supposed to do. Augmenting any property of an instance at run-time with some closure would actually help here. It also helps for more targeting caching of the data handled by the property.

From a Property pattern one thing that makes little sense for Midgard object’s properties is a property removal. As Midgard application is backed by some store (SQL currently), removing property means damaging a structure of the store. However, making possible to remove callable properties might make sense. It also could be a nice to allow removing (making inaccessible) properties to provide sand-boxing and similar features. This approach could make more natural some operations, like “killing” an article—just prune its connection with a parent topic.

Posted at 8am on 10/31/08 | Posted in | no responses | read on

Google Chrome introduction: free software development depicted right

Google went an unusual way to tell the world about their new free software project: Google Chrome (the page might not open correctly for a while, Google didn’t promise exact date yet). Project announcement came in as dead tree comics, delivered via snail mail to Philipp Lenssen of Google Blogoscoped fame. Philipp scanned the comics and published it.

These comics series are brilliant work of Scott McCloud and deserve to be enjoyed by themselves even if you’re technology hater. However, the thing I want to focus here isn’t what shiny future to web hitchhikers would reflect on Google Chrome’s surface. I’m sure this combination of new JavaScript engine and Webkit with operating systems’ architecture applied to a browser life would make our experience less crushable. I want to focus on a different aspect of this announcement…

Posted at 3pm on 09/01/08 | Posted in | no responses | read on

Váli

The next Midgard version 8.09 is designed to be a long term supported release, code named ‘Ragnaroek’. The code name is meant to play well with Scandinavian mythology where Ragnaroek is end of human’s world, Midgard.

However, there are persons who survived end of the world. One of them is Váli, son of Odin, who was born for the sole purpose of killing Höðr as revenge for Höðr’s accidental murder of his half-brother, Baldr.

There is a project in works by me to rewrite Midgard’s core engine from plain C to Vala. Midgard 8.09’s code is taking huge use of GObject infrastructure and Vala is so good in expressing GObjects that actual development is much much easier.

It is not surprising that the project itself will be code-named ‘Váli’. It will include both streamlining of Midgard core and use of SpiderMonkey java script language embedded engine (courtesy of Mozilla project) to allow server-side extension of the core. Some might see these changes as an attempt to bring more web developers to Midgard’s Core but as this will anyway happen after Ragnaroek, I think its pure target is to simplify work for remaining gods on a new world for mere humans.

Posted at 7am on 08/27/08 | Posted in | no responses | read on

Richard Stallman in Moscow

Richard Stallman, the founder of Free Software Foundation and GNU project, has visited Moscow and gave a number of lectures in two Russian universities. He also did a talk at Philosophy Institute of Russian Academy of Sciences titled “Copyright vs Community”. It was well attended, “Red room” hall in the Philosophy Institute’s old-fashioned building on Volkhonka str. was full and people were crowded along walls.

We recorded a video of RMS’ speech and made available in Ogg Theora format for everyone. The talk was done in English, questions and answers session is in English too. Hopefully, sound level is high enough to recognize public’s questions.

The video: OGG Theora [400Mb], Russian mirror (Moscow), another Russian mirror (Saint Petersburg).

Torrent on the Pirate Bay: http://torrents.thepiratebay.org/4066450/rms-moscow-2008-copyright-vs-community.4066450.TPB.torrent

Posted at 8am on 03/06/08 | Posted in | no responses | read on

Nice view

Today I went to an annual IBM Forum in Moscow which was held at newly opened Ritz-Carlton hotel, right near Kremlin. After escaping Forum’s party I made couple of pictures of Historical Museum and Kremlin panorama. This picture, I think, is worth sharing:

State History Museum
Posted at 11am on 11/20/07 | Posted in | no responses | read on

N810 and geo-mapping

My proposal has been selected by Maemo Developer Device programme for Nokia N810 device. This time (I’ve been accepted into 770 and N800 programmes as well) I’d like to concentrate on a bit different things than usual: geo-mapping.

My initial idea was to work on Roadster port to Maemo. Roadster is nice Cairo-based vector geo-mapping software. However, it is not so visible and a bit “unsuitable” for mobile devices as it relies on full-featured SQL server use (MySQL for the moment). It is not that hard to make it working with SQLite, for example, but this is not what I’d like to focus on.

With GPS navigation gearing towards ‘GPS in each smarphone and car’ almost everyone ‘plain Joe’ is capable to record GPS tracks and with some software support be his own map provider. Sure, this requires substantial effort but it doesn’t stop anyone. In many countries the mapping data business requires a state license or permit but non-commercial use of such hand-made information still possible.

Community-based geo-mapping tends to highly vary on Earth region. Number of deciding factors are actually availability of easily accessible software and community. This has certain consequences:

  1. There are many home-grown map formats. Some come from commercial providers (Garmin, etc), some are ‘mandated’ by governments (e.g., TIGER), some come from traditional GIS systems. Most of them aren’t documented or documentation isn’t open enough to allow free software implementations. More to that, some of used formats aren’t good for embedded devices’ use.
  2. There are only handful of low-priced mapping editors of good quality. Low-priced also includes free software. To the later we have OpenStreetMap project and couple of other things, one of attractable is GPSMapEdit from Geopainting.com.
  3. Because of non-uniform popularity of certain products around the globe, there are bunch of maps created in different formats. For OpenStreetMap project the goal is to eventually unite data from different countries in one source and provide uniform access to it. It is an ideal world with an ideal coverage where everyone is using this community-created data and maps.

The latter, however, isn’t what consumers in different countries are actually using, mostly because having world-wide project doesn’t mean everyone would fly to it and happily work on it. Language and communication issues might be key factors here, customs and traditions might be good detractors as well: if someone has his own maps in certain format and is happy with his software why should he change to OpenStreetmap.

Particulary, in former Soviet Union countries there seems to be quite strong and enthusiastic movement around GPSMapEdit editor and corresponding (commercial) mapping software. The project itself has come through certain changes and even the company behind it split off with conflicts among developers and business people but as the editor still evolving and available as shareware (with partially available source code that allows re-use), many people in Russia and CIS countries continue to create and enhance their own maps using GPSMapEdit. Availability of the maps came to the point when for number of regions these ‘amateur’ maps (most of them done by enthusiasts and available on non-commercial base) do provide really viable alternative to commercial offerings.

It is an important point for free software users and developers. Most of those enthusiasts aren’t using free software operating systems on daily base. They quite happy with their Windows Mobile or other closed-source solutions as long as the maps they use could be loaded there. When hardware platforms with geo-mapping possibility (like N810) come it is support for particular map formats what limits them, not software itself. N810 comes with its own mapping software but I doubt it supports non-commercial vector maps and format for it is open. (Could someone clarify it?)

This is where I’d like to take the challenge. GPSMapEdit uses so-called ‘polish format’ (MP) as its source format for map editing. It allows to load, create, edit, and save maps in MP format, in addition to a number of specific binary formats. Using GPSMapEdit and MP format to allow compilation of maps to specific format, suitable for Roadster, I’d like to use existing Russia and CIS countries maps on Maemo platform.

The challenge is enormous:

  1. I need to port Roadster GUI to Maemo. This is relatively easy to do.
  2. I need to create a suitable vector-based format to store and use efficiently maps on Maemo platform, with minimal memory requirements and fast access/search of metadata.
  3. Ideally, I’d like to contribute codec/decoder for this format to GPSMapEdit so that people using it would be able to provide Roadster/Maemo-friendly maps by themselves, as there are a lot of concerns of giving access to MP sources of maps—there were precedents when non-commercial maps were resold without their owners permission. It would be good get them some hand as legal help isn’t always working in this industry, unfortunately.

As you can see, this is whole lot of work but as result this would benefit not only Maemo users. My personal benefit will be in ability to be on free software mapping platform and use maps of my own country, Republic of Belarus. More over, I’ve already got interest from other people who want also to tap into automatic geo-tagging from internet sources as well. Once we’ll get good and stable vector format to effectively process data on small devices, possibilities are countless.

Posted at 10am on 11/12/07 | Posted in | no responses | read on

Midgard at Protva

Last week I’ve participated in leading Russian free software conference “Protva” in Obninsk. Obninsk is a city ~180km away from Moscow where first civil nuclear reactor was made (it is still in use) and Protva is a nearby river. Free software developers all around CIS countries come to Obninsk every year since 2003 to talk and listen to talks of their fellows from different projects. Since then it became one of main regular technical conferences in Russia. The conference also co-located in space and time with LinuxFest, camping festival of free software followers, which is held since 1999 ~40 km away from Obninsk on shores of Protva.

I’ve been participating in programming committee of the conference for several years and quality of talks increases with each release. This year the conference was officially endorsed by the Ministry of IT and Communications of Russia, we were addressed by the Minister and secretary of Ministry’s working group on Free Software has given a long talk on how to program governmental machine to execute proper instructions (how to make government more free software-savvy in laws and in reality). The talk was very well received.

I had also my own talks. One was dedicated to the work we do at Samba Team on Clustered Samba (http://ctdb.samba.org/) and another one was about Midgard Project.

The latter one should have been delivered by Henri Bergius, Midgard Project leader, but he was unable to come in and I played his role though I have mustaches instead of his beard and my belly is a bit more noticeable. Oh, and I don’t drive a motorcycle but that wasn’t a problem in the conference hall. :-)

The Midgard talk was in fact dedicated to a phenomena of project’s survival through .com boom and fall out, and recycling of development team. Our main thesis is based on the mgd_social_life() function. The API interfaces are important, good API is hard to achieve, bad API is easier to implement and nightmare to get rid of. One of most important parts of API of free software project is its social behavior APIs. I personally think that by treating whole Midgard community as personal family we were able to survive these 9 years.

The talk was very well received. It appears that there were people who started their career in CMS world from Midgard and who are grateful to us for ideas and friendliness. Also, we announced two Midgard-based free software web-projects that were launched in Russia: FOSSPlanet, our Russian-speaking free software developers planet, and OpenPOWER Russia (I told about it already in December). Both projects use Midgard and Midcom for their interfaces, and are targeted developers audience.

I’ve also been busy on documenting the conference this year. We did video and audio recordings, and now working on conversion of them to more compact format. All materials are being uploaded to ftp://ftp.altlinux.org/pub/people/ab/protva07/ and I hope to get everything published by August, 10th.

Oh, by the way, the conference was held completely in Russian, so if you wondered where to get decent Russian material to learn the language, you’re welcome to listen to us. :-)

Posted at 7am on 08/02/07 | Posted in | no responses | read on

Open Russian Power

There are numerous projects on the Net which provide access to a different hardware for free software developers. For example, Source Forge provides compile farm consisting of twelve hosts of different operating systems and architectures. There are other resources as well. However, most of them provide you with more or less common hardware (namely, x86 and x86_64 machines). Some of hardware vendors also give access to their more exclusive devices but this is much rare case.

Posted at 3pm on 12/09/06 | Posted in | no responses | read on

Samba-related pages

There are several Samba-related pages on this web-site. To get them easily accessible I’ve put this placeholder

Posted at 3pm on 04/02/06 | Posted in | no responses | read on

Categories

Syndicate