Nepomuk - Simplifying the debugging process21 Mar 2013
When something goes wrong in Nepomuk, its easy for us Nepomuk developers to track it down, but for other developers and users it can be quite hard. Even simple things like reporting which component is malfunctioning isn’t completely obvious.
Over the last month, we have simplified some of the external details and added tools which will help us debug your problems so that we can fix things more easily. These all will be shipped with nepomuk-core in 4.11
Nepomuk, like most modular architectures, has a number of different plugins or as we like to call them “services”. Traditionally each service would be installed as a library that would be loaded by the
nepomukservicestub process. When most users would try to provide debugging information they mostly just provide the process name - nepomukservicestub. This doesn’t tell us much, since all the heavy lifting is done by the nepomuk services. The client libraries are mostly just light wrappers.
With the 4.10 release we have 3 major services -
- Storage Service
- File Watch Service
- File Indexing Service
Each can be started by calling the
nepomukservicestub along with the service name. Eg -
Currently in master, we have moved away from this approach and each service now installs its own process. So you should no longer see any nepomukservicestubs. Instead you’ll see a
This greatly simplifies the debugging process as the users can easily report which process is problematic, and starting a service is just a matter of running the correct executable.
Restarting Nepomuk and looking into the database has traditionally required some dbus commands. These commands were always apparent to us developers, but it’s good to have some standard ways of managing Nepomuk.
Thanks to Gabriel, we now have
nepomukctl which acts very similar to the
akonadictl. It can be easily used to start, stop and restart Nepomuk or any individual service.
This is a great tool to check if Nepomuk is actually running.
In order to view the data inside the Nepomuk database one typically needs to issue a query. This requires the developers to know SPARQL. Typically users do not want to go into so much effort when they are debugging simple stuff.
nepomukshow can be used to easily view the resource information.
This is a great tool to use to see what all information has been indexed about a file or if a file has been indexed at all. It can even be used to check if an email has been indexed, though the syntax is a little different.
Most developers already know of
nepomukcmd which was an alias on top of
sopranocmd. It could be used to query Nepomuk and contained many more soprano specific features which are now no longer applicable.
We are now shipping our own
nepomukcmd tool, which currently only supports sparql queries. It does however support a neat
--inference option which can be used to selectively enable and disable inferencing.
These tools right now are in a very early, simple but working state and could use some polishing, and extra features in the future. Contributing to these would be a great way to get involved in Nepomuk. Message me for more details.