DanielW’s Blog

October 11, 2008

Why Nepomuk could not fully replace (My)SQL in Amarok (yet)

Filed under: GSoC 2008 — Tags: , , , — DanielW @ 7:05 pm

This is another post about collection backends in Amarok. The others posts explained the switch to MySQL embedded and tried to address some of the concerns. Jefferai also wrote a few things about Nepomuk in Amarok (and why it will not fully replace the sql based collections) which I want to comment on and add to.

There are user asking: “There is Nepomuk in KDE for storing meta data why the switch to MySQL embedded you could just use Nepomuk and drop sql collection all together.” With reasons like: “Nepomuk can do this and that better and one storage in KDE for everything is best.”  They are not complete wrong, there are good reasons to use Nepomuk (data sharing between applications, system wide searching, using strigi(and taglib) for collection scanning at a central place for all applications once, interconnect the data with other data (like let Kmail store where I got that song from), and others)

But Jefferai is right when he says that Nepomuk can not replace the sql collection for everyone and every use case. At least not for the short and longer midterm (;-)).

Why? Not everyone will or could run Nepomuk for different reasons. The most important one: It is a quite complex big software in terms of memory usage (though I think that will improve in time and the amount of available memory in computers is growing fast) and CPU usage. Another issue is: At least in the short and midterm it it will be significant slower than the MySQL based collection. It is not useless slow but well sqlite isn’t useless slow either (faster than Nepomuk atm) and people complained. So: For slower older computers, lightweight media devices, mobile devices, big collections, java “haters” even a perfect done Nepomuk collection with a bug free Nepomuk (we are not there yet…) would be out of question.

I expect some of those issues to improve over time. (I hope we will see a faster C/C++ based storage backend for Nepomuk). But still Nepomuk is a new technology and there is not much experience with it yet amoung users, developers and important here “developing users” (those who create small scripts and apps to work on the sql data from amarok to do different things with that, mostly for their own usage).

Don’t get me wrong: I like Nepomuk and it possibilities for Amarok. It is not useless slow. In fact I am using it as my main collection backend in Amarok for months now. But it is in a similar state as KDE 4 in pre 4.0 days. You could use it but it not feature complete, it is not really stable it has its issues and there will be major changes to some of its parts. Well I hoped to have it (and the related Nepomuk service) in a better shape by now. Sorry for that, my time is very limited at the moment but work has not stopped fully and I am still planing to bring it into a useful shape.

A few words on the Nepomuk service: It will monitor Nepomuk/Strigi for new music and use taglib to read data Strigi can not read (yet?) to fill it. It then creates new music (tracks, artists and so on) resources in the Nepomuk storage. It should also inform interested applications about new music. Overall it aims to have always all music of the user in an easy to access way available for use in media players, music management applications and others.

That should make it easier (and faster!) for Amarok (and others) to use the data.

For example at the moment (ontology not final) to get a QStringList of all artists of the music on the computer in your application is as easy as (when using Strigi, Nepomuk and the unreleased service) :

QStringList artists;
QList<Nepomuk::Resource> artistsResources
    = Nepomuk::ResourceManager::allResourcesOfType( "http://purl.org/ontology/mo/MusicArtist" );
foreach( Nepomuk::Resource &artistResource, artistResources)
{
    artists << artistResource.label();
}

The flexible Amarok 2 collection framework will allow both (Sql and Nepomuk) collection living together at users choice and maybe in a few years Nepomuk (with faster backend?) could become the default.

15 Comments »

  1. could you please please please make a code drop of the service as soon as possible ? i am heavily appalled by the no-other-choice-switch to mysql and really dont want it on my system(again). a nepomuk based collection would solve all my issues in one go and i would greatly appreciate it, even if the code is not yet stable and i might even have to hack on it myself.

    Comment by MaxxCorp — October 13, 2008 @ 11:26 am

  2. There is s new for us! Thank you!

    Comment by Lucia — February 10, 2009 @ 1:24 pm

  3. Теперь я скажу несколько слов о подводке к дичи молодой собаки и о ее стойке.(В работе собаки по дичи следует различать 4 момента (подразделения) ее работы:

    1 — поиск, длящийся до того момента, как собака начнет причуивать признаки присутствия дичи в доступном для ее чутья расстоянии;

    2 — потяжку — работа собаки, разбирающейся в донесшемся до нее запахе до момента окончательного определения ею наличия дичи; эта работа заканчивается

    Comment by Cideideof — April 15, 2009 @ 12:10 pm

  4. Does anyone know if there is another language or set of commands beside SQL for talking with databases?

    I’m working on a project and am doing some research thanks

    Comment by SQL Tutorials — May 1, 2009 @ 4:38 am

  5. списки кандидатов, выдвигаемые партиями политическими и избирательными объединениями (блоками) на выборах в представительные органы, проводимые по пропорциональной избирательной системе.

    Comment by Словарь Юриста — July 24, 2009 @ 1:44 am

  6. Большущее спасибо! Совершенно помогла воша информацея!!!))))))

    Comment by paurritruch — August 3, 2009 @ 3:23 am

  7. Большущее спасибо! Совершенно помогла воша информацея!!!))))))

    Comment by ThadlyTeelt — August 3, 2009 @ 9:58 pm

  8. Класс!!! Круто!!!

    Comment by Feeklyluh — August 4, 2009 @ 12:39 am

  9. Зачет!:) Но есть и минус небольшой! У меня скорость инета 112 кб в секунду. Пага грузилась около 20 секунд.

    Comment by Владимир Рыбин — August 18, 2009 @ 1:10 pm

  10. Можно и по этому вопросу, ведь только в споре может зародиться истина. :)

    Comment by мeкy — August 22, 2009 @ 3:48 pm

  11. Мегареспект !!!!!

    Comment by Tenadodia — August 27, 2009 @ 11:46 pm

  12. Нужно посмотреть,Спасибо

    Comment by errossige — September 15, 2009 @ 11:59 pm

  13. Привет. Образовалась проблема - купил я электродрель на магазин ру
    А она сломалась у меня в тот ведь день - гарантии практически никакой не дали. Просто почта пришла с коробкой, а там все на китайском. Написал в магазин данный, дали ответ, что обращайтесь в сервис центр, но у меня ни документов на руках нет, ничего. Как можно приструнить этот онлайн магазин? Есть ли некие компетентные органы, что писать. Куда писать, кому писать. Сделал ошибку, да, надо было в магазине нормальном прикупить, хотя нужной мне модели просто не было, да и подешевле в интернет-магазине. А вот и уже сижу у разбитого корыта. Подскажите, что делать.

    Comment by Sterlimastiv — October 5, 2009 @ 10:40 pm

  14. Между прочим, лучший способ обезопасить себя от шпионских жучков - задействовать Подавитель сотовой связи

    Comment by Подавитель мобильных — October 9, 2009 @ 11:11 pm

  15. Как всегда замечательный пост. Спасибо

    Comment by Николай Алексеев — December 22, 2009 @ 8:10 pm

RSS feed for comments on this post. TrackBack URL

Leave a comment

Powered by WordPress