- It has been getting cold and wet during the last weeks. And I missed some ultimate frisbee training sessions because of not having the right clothes. I should really go shopping. Our mixed team from ultimate frisbee is the german champion for the second time in a row. Congratulations to all of them. They are going to some tournament in London on one of the next weekends.
- After trying to learn a lot for my probability theory exam I finally started to get productive. Yay!
- I get two computer magazines sent to my house: IX and Linux Magazin. Usually I have enoughe time to read the most interesting articles before the next edition comes out, but I bought a CT some weeks ago and now I am completely out of schedule.
- My computer starts to do funny things. I get a message about some accessibility feature not being present at every boot. If I am at the computer at around half past 10 (or half past 9?) in the morning, it hangs and I have to reboot it. The clock applet in Gnome does not work anymore. The computer hangs from time to time, but only when doing lots of stuff (compiling, email, webbrowser and probably more, all at the same time). Since some time ago another RAM bar died, I definitely have not enough RAM. Less than a GB at the moment. So I'm thinking about getting rid of this complicated Gentoo stuff and installing Fedora. But my machine is some years old and I want a new one. I only need the core parts, motherboard, CPU, fan, RAM, graphics adapter (if it is not onboard). So I'm thinking about buying some 4-core CPU and 4 GB of RAM and some cheap board with integrated graphics adapter (I can upgrade later). But I'll do at least one exam before.
- I read this news item about a guy (or actually more than one) building a $150 balloon with camera and GPS and taking pictures of space (the area around earth). I want to do that, too.
- I' thinking of getting rid of categories in this blog. They only make sense when they are used consistently, and I don't do that.
- I started using F-Spot for organizing my pictures. I also started hating pictures without embedded timestamps. Scans from old photographes, pictures from mobile phone cameras, pictures edited with a tool that removes that stuff. New tools, new restrictions. That's life.
Saturday, September 19. 2009
State of the union
Posted by Philipp Riegger
in Blog, Computer, Current, Dreams, Gentoo, University
at
15:28
| No comments
| No Trackbacks
So, what's going on that does not really fit into one of my diary-like posts?
Monday, May 25. 2009
Improved binary package support for Gentoo
I just posted this to the gentoo-dev ML, feel free to read and post comments.Good morning,
I want to talk about improved binary package support for Gentoo. About
1-2 months ago there already was a discussion about this on gentoo-soc@
and on bugzilla [1]. If I remember correctly, there were no devs
involved in the discussion, so I thought I'll post my thoughts here.
I know, that Gentoo is a source-based distribution or meta-distribution,
and I don't want to make Gentoo another Fedora or Ubuntu, but I think
there are some things we can learn from them.
The current situation:
Binary packages are (usually) stored
in /usr/portage/packages/$category/$package-$version.tbz2. The package
consists of the "real binary package" and the metadata (combined using
xpak or whatever).
Problems I see with this:
1) If a binary package is built because it needs to be linked against a
new library, because the USE-flags change or because the ebuild changes
without a revision bump, the "old" binary package is overwritten. This
also means that there is no support to store multiple packages with
different USE-flags without, well, using different directories.
2) To find out which USE-flags a package is built with, one needs to
download the package and look at the metadata. Today I discoveres a file
called "Packages" which looks like a metadata cache, but I did not find
more information about it (only tried "man portage").
So, how can we address this?
First we should do something about 2), I think: I want to propost the
following scheme:
Binary packages are stored in
$arch/$description/$category/$package/$package-$version-$ev-$use-$bv.tbz2.
$arch: This is x86, ppc or whatever you put into ACCEPT_KEYWORDS minus
the '~'. It does not make sense to make a distinction here.
$description: Something like pentium3, core2quad, G4, or whatever.
Pentium3-uclibc, Pentium3-solaris-prefix are also possible.
$category, $package and $version should be clear.
$ev: The "ebuild version". See below.
$bv: The "binary version". See below.
$use: The USE-flags. See below.
About ebuild version, USE-flags and binary version:
I would like to encode the USE-flags into the filename. This enables us
to have binary packages of the same version built with different
USE-flags in the same repository. Some wanted to have this in the
directory, some say it is ok to have it in the xpak only and some prefer
the "Packages"-like file.
I think, USE-flags can be set per package and therefore should be stored
per package, not per $description or whatever. Having it only in the
xpak allows no distinction between multiple binary packages, same
version, differen USE-flags and the same is true for the Packages file.
This would also be created, downloaded all the time and so on. Therefore
I think the cleanest solution is having USE-flags in the filename.
There are different methods to store it there.
a) A checksum (of the USE-flags, the USE-flag string, the ebuild and the
USE-flag string, whatever).
b) List the enabled USE-flags in the filename, use a) if the string gets
too long.
c) Use a packed binary vector.
I don't like a), because it is not easily reversible. You could always
download the Packages file or the binary package and look into the xpak
metadata, but that's too much effort. b) also has the problems i
mentioned for a). Also, you'd need some system to distinguish ebuilds
with the same version but different USE-flags. You also need that for
c), so b) has no advantages ofer c) in my eyes.
For c) I think of the following: Sort the USE-flags in some defined way
(ASCII code, whatever) and make a vector with a 1 for every enabled
USE-flag and a 0 for every disabled USE-flag. Compress that vector: If
you use HEX code, you need 1 character for every 4 bits, but it should
be possible to find 64 different characters, then you need 1 character
for every 6 bits. PHP has 106 USE.flags, that would make a USE-string
with about 18-27 characters. Packages with lots of USE-expand stuff like
languages would need more, but not too much, I think.
Problems: The string might get long, you get big problems with USE-flag
renames, USE-flag additions or removals. That's where the ebuild version
is needed. Or not. We have 3 possibilities:
a) Change policy: USE-flag changes in an ebuild need a version bump.
b) Use a checksum of the ebuild.
c) Use the version given by the version control system.
The problem with a) is, that is a change in policy and probably hard to
do. Increasing the revision for a (trivial) change leads to a lot of
unnecessary rebuilds for users. It also means, that USE-flag changes in
eclasses are difficult, the eclass should probably copied over to a new
name with version and only ebuilds with a new version (revision) are
allowed to use it.
The problem with b) is, that it is not ordered. You don't know, which is
the newest version. If you have an ebuild with a version where there is
no binary package for, it gets difficult/ugly.
c) also has problems: When using cvs, there are versions easily
available. The same is true for svn, but lots of distributed version
control systems like git use checksums as versions. Welcome back to b).
Another thing is, how do we get to the versions? Will they be in the
header forever, since they make signing ebuilds or the manifest much
more complicated (multiple commits necessary)? But, well, since metadata
is generated and provided by "the tree", it should be not too hard to ad
a unique ebuild version there (in the case of checksums, use an integer,
increase whenever the checksum changed or something). It just might make
using overlays a bit more difficult.
The last thing to be discribed is the binary version. Lots of people
talk about dependencies to other binary packages when they talk about
binary packages for Gentoo, but that gets quite difficult (and, in my
opinion, ugly). We mostly need to provide a "consistent set" of
packages, which means, if A depends on B, B changes and therefore breaks
A, we need to provide an updated version of A. And we can do that with
simply increasing the binary version, since the package manager knows
then, that this package needs updating, too.
How to create binary packages?
Create some build server (or build server infrastructure). The most
important thing is a script or something that provides the
functionality. One enters a make.conf, /etc/portage dir, path to the
profile, description and whatever else is needed and the system starty
building. Then you can create a second set of data and start building
and the system puts the binary packages in the same directory and
discovers what needs to be built and what not (because apache needs to
be built only once if its USE-flags are the same for the different
configuration sets).
But there are thousands of packages and millions of USE-flag
combinations!
Seriously, who cares? The goal of this project (as it exists in my head)
is not to provide everything. It is to provide the most used packages.
If you need parrot, compile it yourself. If you need netbeans, compile
it yourself. We have @system, gnome, kde and anothe hand full of
packages, which will change over time. I'm, really lookign forward to
the data collected by the statistics project (GSoC).
The same is true for USE-flags: We might provide gnome, kde, both, a
server profile and whatever we decide to provide, but not everthing.
Again, statistics will help.
Same with CFLAGS. Probably no -O3, no -ffast-math, no -break-my-code or
whatever. Probably x86 with 32 and 64 bit for the beginning, later maybe
more.
So, the really really cool thing is, that if you are some company,
university, institution or freak, with lots of (similar) Gentoo boxes,
you can set up a build server and even share the binary packages, if you
want. Same level of security as non-official overlays, but in the
university of FooBar in Jamaica uses it, there should not be too many
security problems.
Thanks for reading, please discuss, I probably forgot lots of stuff, but
I can tell it later in the discussion.
Philipp
[1] https://bugs.gentoo.org/show_bug.cgi?id=150031
Tuesday, January 27. 2009
FOSDEM

