Motorcycle Adventures and Free Software

Weblog: Archive

2008-11-01 - 2008-11-30

Midgard and content filtering

Posted on 2008-11-01 11:46:58 UTC in 60° 10.512 N 24° 55.152 E Helsinki, FI to . 0 comments.

Gadgetopia has a post on how CMS's should provide an API for content filtering. Since Midgard is persistent storage API first, and CMS only second we obviously have nice APIs for doing exactly this.

In this case we're running a query and checking if a different user is allowed to see something, as specified by Gadgetopia:

Hey, CMS, I have this list of content IDs here… How did I get them? Yeah, well, that’s not that important right now…

Anyway, can you look at this and tell me which ones I can show Nathaniel Snerpis? Here, just take them all, and give me back the ones I can show him.

With Midgard you do this by fetching the objects first with Query Builder, and then checking their permissions via MidCOM auth service. When user is logged in, his ACLs are already automatically applied to the results so no checks are needed.

<?php
// In this example we have some pre-gathered list of GUIDs
$guids_array
(
    '35c2b080736b11dd935ab300c51623d723d7',
    '18aa22ee736b11dd935ab300c51623d723d7',
);

// Instantiate a query builder
$qb = midcom_db_article::new_query_builder();
$qb->add_constraint('guid', 'IN', $guids_array);

// Get the articles
$articles = $qb->execute();

// We need Nathaniel Snerpis' GUID to perform the ACL check
$nathaniel = $_MIDCOM->auth->get_user_by_name('nathaniel');

// Loop through the articles and check permissions
foreach ($articles as $article)
{
    // Check if Nathaniel is allowed to see this
    if ($_MIDCOM->auth->can_do('midgard:read', $article, $nathaniel))
    {
        // Show the article to Nathaniel
    }
}
?>

You can see here that we're using GUIDs, not IDs to refer to content. This is because GUIDs (compliant with the UUID spec) are replication-safe, and you can trust them to be the same on every system in your Midgard cluster.

Note: in this case the API example was in PHP. But with Midgard 9.03 you will be able to use the exact same APIs with Python and Mono.

Sponsored links

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

Midgard: benefits of synchronized releases

Posted on 2008-11-03 15:28:05 UTC in 60° 11.232 N 24° 58.440 E Helsinki, FI to . 0 comments.

From the Midgard Project:

The Midgard Project switched to a new synchronized release model with the 8.09 "Ragnaroek LTS" release. Synchronized release model means that a major release of Midgard will happen every six months, tuned to be part of the larger Linux software ecosystem as described by Mark Shuttleworth:

WHAT IF you knew that the next long-term supported releases of Ubuntu, Debian, Red Hat and Novell Linux would all have the same major versions of kernel, GCC, X, GNOME, KDE, OO.o and Mozilla. Would that make a major difference for you? I’m willing to bet not - that from a customer view, folks who prefer X will still prefer X. A person who prefers Red Hat will stick with Red Hat. But from a developer view, would that make it easier to collaborate? Dramatically so.

...


The same model has been employed very successfully by major projects like GNOME, Eclipse and the Ubuntu distribution. As Midgard relies on many GNOME technologies, being in the same release cycle with them helps our development immensely, and makes Midgard more easy to install because we have a more stable set of dependencies.

Finland, freedom, censorship

Posted on 2008-11-04 07:05:15 UTC in 60° 11.232 N 24° 58.440 E Helsinki, FI to . 0 comments.

According to recent Helsingin Sanomat poll, 73% percent of Finns aged 55-64 years wanted to "control" the Internet, removing freedom of speech as necessary, in the light of the recent school shootings.

I've got very little to say to them, except:

"Those who would sacrifice freedom for security deserve neither" - Benjamin Franklin

Every knee-jerk reaction like this only fights the symptoms, not the causes of problems our society is facing. And at the same time, little by little, we erode away the values European culture has been built on.

Europe got ahead by applying new ways of thinking during the Age of Enlightenment. Now, facing global competition, is it really a good time to become like China?

Not everything goes according to plan

Posted on 2008-11-06 20:57:19 UTC in 60° 11.178 N 24° 49.956 E 6km NW of Helsinki, FI to . 0 comments.

Damn. As Slate put it:

Distance also magnifies the impact of negative feelings like longing and suspicion; according to one study, intercity lovers are more likely to be depressed

What next? I don't know, maybe focus on some core competencies...

Royal Enfield somewhere in Poland

Midgard Gathering 2008

Posted on 2008-11-07 14:42:25 UTC in 60° 11.178 N 24° 49.956 E 6km NW of Helsinki, FI to . 0 comments.

The second Midgard Gathering of 2008 is this weekend in Otaniemi, Espoo. Happened so far:

Thursday

Friday

Saturday

  • Saturday started with waking up the various Midgardians sleeping in OK20
  • Alexander gave a presentation on how Midgard's internals could be ported from straight C into Vala
  • We discussed reorganizing Midgard's documentation and appointed Solt and Neithan to be in charge of it. I expect to see lots of documentation-related bugs in Trac
  • Split in MidCOM between "core" and "contrib" components was clarified and we made an updated list of core components and discussed some components we hope to promote to core soon
  • Midgard 9.03 feature list is now decided. With 9.03 we will focus on the persistent storage and MVC layers of Midgard, and plan to add the CMS features on the application level around 9.09
  • Rambo, in his role as a VCS Tyrant started reorganizing Midgard's SVN
  • We started planning a foundation to govern the Midgard project. This will not be a big thing like Mozilla and GNOME foundations, but mostly a practical instrument for handling copyrights and Midgard Gathering arrangements
  • In the evening we went to Kaisla for some beers to celebrate the fact that Midgard actually did compile (though not run) on Windows

Some pictures on Flickr.

Meme: Ten years

Posted on 2008-11-11 22:59:22 UTC in 60° 10.512 N 24° 55.152 E Helsinki, FI to . 0 comments.

Ten years ago, 1998

  1. Started my first "real job" as a site building in an ad agency
  2. Moved out of the commune
  3. We were running already the first production Midgard site
  4. Was in process of handing Harmaasudet over. By spring 1999 I would be out

Five years ago, 2003

  1. Did my first motorcycle trip to Russia
  2. Co-organized a very nice conference in the Harvard university
  3. The relationship started in 1998 ended
  4. Had been running my own business for two years, and it was finally cash-positive

Three years ago, 2005

  1. Learned to fly
  2. Spent the summer holiday on a Viking ship in Russia
  3. Visited Rome, Brazil and the cave city of Vardzia for the first time
  4. Had a cat

Year ago, 2007

  1. Released my first mobile application
  2. Changed homes and motorcycles
  3. Got robbed twice, for a total of about 15,000 EUR
  4. The company got an AAA credit rating

This year so far

  1. Got black belt in Haedong Kumdo, a Korean sword art
  2. Moved partially to Istanbul, and then didn't
  3. Saw Midgard2 finally become a reality
  4. Did not motorcycle or fly almost at all, but traveled quite a lot

Yesterday

  1. Recovered from the Midgard Gathering
  2. Returned the rented white tie suit
  3. Did some customer support duty

Today

  1. Upgraded some Midgard servers to Ragnaroek, with varying degrees of success
  2. Got my local development environment back up-and-running
  3. Missed two after-work meetings

Tomorrow

  1. Will go to Haedong Kumdo after a long break
  2. Wear my black christmas hat for the first time this season
  3. Do some calendar digging for missing hour reports

Next year, 2009

  1. Get out of debt caused by the disasters of 2007
  2. Get back into the motorcycle adventurer mode
  3. Learn to sail on modern boats

Via Tiuku.

Nemein is going to Ubuntu Server

Posted on 2008-11-14 09:37:34 UTC in 60° 11.250 N 24° 58.188 E Helsinki, FI to . 0 comments.

At Nemein we do maintenance for quite a few servers of our customers. While some customers have their own Linux distribution preference - usually RHEL - in most cases we have a say what distribution runs their servers. So far this has been debian, but now we're going for Ubuntu Server.

Ubuntu and Midgard

The reasons for this are quite simple:

While not everybody is happy about the way Ubuntu has established itself in the market, there seems to be a strong gravitation towards switching to it, on both desktop and server.

On innovation, and how choice is not always good

Posted on 2008-11-16 20:55:33 UTC in 60° 10.512 N 24° 55.152 E Helsinki, FI to . 0 comments.

JP Rangaswami is writing about how innovation should happen as a dialogue between the developers and the users of the product. As an example of how innovation used to happen, he dug up Henry Ford's early automobiles and assembly lines.