I'm going to FOSDEM this year. I will be in Brussels from february, 5th to 8th. I already have some things on my list I want to do there:
- On friday we plan to visit all the nice places in Brussels. Do the tourist thing. In the evening there is the world famous FOSDEM beer event in Délirium Café.
- On saturday there is FOSDEM. I plan to attend the following talks:
- On 10:00 and 10:30 there are introduction and keynote talks in Janson: "Welcome" and "Free. Open. Future?".
- On 15:00 there is a talks about reverse ingeneering protocols. It's in Chavanne (sp?).
- There's a lightning talk about bazaar at 15:20.
- On 16:00 there is an interesting talk in the XOrg developer room. The title is "Nouveau Status". Nouveau is the open source driver for nvidia cards. Something I want to try since a long long time but never got to it.
- On 17:00 and 18:00 there are 2 talks in the Ada developer room: "Ada Annex E, Distributed Systems" and "NARVAL". The second one seems to be some kind of project, implemented in Ada, which makes heavy use of annex E.
- Sunday will be a very interesting day at FOSDEM. I have lots and lots of talks on my list:
- There are 2 interesting talks about MySQL at 10:00 and 11:00. The first is about MySQL monitoring, it's in the MySQL developer room. The second is about MySQL High Availability, in Janson. I am looking forward to both of them, since they will be relevant for Bawue.Net. I installed munin there to do some monitoring (and it's still very far from beeing finished). I also want to set um a MySQL HA solution, since we install an own MySQL daemon for every service and vm, that could be important. The idea behind that is, that if the machine with our mysql server dies, we still want to be able to use backups, make announcements on our blog, receive email etc.. This would all go away if we had failsave MySQL.
- After that, my personal Bawue.Net track continues at 12:30 in the CentOs developer room. There is a talk about CentOS and gPXE and "poor man's SAN". Very interesting, since I want to get our diskless iSCSI based setup running ant it's exactly what they are talking about in this talk.
- At 14:00, 15:00 and 16:00 there are 3 talks on the kernel track in Janson: "Syslinux", "Ext4" and "Help, my system is slow". They all sound interesting and since I attended Andrew Mortons talk about the Linux kernel some years ago, I want to know more and who better to tell those things than a kernel developer?
- The kernel track collides with a talk about Ruby on Rails hostign at 16:15 and a Lightning talk about a P2P replicative filesystem at 16:20.
- At 17:15 there's a talk about GSoC (Google Summer of Code) in Janson.
I'm really looking forward to fosdem. I will go there with Andreas and Uli from Bawue.Net (if Andreas gets his car fixed by then). I'll meet some Gentoo people there, I guess. Really, really nice, everything. I hope I find the time to write a nice report once I'm back. And maybe I even get some pictures up here. Still got lots of them from last year, in case they survived my harddisk crash.
Friday, January 9. 2009
gdm + pam + password that contains special letters
I just had something like the most stupid problem for a long long while. My mothers new PC did not work, which means she could not login. The logfile said:Jan 9 17:08:10 kurt gdm[3149]: pam_unix(gdm:auth): authentication failure; logname= uid=0 euid=0 tty=:0 ruser= rhost= user=lotte
Jan 9 17:08:13 kurt gdm[3149]: WARNING: Couldn't authenticate user
Well, googling did not give me anything, so I tried rebuilding stuff and upgrading some packages. Nothing worked. In the end I decided to have a look at the Gentoo Bugzilla, if there's anything about it and I found a bug aboug gdm and wring locales. Well... before, the gdm screen was in german, then it somehow switched to english. I don't know, how and why. But now every y is a z, and so on... so I simply changed my mothers password that it contains all the "wrong" characters and now she can login again. Stupid hack, but since I don't have too much time at the moment...
Sunday, November 30. 2008
What's going on? - University
What's going on in university?
Well, I'm attending two lectures this semester: Wahrscheinlichkeitstheorie (proability theory) and algorithmische und kombinatorische Gruppentheorie (algorithmic and combinatoric group theory). Quite nice, actually.
I'm doing my two little jobs: Cluster administration combined with administration of the literature database and I'm a tutor for Theorie 2 (theory of computer science 2).
I could and should write much more, and hopefully I will do so soon. But at the moment my concentration is gone, I don't want to write more.
Well, I'm attending two lectures this semester: Wahrscheinlichkeitstheorie (proability theory) and algorithmische und kombinatorische Gruppentheorie (algorithmic and combinatoric group theory). Quite nice, actually.
I'm doing my two little jobs: Cluster administration combined with administration of the literature database and I'm a tutor for Theorie 2 (theory of computer science 2).
I could and should write much more, and hopefully I will do so soon. But at the moment my concentration is gone, I don't want to write more.
What's going on? - Computers
I already mentioned this article.
While trying to fix my Routerboard, I somehow managed to make my computer unusable. I have two network interfaces, and they were not sorted in the right way but in a random way. Not good, if you use static network configuration. Therefore I could not get dhcp and everything I needed to reinstall my routerboard running. My boot partition got destroyed in the progress of fixing the network problem. The fix was not to compile the driver for the second network card. Not good.
BTW: What is the right way of installing grob into the MBR of 2 harddrives and have the grub files on an md device?
Well, next thing was, that my mothers computer broke. It has problems from time to time (beeing six years old or something like that) and they can usually be "fixed" by opening the case and wiggling on every card, RAM module and cable. Well, this time it did not work. And I don't want to find the problem, since that's the most ugly job one can have. Well, the "break" is like this: If you switch on the computer, it beeps long, one time, it cannot be reached on the network and the monitor stays in standbye. I tried booting without harddrives, graphics card,... and since then I get the long beep every few seconds when the computer is switched on. Nce, isn't it?
Well, I was thinking about getting an EEE Box B202. It would be great for my mother, since she should have no problem with the slower 2,5" harddrive and the slower CPU. All she needs is Email and a Webbrowser. She uses Thunderbird and Firefox (although I want to switch her to Evolution one day, because I use it) which both use a lot of RAM, but 2 GB are really enough. She also wants to save the environment and stuff, so a computer that uses a maximum of 24 Watts should be ok. If Amazon had it on stock, I would already have ordered it.
My sister has an Acer laptop and problems from time to time. If it's software, I have to fix it. If it's hardware, she gives it back to the shop. That happened about 10 days ago, and since then my sister does not have a computer. First she used my mothers, but now that's broken. Quite bad, actually. I hope, she will have it back quite soon (and listen to me... you don't buy a cheap Acer if you want quality).
I found a nice blog post about removing stuff from xorg.conf. I could remove almost everything, I only have my graphics adapter section and the screen section left. Really nice. First I was looking into removing those two, too, but it's not worth the effort (if it's possible at all). Good thing: Less stuff in a strange config file. Bad thing: Where will I have to search for the reasons, when my xorg configuration breaks? But to be honest, that did not happen for a long long time. I hope, hal will not make it worse.
While trying to fix my Routerboard, I somehow managed to make my computer unusable. I have two network interfaces, and they were not sorted in the right way but in a random way. Not good, if you use static network configuration. Therefore I could not get dhcp and everything I needed to reinstall my routerboard running. My boot partition got destroyed in the progress of fixing the network problem. The fix was not to compile the driver for the second network card. Not good.
BTW: What is the right way of installing grob into the MBR of 2 harddrives and have the grub files on an md device?
Well, next thing was, that my mothers computer broke. It has problems from time to time (beeing six years old or something like that) and they can usually be "fixed" by opening the case and wiggling on every card, RAM module and cable. Well, this time it did not work. And I don't want to find the problem, since that's the most ugly job one can have. Well, the "break" is like this: If you switch on the computer, it beeps long, one time, it cannot be reached on the network and the monitor stays in standbye. I tried booting without harddrives, graphics card,... and since then I get the long beep every few seconds when the computer is switched on. Nce, isn't it?
Well, I was thinking about getting an EEE Box B202. It would be great for my mother, since she should have no problem with the slower 2,5" harddrive and the slower CPU. All she needs is Email and a Webbrowser. She uses Thunderbird and Firefox (although I want to switch her to Evolution one day, because I use it) which both use a lot of RAM, but 2 GB are really enough. She also wants to save the environment and stuff, so a computer that uses a maximum of 24 Watts should be ok. If Amazon had it on stock, I would already have ordered it.
My sister has an Acer laptop and problems from time to time. If it's software, I have to fix it. If it's hardware, she gives it back to the shop. That happened about 10 days ago, and since then my sister does not have a computer. First she used my mothers, but now that's broken. Quite bad, actually. I hope, she will have it back quite soon (and listen to me... you don't buy a cheap Acer if you want quality).
I found a nice blog post about removing stuff from xorg.conf. I could remove almost everything, I only have my graphics adapter section and the screen section left. Really nice. First I was looking into removing those two, too, but it's not worth the effort (if it's possible at all). Good thing: Less stuff in a strange config file. Bad thing: Where will I have to search for the reasons, when my xorg configuration breaks? But to be honest, that did not happen for a long long time. I hope, hal will not make it worse.
What's going on? - Routerboard RB433 and OpenWRT
What else did I do?
I worked on my Routerboard 433. Yeah, I got it running. Thanks to Andreas, who I visited for an afternoon, who put OpenWRT Kamikaze on my routerboard and wrote a nice howto about the process.
I changed some things, later. I do not use the ath5k driver but madwifi and I do not use squashfs. I've got 64 MB NAND flash on the device, if I tell the bootloader to format the nand, it creates three partitions of which one is for the system. It's formated with yaffs2, so I simply used that and put an openwrt tarball on it. I did not get DSL running the way I wanted to, and later I got kernel panics because I upgraded the build root and put wrong modules on the board. I guess.
When I tried to reinstall it, I got lots of other strange problems. You can read about them in the "What's going on? - Computers" post.
But: OpenWRT works really well. I'm impressed. And it's also possible to get used to this very strange kind of linux designed to have a read only root filesystem.
I worked on my Routerboard 433. Yeah, I got it running. Thanks to Andreas, who I visited for an afternoon, who put OpenWRT Kamikaze on my routerboard and wrote a nice howto about the process.
I changed some things, later. I do not use the ath5k driver but madwifi and I do not use squashfs. I've got 64 MB NAND flash on the device, if I tell the bootloader to format the nand, it creates three partitions of which one is for the system. It's formated with yaffs2, so I simply used that and put an openwrt tarball on it. I did not get DSL running the way I wanted to, and later I got kernel panics because I upgraded the build root and put wrong modules on the board. I guess.
When I tried to reinstall it, I got lots of other strange problems. You can read about them in the "What's going on? - Computers" post.
But: OpenWRT works really well. I'm impressed. And it's also possible to get used to this very strange kind of linux designed to have a read only root filesystem.
What's going on? - Bawue.Net
Hi there, long time no see.
What did I do during the last weeks? Well, lots of things and nothing.
I worked on two projekts for Bawue.Net, a munin monitoring server and a trac/subversion server. Nothing is finished yet (well, I'll have to write a dozen of munin plugins to monitor everything we have and I have to do some database design and include trac/munin into our authentication, management and whatever system).
About munin: It's working quite nice, we already found some problems and some of our machines have a significantly higher CPU load (not system load, though). I like it. What I don't like is the munin-exchange plugin exchange website. It could be easier to use and lots of scripts were corrected in the comments. there sould be a way to get out a newer version of a module. Maybe we can do something like that for the modules we use from there on our new trac/svn server.
About trac: It's really nice (setup, configuration, I never really used it). You just install trac (CentOS or EPEL has it), configure mod_wsgi, get the wsgi wrapper script from somewhere and it runs. Authentification is done with htaccess, which is quite easy to connect to our MySQL database containing all users and passwords. I still need to look into skins (not everyone likes the trac default apparently) and into automatic creation of projects, automatic deletion and backup.
About svn: Easy to set up (apache), authentication can be a bitch, though. I plan to implement authentication with hook scripts (check username and password which comes from mysql, check permissions, accept or decline). For that I need to design the database, but I'm too lazy for that right now.
What did I do during the last weeks? Well, lots of things and nothing.
I worked on two projekts for Bawue.Net, a munin monitoring server and a trac/subversion server. Nothing is finished yet (well, I'll have to write a dozen of munin plugins to monitor everything we have and I have to do some database design and include trac/munin into our authentication, management and whatever system).
About munin: It's working quite nice, we already found some problems and some of our machines have a significantly higher CPU load (not system load, though). I like it. What I don't like is the munin-exchange plugin exchange website. It could be easier to use and lots of scripts were corrected in the comments. there sould be a way to get out a newer version of a module. Maybe we can do something like that for the modules we use from there on our new trac/svn server.
About trac: It's really nice (setup, configuration, I never really used it). You just install trac (CentOS or EPEL has it), configure mod_wsgi, get the wsgi wrapper script from somewhere and it runs. Authentification is done with htaccess, which is quite easy to connect to our MySQL database containing all users and passwords. I still need to look into skins (not everyone likes the trac default apparently) and into automatic creation of projects, automatic deletion and backup.
About svn: Easy to set up (apache), authentication can be a bitch, though. I plan to implement authentication with hook scripts (check username and password which comes from mysql, check permissions, accept or decline). For that I need to design the database, but I'm too lazy for that right now.
Sunday, November 16. 2008
Better user interfaces
Some days ago I read an article (probably golem.de, I'm too lazy to find the link) about some Mozilla guy trying out new user interfaces. He stated, that a lot of the current interfaces are bad (which is definitely true) and if I understand is correctly, there are basically two directions in which research can go:
Some more things I have to say about the first direction: It's maybe the same as using keyboard shortcuts. You don't know them when you start using the application, but if you get to know them you can boost your productivity. Somwhere in the article they stated, that keyboard shortcuts and context menus and stuff are bad, but I forgot why.
Another example is TrekBuddy, a GPS appliation for mobbile phones. I used it some time ago with a Siemens mobile phone to have GPS. I thought, it was configured wrong or something because I did not get any usefull information from it (just a world map, a dot for the waypoint on it and an arrow for the position where I was to the waypoint). I called the friend from whom I had borrowed the phone and who had put the software on it for me, and he explained to me the most important things: You have to anter the menu using the key above the "1" (ok, i knew that), if you press start there, GPS is switched on (interesting way of switching on and off this whole system of the phone, I had looked for the switch outside of the Java application) and you can press '#' to move from one display to another (who would have guessed that?). With that I could enter the next waypoint, start gps, switch to the display that shows me the current signal quality and the direction in which I had to go.
Another thing this guy mentioned in his article were the "Do you really want to do that?"-popups. Basically, they are not too bad, because if you accidently hit the "close" keyboard shortcut for your webbrowser and lose lots of open tabs and stuff? Recently you can work around this all with plugins, but not for Safari, as far as I know. These popups are bad, because you get used to them and click them away automatically. What would be a much better user interface is if there were no popups but this plugin like thing, just for everything. Either a global "undo", or something like "restart the application so that it looks like before you closed it", restart the application normally and have a "restore last session" button or whatever. Don't prevent things, correct them.
Today I missed this feature a lot. I wanted to search something in an IMAP mail folder in Evolution, wanted to clear the search (I do Ctrl+A Del for that) but the focus was not on the search bar (never trust the focus. It moves from window to window and there is no way of controlling it. How often have you typed a password into the wrong window just because another window was jumping in front of the one you were working with at the monent?) but on the mail folder. I deleted every email. I could restore it from teh trash of course, but there were about 60 unread mails from the last two months, very important emails, and no I have to reread every email and check, it I already read it (or in my case, if I already entered the data from the mail into the database).
I'll go back to work. Lots of mails to read.
- One can design/create a user interface which is easier to use. Examples are theMozillas mobile webbrowser, that shows the page in fullscreen and you can move this fullscreen size page to the, let's say, left side to have address bar and all the other stuff on the right side. This is totally non-intuitive, but easier to use once you learn it.
- The second way is to design intuitive interfaces. This is also quite an interesting field, since it's exactly what makes lots of users decide whether to use your application or another one.
Some more things I have to say about the first direction: It's maybe the same as using keyboard shortcuts. You don't know them when you start using the application, but if you get to know them you can boost your productivity. Somwhere in the article they stated, that keyboard shortcuts and context menus and stuff are bad, but I forgot why.
Another example is TrekBuddy, a GPS appliation for mobbile phones. I used it some time ago with a Siemens mobile phone to have GPS. I thought, it was configured wrong or something because I did not get any usefull information from it (just a world map, a dot for the waypoint on it and an arrow for the position where I was to the waypoint). I called the friend from whom I had borrowed the phone and who had put the software on it for me, and he explained to me the most important things: You have to anter the menu using the key above the "1" (ok, i knew that), if you press start there, GPS is switched on (interesting way of switching on and off this whole system of the phone, I had looked for the switch outside of the Java application) and you can press '#' to move from one display to another (who would have guessed that?). With that I could enter the next waypoint, start gps, switch to the display that shows me the current signal quality and the direction in which I had to go.
Another thing this guy mentioned in his article were the "Do you really want to do that?"-popups. Basically, they are not too bad, because if you accidently hit the "close" keyboard shortcut for your webbrowser and lose lots of open tabs and stuff? Recently you can work around this all with plugins, but not for Safari, as far as I know. These popups are bad, because you get used to them and click them away automatically. What would be a much better user interface is if there were no popups but this plugin like thing, just for everything. Either a global "undo", or something like "restart the application so that it looks like before you closed it", restart the application normally and have a "restore last session" button or whatever. Don't prevent things, correct them.
Today I missed this feature a lot. I wanted to search something in an IMAP mail folder in Evolution, wanted to clear the search (I do Ctrl+A Del for that) but the focus was not on the search bar (never trust the focus. It moves from window to window and there is no way of controlling it. How often have you typed a password into the wrong window just because another window was jumping in front of the one you were working with at the monent?) but on the mail folder. I deleted every email. I could restore it from teh trash of course, but there were about 60 unread mails from the last two months, very important emails, and no I have to reread every email and check, it I already read it (or in my case, if I already entered the data from the mail into the database).
I'll go back to work. Lots of mails to read.
Saturday, November 15. 2008
Firefox Tuneup
During the last few days I tuned my Firefox. Well... I'm using the latest Firefox 3, installed with Gentoo portage. Since switching to FF3 I always had the problem, that it behaved differently, in a way I did not like. I usually have six virtual desktops, three columns, two rows. In the top row I have Web Browser, Email/RSS and Instant Messenger (from left to right). the bottom row is for xterms (ssh, irssi, whatever), a desktop for work stuff (LaTex editor, whatever) and music. I like it ordered that way and I don't want windows bekonging to one application moving to another desktop. With FF2 that was ok, I started it on desktop one and it stayed there. If i clicked a link in jabber or in an email, it opened in a new tab on desktop one. Since FF3, the FF window always moved to the desktop where I clicked the link.
Some days ago I read some planet website (Debian? CentOS? Fedora? Gentoo? Probably Debian...) and I found a great article called "Firefox hidden config of the day". It consisted of not much more than one line:
"browser.tabs.loadDivertedInBackground = True and Firefox 3 no longer steals focus when I open link from external application."
Thanks a lot, that's the most beautifull thing that happend to me that day. FF3 with that config option still behaves differently than FF2 default: It does not change the desktop but it also does not focus on the new tab. But that's ok. I can really live with that and maybe it turns out to be better than FF2 behaviour.
Today, I read some (old) Google Open Source Blog posts and found a link to a post about ipv6. They write there, that google can be reached using ipv6 (and only ipv6) on the address ipve.google.com. Well, why not use it, I thought? I do have ipv6. So I changed their Google search plugin (or xml config file) to the following:
I only changed a "www" to "ipv6" and added some "(ipv6)" to the file, placed it in ~/.mozilla/firefox/${whatever}.default/searchplugins and restarted my firefox. Well, it works. Nice.
[Update:] Thanks Simon for pointing out, that the article was did only look good with about 1200 pixel width. I put the XML stuff in a textarea (<textarea style="width: 100%" cols="80" rows="17" readonly wrap="off">).
Some days ago I read some planet website (Debian? CentOS? Fedora? Gentoo? Probably Debian...) and I found a great article called "Firefox hidden config of the day". It consisted of not much more than one line:
"browser.tabs.loadDivertedInBackground = True and Firefox 3 no longer steals focus when I open link from external application."
Thanks a lot, that's the most beautifull thing that happend to me that day. FF3 with that config option still behaves differently than FF2 default: It does not change the desktop but it also does not focus on the new tab. But that's ok. I can really live with that and maybe it turns out to be better than FF2 behaviour.
Today, I read some (old) Google Open Source Blog posts and found a link to a post about ipv6. They write there, that google can be reached using ipv6 (and only ipv6) on the address ipve.google.com. Well, why not use it, I thought? I do have ipv6. So I changed their Google search plugin (or xml config file) to the following:
I only changed a "www" to "ipv6" and added some "(ipv6)" to the file, placed it in ~/.mozilla/firefox/${whatever}.default/searchplugins and restarted my firefox. Well, it works. Nice.
[Update:] Thanks Simon for pointing out, that the article was did only look good with about 1200 pixel width. I put the XML stuff in a textarea (<textarea style="width: 100%" cols="80" rows="17" readonly wrap="off">).
Thursday, October 9. 2008
USRP and SSRP
Yesterday, some new guy at the CCCS Mailinglist introduced himself to the list and asked, if somebody has an USRP or SSRP at home. Well, I did not know what he was talking about, but it sounded interesting, so I googled:
USRP is short for Universal Software Radio Peripheral. It is a USB (or GE, for the USRP2) connected board with some hardware on it that can receive radio signals (the full band, not just tuned to 1 channel), converts them to digital and sends it to the computer. The other way around works, too, you can send stuff. It is a nice tool, since it enables you to do lots and lots of things, starting from receiving FM radio, to receiving HDTV movies from the air, to GSM, GPS and WLAN. It's testing equipment, therefore you don't need a license to buy it. It's just, well, illegal to do some stuff with it.
The software tool used with that peripheral is GNU Radioand there's a wiki page about the USRP with all the stuff you need to build it on your own (software and hardware are GPL licensed) on that website. And did I mention, that there's an FPGA on that board? Really nice stuff.
If you are interested in this, I would recommend you to read the Wired article about GNU Radio.
The guy who designed this board is called Matt Ettus, and on his website he sells ready-to-use USRPs. But the price is quite high (at least for a hobbyist like me who only sees the new toy): The USRP is $700 and the USRP2 is twice that price.
That's where the SSRP project starts: SSRP stands for Simple Software Radio Peripheral ans seems to be an USRP, just simpler. That sounds good, but the USRP seems to be much more mature, developed or how you call it. It is used in lots of applications (like locating mobile phones in supermarkets, see the Wired article) and I did not find that much about the SSRP. Only that the first version works and he's working on the second one, where the hardware is trady but not the firmware or software.
So, if maybe one day I get my amateur radio license, I will look this projects up again and maybe get some cool stuff done. There's also an amateur radio group at my university. Unfortunately I did not know this before, I did not look into this and 1 year before I make my diploma neither does it make sense to start this new hobby and get to know the group nor do I have the time. So.... someday/later it is.
USRP is short for Universal Software Radio Peripheral. It is a USB (or GE, for the USRP2) connected board with some hardware on it that can receive radio signals (the full band, not just tuned to 1 channel), converts them to digital and sends it to the computer. The other way around works, too, you can send stuff. It is a nice tool, since it enables you to do lots and lots of things, starting from receiving FM radio, to receiving HDTV movies from the air, to GSM, GPS and WLAN. It's testing equipment, therefore you don't need a license to buy it. It's just, well, illegal to do some stuff with it.
The software tool used with that peripheral is GNU Radioand there's a wiki page about the USRP with all the stuff you need to build it on your own (software and hardware are GPL licensed) on that website. And did I mention, that there's an FPGA on that board? Really nice stuff.
If you are interested in this, I would recommend you to read the Wired article about GNU Radio.
The guy who designed this board is called Matt Ettus, and on his website he sells ready-to-use USRPs. But the price is quite high (at least for a hobbyist like me who only sees the new toy): The USRP is $700 and the USRP2 is twice that price.
That's where the SSRP project starts: SSRP stands for Simple Software Radio Peripheral ans seems to be an USRP, just simpler. That sounds good, but the USRP seems to be much more mature, developed or how you call it. It is used in lots of applications (like locating mobile phones in supermarkets, see the Wired article) and I did not find that much about the SSRP. Only that the first version works and he's working on the second one, where the hardware is trady but not the firmware or software.
So, if maybe one day I get my amateur radio license, I will look this projects up again and maybe get some cool stuff done. There's also an amateur radio group at my university. Unfortunately I did not know this before, I did not look into this and 1 year before I make my diploma neither does it make sense to start this new hobby and get to know the group nor do I have the time. So.... someday/later it is.
This blog
I never wanted this blog to be like that post. I mean, the post really sucks. I wrote about features I added, which I either did not use (Geshi) or which simply don't work (the LaTeX stuff) or which don't really interest the reader. I think. I will try not to write stuff like that again.
I also don't really like the way blogs work. Usually it's about writing articles (or posts), then you put them there and everythign is fine. If there is something wrong, you correct the article or you write another one correcting the first one. But things could be so much easier. I imagine the following: there are different kinds of texts you write for the blog. Let's call them news and articles. I use both. But blogs only support what I call news.
A news item is something that you write once ant then it exists. Fire and forget. If you find spelling errors in there, you can correct them. No big deal, nobody needs to know.
An article is something more complex. Maybe it's even a series of articles. Maybe you begin it today, continue writing in a week and finish it in a month. So, what do you do? Do you have it as a draft for a month? Maybe the introduction is already good today. So why not post it? What about changes? If you rewrite somethign or add something? At the moment, I split loger articles up and on the second and third one and so on, I write somethign like "You might also be interested in $article1 and $article2 and with the help of trackbacs readers can find follow ups to the first article in the trackback section. But that's too complicated. I'd like somthing like a merge between a blog, a wiki and a todo list system. I want the following:
The blog is like a simple blog, where you can post fire-and-forget news items and stuff.
The wiki is for articles. With every save you can tell the wiki what to do. It can automatically create a news item for the blog (with he first paragraph of the text or the first changes one or whatever. In my example it would post something like "$title - In this article I want to write about..." or whatever I wrote in the wiki. Two days later, I correct some spelling and I disable the creation of a new news item. A week later, I add another part of the article and the news item is created from the first new paragraph I added: "$title (Update) - [...] To add another point of view to this topic, I want to start with the following example:...". One month later I finish the article. I do some reordering, whatever and I enter some special news item text, which is not part of the article but is posted as news item: "$title - Today i finished my article about foo and bar. You may already have read some parts of it. What I did today is rewrite the section about generall foos, added some pictures about bars and finally wrote a conclusion about pink elephants...". So this would be the connection between the parts I want.
If I write complex articles, I want some control that they are still valid when they are read. Therefore I want expiration dates. With every news item or article I add an expiration date. The default fo news items is something like 5 years, or forever. Articles have a default about 1 year. If i write how I did something with the Gentoo Linux which enables me to do some crazy stuff, who guarantees me that it will still be valid after a year? Therefore I would get a reminder to update the article 2 weeks before the expiration date and after the article expired, there would be ome standard header stating "The author did not update this article in the last $whatever days/weeks/months/years. This article is most likely outdated and should be read with care. If you have some questions or want the author to update it, please ask so in a comment." I could, of course, add some more specific text like this on my own, add an "outdated" flag to the article (which might add some red warning sign or color somewhere) and then the article would be something like this: "I wrote this article $foo years ago. Back then I ustd $this hardware and $that software. I don't own this hardware anymore/don't use this software anymore/don't need this functionality anymore. You can still try to do the same with the information I give here, but please make sure, that you know what you are doing. $original_article".
Since I would use this application to write about projects, it would be nice to have a non-public list of projects I want to do, which can be edited comfortably. This feature could also be used for articles I want to write (if you don't call that projects). Also other fancy stuff like VCS, a ticket system or a bug tracker could be added or integrated. That I can write stuff like "I looked into [bug#123] today and updated [project] to [svn:project_name:$revision]. I hope this fixes it, if not, please comment on [bug#123]".
[Update:]
In a way, this is based on the same philosophy as my article about metadata.
I also don't really like the way blogs work. Usually it's about writing articles (or posts), then you put them there and everythign is fine. If there is something wrong, you correct the article or you write another one correcting the first one. But things could be so much easier. I imagine the following: there are different kinds of texts you write for the blog. Let's call them news and articles. I use both. But blogs only support what I call news.
A news item is something that you write once ant then it exists. Fire and forget. If you find spelling errors in there, you can correct them. No big deal, nobody needs to know.
An article is something more complex. Maybe it's even a series of articles. Maybe you begin it today, continue writing in a week and finish it in a month. So, what do you do? Do you have it as a draft for a month? Maybe the introduction is already good today. So why not post it? What about changes? If you rewrite somethign or add something? At the moment, I split loger articles up and on the second and third one and so on, I write somethign like "You might also be interested in $article1 and $article2 and with the help of trackbacs readers can find follow ups to the first article in the trackback section. But that's too complicated. I'd like somthing like a merge between a blog, a wiki and a todo list system. I want the following:
The blog is like a simple blog, where you can post fire-and-forget news items and stuff.
The wiki is for articles. With every save you can tell the wiki what to do. It can automatically create a news item for the blog (with he first paragraph of the text or the first changes one or whatever. In my example it would post something like "$title - In this article I want to write about..." or whatever I wrote in the wiki. Two days later, I correct some spelling and I disable the creation of a new news item. A week later, I add another part of the article and the news item is created from the first new paragraph I added: "$title (Update) - [...] To add another point of view to this topic, I want to start with the following example:...". One month later I finish the article. I do some reordering, whatever and I enter some special news item text, which is not part of the article but is posted as news item: "$title - Today i finished my article about foo and bar. You may already have read some parts of it. What I did today is rewrite the section about generall foos, added some pictures about bars and finally wrote a conclusion about pink elephants...". So this would be the connection between the parts I want.
If I write complex articles, I want some control that they are still valid when they are read. Therefore I want expiration dates. With every news item or article I add an expiration date. The default fo news items is something like 5 years, or forever. Articles have a default about 1 year. If i write how I did something with the Gentoo Linux which enables me to do some crazy stuff, who guarantees me that it will still be valid after a year? Therefore I would get a reminder to update the article 2 weeks before the expiration date and after the article expired, there would be ome standard header stating "The author did not update this article in the last $whatever days/weeks/months/years. This article is most likely outdated and should be read with care. If you have some questions or want the author to update it, please ask so in a comment." I could, of course, add some more specific text like this on my own, add an "outdated" flag to the article (which might add some red warning sign or color somewhere) and then the article would be something like this: "I wrote this article $foo years ago. Back then I ustd $this hardware and $that software. I don't own this hardware anymore/don't use this software anymore/don't need this functionality anymore. You can still try to do the same with the information I give here, but please make sure, that you know what you are doing. $original_article".
Since I would use this application to write about projects, it would be nice to have a non-public list of projects I want to do, which can be edited comfortably. This feature could also be used for articles I want to write (if you don't call that projects). Also other fancy stuff like VCS, a ticket system or a bug tracker could be added or integrated. That I can write stuff like "I looked into [bug#123] today and updated [project] to [svn:project_name:$revision]. I hope this fixes it, if not, please comment on [bug#123]".
[Update:]
In a way, this is based on the same philosophy as my article about metadata.
Tuesday, October 7. 2008
SSL error
Since some days I get a strange error when trying to connect to my local webserver using SSL:
This pretty much prevented me to get some work done, since I use svn for most of what I do and therefore I cannot do he commits I want. This got me thinking about some things. First, my config seems to be very unstable. This is not good for productivity. Second, I am dependent on svn, which is not good. Not only am I dependent on svn, but also on the svn server. If I would use something like git, it would be much easier. I could continue working and do some cronjob-tar backups while my server is down.
I found some pages mentioning the error, which either did not work for me, since I already have this config lines everywhere or simply tell me to redo everything, which isn't really a good solution but what I will do now, since I don't have a better idea.
[Update:]
I just started rebuilding my apache config from scratch, and svn works again. Everything but my vhosts should work. I'll do them later.
$ wget https://stoile.mine.nu
--2008-10-07 13:54:54-- https://stoile.mine.nu/
Resolving stoile.mine.nu... 87.180.218.250
Connecting to stoile.mine.nu|87.180.218.250|:443... connected.
OpenSSL: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol
Unable to establish SSL connection.$ svn up
svn: OPTIONS of 'https://stoile.mine.nu/*censored*': SSL negotiation failed: SSL error: unknown protocol (https://stoile.mine.nu)
This pretty much prevented me to get some work done, since I use svn for most of what I do and therefore I cannot do he commits I want. This got me thinking about some things. First, my config seems to be very unstable. This is not good for productivity. Second, I am dependent on svn, which is not good. Not only am I dependent on svn, but also on the svn server. If I would use something like git, it would be much easier. I could continue working and do some cronjob-tar backups while my server is down.
I found some pages mentioning the error, which either did not work for me, since I already have this config lines everywhere or simply tell me to redo everything, which isn't really a good solution but what I will do now, since I don't have a better idea.
[Update:]
I just started rebuilding my apache config from scratch, and svn works again. Everything but my vhosts should work. I'll do them later.
Tuesday, September 30. 2008
Installing Windows XP
There are two stories about this subject:
The nicest operating system I know still seems to be OS X. You can do everything you want with it, almost everything you can do on linux (at least all I need) and still, you install it and it works. All the basic functionality you need to survive: Internet/network stuff, a browser, email, ssh, a shell, a nice graphical user interface. From there you can do all the dirty hacks you want. Second comes linux, because I know it. Gentoo, mostly, but I also installed CentOS once and it seems to be nice. More work while getting it to run (CentOs is not easier to install, if you have a nice exotic setup) but mostly it works.
And what do we learn from this? When installing Windows XP, install the OS on a partiton on the primary master disk. No extended partition. Install Windows XP, then SP3, then security stuff and then drivers. You only get problems doing it another way. And make sure to have enought time to do this. Windows takes about... 5-10 times as long to install as CentOS or OS X.
And who is the winner? No idea.
And who is the loser? No, not the people wanting me to install this stuff for them. They don't know any better. the real problem is the pack of available up-to-date installation media and the wrong associations (computer = windows, presentation = powerpoint, text = word, table = excel, computer science = windows installing service).
- Some time ago friends of our family asked me to reinstall everything on their PC. I usually say no, find excuses or just ignore it. This time they asked my mother and my mothe kept on asking me over and over again. I said "sorry, I don't use windows and I don't know it. Furthermore it's f***ing easy to install it." "But they cannot do this and you study computer science..." Well, someone should shoot those people. Or thewy should pay a $1000 fee for stupidity. A friend of mine once said, he only does this for family members (and I mean parents, brothers, sisters, wife orchildren, if you have any) and everyne else should pay 50 euros an hour. I like the thought.
Well... I did it. They brought over their PC ("it's incredibly slow and gets slower and slower" "you already said, you run windows on it") and I started working. It was slow. Very slow. 5 minutes to boot and then I was still unable to work with it. I looked around a bit and found, that on-disk data compression (this "nice" NTFS feature) was turned on on the windows and program files dir. But there was plenty of free space. I disabled it globally and... waited for 5-6 hours. After that the computer was almost usable. but they wanted it reinstalled.
I only did boot the running system because they had forgotten do backup some data. Well, I did not find it (user A logged into account B and some interlan picture library C of program D has an album E... whatever). So I did "the right thing": Boot a linux cd and back up the filesystem images. As in "dd if=/dev/whatever of=/some/file" with some pipes and pipeworks/pv in between. I also ran a smart test and was quite pleased that the long one does not finish because of errors. Less work of backing up stuff, because they get a new harddisk and the old one with all the data, too.
So I told them and they said "we still have a spare one, we bought it on ebay, used". Well, it was not working, so 1 week later i bought a nice seagate 250GB harddisk. Windows setup only discovered 120 GB of it and I created a 50 GB partition for the system. Should be enough.
I took some time to install Windows XP home and Office, and about a day to get all the updates. Windows update wants to install all the small updates first, then it tells you "install this service pack" which would have installed all the small updates anyway. I wnated to create a new partition out of the free space on the disk but did not find a tool (is there still fdisk or something for the command line? I did not look there...). I installed Trackmania Nations Forever (this website looks totally screwed on my firefox 3, not sure why), really greate game. Finally they came to get the computer back. They also said they want to buy a new one for christmas. Not sure why I had to spend time with that machine now. - Since I enjoyed Trackmania Nations Forever so much on this other PC, I decided to install WinXP Pro on my machine. I have a spare harddrive (20 GB, yay!) anyway. But.... did you ever try to install this on a primary slave harddrive? It's not possible. Also, setup was thinking my LVM partition (type 8e in fdisk, I think) was some damaged windows partition and wanted to repair it. I have no important data there and I have not lost any data. Puh.
So I reconsidered what to do. The best way seemd to switch the 2 harddrives. So I changed my linux config to use sdb everywhere instead of sda. Works well. A second boot partiton on the new primary master (same size as the one on primary slave, it's a raid1 now, thanks mdadm) and then windows on the ret of the disk. The setup looked quite ugly (my computer should not be much more modern than this OS, except for my graphics adapter (GeeForce FX 5200) and my monitor (1600x1200 12" TFT). Windows did not seem to know this resolution, and installing the nvidia driver led to 640x480 and 4 bit for colors, as a maximum. Thanks for that.
I installed service pack 3, all other security updates and then it worked, my screen was looking good. Well, I write that in a minute, but it took about 5 hours, I think. Downloading SP3 for system administrators (windows update sucks very much), installign it, installing firefox, thunderbird, a free antivirus program, putty, winscp, wackget,...
Then I wanted to install TMN Forever... but the zip image was damaged. So much about windows. You only have problems with it, and when you think everything is ok, Murphy applies some magic on a TCP connection, harddisk or whatever.
The nicest operating system I know still seems to be OS X. You can do everything you want with it, almost everything you can do on linux (at least all I need) and still, you install it and it works. All the basic functionality you need to survive: Internet/network stuff, a browser, email, ssh, a shell, a nice graphical user interface. From there you can do all the dirty hacks you want. Second comes linux, because I know it. Gentoo, mostly, but I also installed CentOS once and it seems to be nice. More work while getting it to run (CentOs is not easier to install, if you have a nice exotic setup) but mostly it works.
And what do we learn from this? When installing Windows XP, install the OS on a partiton on the primary master disk. No extended partition. Install Windows XP, then SP3, then security stuff and then drivers. You only get problems doing it another way. And make sure to have enought time to do this. Windows takes about... 5-10 times as long to install as CentOS or OS X.
And who is the winner? No idea.
And who is the loser? No, not the people wanting me to install this stuff for them. They don't know any better. the real problem is the pack of available up-to-date installation media and the wrong associations (computer = windows, presentation = powerpoint, text = word, table = excel, computer science = windows installing service).
Tuesday, September 23. 2008
Metadata
... or: Stop duplication now!
I was just chatting with a friend ang got some new idea or revived one of my long-term ideas. It's about music and movies, metadata and files and databases.
At the moment you have the following: Music files are somewhere in your filesystem, let's call it ~/Music/$artist/$album/$track. $artist - $title.ogg Some don't have the artist in the filename, since it's duplication, but I like it. And then you want to change something, either the id3 tag or you rename a file/directory. Then this all is inconsistent. Which sucks. Some tools save the files in a way you cannot access them on the command line, but that's strange, too. Think of ~/.$musicplayer/my_music/$md5_checksum_of_file.ogg. Very nice, if you want to access some files without starting the application.
So, what would be the solution to this? Create a simple, dumb data storage server (ok, you can use the filesystem if you want) and provide nice, configurable access via FUSE. This should really be doable and in my imagination, it woudl be great. Just think of this: All your files with metadata (mostly music and movies, or other media files) are stored in a database, say Postgres. You can create an extra table type for that, which can be very very dumb because you have very little writes and only lots of reads. You could store bigger files in blocks or something. Ok, it would be only a filesystem, but remote. Then the mediy player accesses the files on the database and uses them. Furthermore, if you want access on teh filesystem, you can configure how you like it. It's exactly the same as defining where your audio files should reside after grabbing them from a CD.
What do you think of this? Stop using the filesystem (in the traditional manner) for some sort of files in favour of removing duplication and write a read-only FUSE module for command line access purposes?
An addition: I started configuring and using Bacula some days ago. Very nice tool and very nice design. Sort of revived my ideas, too. Think of a FUSE module for live acess to backed up data. Something like /mnt/backups/$jobname/$job_date-$job_id/.
[Update:]
I talked with a friend a bit about this article and I think I was not clear enought about what I wanted to say. This is mostly about seperating interface and data. You don't care anymore how your data is stored, but you have a clear interface. The filesystem is not too bad, but it's too complicated to change stuff there and also to be able to use metadata in a nice way. If you would have a nice simple interface, you could write some code to have exactly the filesystem view you want. Or your application could use it more direct (with the help of some libraries or whatever) without using the filesystem and parsing files. Ok, a library could be written to do the parsing and stuff, but with a database you get transactions for free and you might even be able to implement checkpoints or views in an easier way.
I was just chatting with a friend ang got some new idea or revived one of my long-term ideas. It's about music and movies, metadata and files and databases.
At the moment you have the following: Music files are somewhere in your filesystem, let's call it ~/Music/$artist/$album/$track. $artist - $title.ogg Some don't have the artist in the filename, since it's duplication, but I like it. And then you want to change something, either the id3 tag or you rename a file/directory. Then this all is inconsistent. Which sucks. Some tools save the files in a way you cannot access them on the command line, but that's strange, too. Think of ~/.$musicplayer/my_music/$md5_checksum_of_file.ogg. Very nice, if you want to access some files without starting the application.
So, what would be the solution to this? Create a simple, dumb data storage server (ok, you can use the filesystem if you want) and provide nice, configurable access via FUSE. This should really be doable and in my imagination, it woudl be great. Just think of this: All your files with metadata (mostly music and movies, or other media files) are stored in a database, say Postgres. You can create an extra table type for that, which can be very very dumb because you have very little writes and only lots of reads. You could store bigger files in blocks or something. Ok, it would be only a filesystem, but remote. Then the mediy player accesses the files on the database and uses them. Furthermore, if you want access on teh filesystem, you can configure how you like it. It's exactly the same as defining where your audio files should reside after grabbing them from a CD.
What do you think of this? Stop using the filesystem (in the traditional manner) for some sort of files in favour of removing duplication and write a read-only FUSE module for command line access purposes?
An addition: I started configuring and using Bacula some days ago. Very nice tool and very nice design. Sort of revived my ideas, too. Think of a FUSE module for live acess to backed up data. Something like /mnt/backups/$jobname/$job_date-$job_id/.
[Update:]
I talked with a friend a bit about this article and I think I was not clear enought about what I wanted to say. This is mostly about seperating interface and data. You don't care anymore how your data is stored, but you have a clear interface. The filesystem is not too bad, but it's too complicated to change stuff there and also to be able to use metadata in a nice way. If you would have a nice simple interface, you could write some code to have exactly the filesystem view you want. Or your application could use it more direct (with the help of some libraries or whatever) without using the filesystem and parsing files. Ok, a library could be written to do the parsing and stuff, but with a database you get transactions for free and you might even be able to implement checkpoints or views in an easier way.
(Page 1 of 2, totaling 29 entries)
next page