With these early Fords, the customer choice was limited to having your car "in any color as long as it is black". And judging how since then cars have diversified to come in so many different forms, specialities and colors, this thinking must be flawed, no?

As Tim O'Reilly pointed out, JP Rangaswami's blog talks about enhancing the consumer experience in markets that are already out there and are mature. In less established fields, the lone inventor must still press on:

In a talk I attended many years ago, Joseph Campbell said that the Knights of the Round Table were the archetypal myth of Western civilization, the idea that each of us, alone, must go off into the deepest, darkest part of the forest, populated by monsters, on a quest to make the world a better place.

An interesting comparison with Ford at another, still quite immature and emerging field is Apple. Apple provides a full range of computers from servers to mobile phones and in most cases seeks to control the experience through the whole way. The devices are beautifully designed and work well as long as you use them as intended, and not for anything else.

This is a big contrast to the rest of the computing world, where everything comes with a bewildering number of choices. And these choices rarely work so well with each other. And so Apple is able to utilize their singular vision and attention to detail to make very good business.

In the free software world, the same distinction has traditionally been between the GNOME and KDE projects. GNOME has focused on a controlled environment with strong usability and accessibility, while KDE has been about the freedom to tinker and configure.

At some point users will want to manifest their personality or a tribal identity through how they set up their computers. But at the moment I believe we still need more the working systems that we can use, don't have to spend too much time configuring, and that let us focus on whatever we want to accomplish.

This is what originally drove me from my HP Linux laptop to an iBook four years ago. When I ran Linux I found myself constantly tweaking settings and installing new interesting applications that were supposed to improve my life. With Mac, once some basic necessities had been set up, I have very rarely touched any settings.

Now the iPhone experience has got me to feel the downsides of Apple's total control, and I'm again looking over the fence to see if free software is greener on the other side. While with Linux I would have full control of my environment, the whole synchronized release business keep things fresh enough. Given that a new GNOME desktop and a new Ubuntu would be out in just a few months, I should be able to fight the urge to start upgrading bits and pieces on my own, ruining productivity and potentially breaking my work environment.

If SubEthaEdit wasn't locking me to OS X, I would definitely be trying this out.

As an afterthought

All this talk of Ford got me to think a little about the car problem. Cars make cities unlivable and pollute the world, but at the same time they let people accomplish and experience things that they couldn't without personal transport.

Now the conventional thinking seems to be that what the world needs is more energy efficient, cleaner cars. But to my point of view, that is quite close to what Ford said:

If I'd asked people what they wanted, they'd have said "faster horses"

So how about solving the problem in some other way? Segways tried and failed to make mobility more even more personal and less space-requiring - but not very appealing in chilly Helsinki weather. But how about making the world require less mobility in the first place? Maybe World of Warcraft, Skype and Second Life - the field of telepresence - are better answers to the car problem than Prius or Tesla.

Technorati Tags: , , , , , , ,

Maemo.org goes Ragnaroek

Posted on 2008-11-18 16:54:52 UTC in 60° 10.512 N 24° 55.152 E Helsinki, FI to . 0 comments.

Maemo.org, the community site for Nokia's mobile Linux environment has this week been upgraded to 8.09.2 Ragnaroek, the much faster and long-term supported version of the Midgard framework. Thanks to Niels and Piotras for working with me on this!

in October, I spent quite a bit of time optimizing this release, shaving off an estimated 60-70% of queries through some smart caching and removed redundancies. In addition, a new database server is now in place. Together, these should get us quite far in the "Fast Server" agenda.

Maemo on Nov 18th

We're however still not done, and now we will do more optimizations that will be part of 8.09.3, due next week, and will move static files (images and javascript) to a separate lighttpd instance to remove that load from the normal Apache. When all this is done, the Maemo community should have infrastructure that will be able to serve it for a long time.

In addition to optimization, we've been working on some other features related to the website:

Midgard is a big and complex piece of software. If you notice any issues related to this upgrade, please let us know. And if you have any ideas on improving the website, be sure to file those too!

Technorati Tags: , , , ,

Summer of Code works

Posted on 2008-11-21 11:06:43 UTC in 60° 11.250 N 24° 58.188 E Helsinki, FI to . 0 comments.

COSS - Finnish Centre for Open Source Solutions

Prompted by a recent COSS news release, I thought to write about two Summer of Code success stories:

Not bad!

Technorati Tags: , , , , ,

Back