Database, Fuppes, Weekly Summary

Before Uni Begins (Weekly Summary Five)

DOE (Digest of Events)

This week in the news:

  • The Fuppes Packaging effort is moving along slowly; nobody has chosen to sponsor it yet.
  • I have written a html Logic Tree drawing program and it works on all HTML versions.

Uni Comes Back

University starts up again this week and I am really looking forward to it; after all, I will be doing AI, OS and Haskell. I have actually done quite a bit of study already for these subjects. Unfortunately, it means that I will not be able to spend as much time as I usually do on extra projects. It does not mean that I will stop working on them but that I will be moving slowly instead.

Dvorak

They say that “Prevention is better than Cure” and I do worry occasionally that all of this extended work on the Computer may eventually hurt my hands. To prevent that scenario I am now learning to use Programmer Dvorak and learning how to Touch Type at the same time. It is proving to be rewarding already and, though I type really slowly, I can already type without touching the keyboard. And I have noticed that my speed is regularily increasing. I was so happy with the improvements that I went online and bought Programmer Dvorak Keyboard Stickers and when they arrive in the mail I fully intend on applying it immediately. (You may have noticed that this post is not as long as usual; this is why)

Fuppes Config

Uli has spoken with me and he does not wish to add another dependency to Fuppes by using SOCI. Fair enough. As a result he is currently doing some database work and I am going to work on getting the Fuppes config separated into multiple files. That way for each different device you use a different file; so sharing devices will become much easier.

Advertisements
Fuppes, Packaging, Weekly Summary

Packaging Gets Complicated (Weekly Summary Three)

Happy Valentines Day readers. I’ve had quite a little trip over the past few days. I have done alot this week in my attempt to package Fuppes for Debian and it makes for a long sort of story; so long, that you should consider this the weekly summary. I had finally taken Fuppes to the stage where I believe that it was ready to package; it compiled just fine on Ubuntu and, believing that Debian and Ubuntu were not that different, I wanted to make and submit a package for Debian. But first that would require a Debian install on my machine.

Dual Booting Ubuntu and Debain

The logical option was to dual boot Debian and Ubuntu and make them share the same /home partition. For those of you who have not heard of this before, many GNU/Linux users that I know prefer to always partition their machines so that one partition is for the root directory and one for the home directory. This has important advantages for data retention:

  • Your OS is separated from your personal data
    The operating system exists in the root directory and all of you data (should) exist in the /home directory; therefore, if you wanted to, you could completely reinstall your OS and keep all of your data. This has saved me quite a few times when I have damaged my OS beyond repair and done a complete reinstall; a few moments after the reinstall I’m exactly where I left off. No loss of data at all.
  • Better for Hard Drive Fails
    I have been led to believe that partitioned hard drives are easier to extract data from in the case of faults. Should you be crazy enough not to make backups, then you may have a greater chance of success of recovering your drive with this setup.

What this all means is that when I wanted to dual boot two operating systems that point to the same data all I had to do was add an extra partition for the Debian OS and tell it to mount the /home directory as its own. Therefore I have the following partitions on my machine:

  • /dev/sda6 – Ubuntu /
  • /dev/sda7 – /home
  • /dev/sda8 – Debian /
  • swap – Common swap directory

However, getting there was not that easy, and I encountered two problems when trying to install Debian lenny via a net install I met with two problems. The first was one that I could not explain; when I tried to install Gnome as my window manager it would download all of the required packages and then freeze for no apparent reason. I had no idea why that happened and I still don’t but I can tell you that using Xfce as my window manager instead solved the problem.

The next issue that I encountered was more serious, my Debian net install CD had no knowledge of the existence of /ext4 file systems; which was the type of file system that I had installed the Ubuntu root on. So when the Debian install went looking for other OS installs it could find nothing. It said that it found nothing else on the machine and asked me if I would like to overwrite the MBR. I didn’t really think straight and clicked OK; byebye Ubuntu Boot record. So Debian installed correctly but now my Ubuntu partition was unreachable; good one Robert, I felt pretty dumb. But, luckily, it was fairly easy to just reinstall Ubuntu on that partition again. Ubuntu recognized the /ext3 partition that Debian was installed on and now I have a Dual Boot-able system with Debian and Ubuntu. Finally I could try and compile Fuppes on Debian.

Compiling Fuppes on Debian

When I tried to compile fuppes on Debian it proved to be more difficult than I thought. It seems that the real difference between Debian and Ubuntu is the strictness of which packages you can install and what they provide. Debian is very strict about the whole FOSS concept and does not let you use anything that is not. As a result many of the meta-packages for fuppes did not build. My short term solution was to simply comment them out and try and get what remained into Debian. Once it was in Debian then it would be my future task to add support for all of the extras. As a result I am pleased to announce the following:

FUPPES has finally gone up for Debian RFS (Request For Sponsor)!

The package itself has been placed on mentors.debian.net for sponsors to download it and check it out. As of the time of this writing three prospective sponsors have checked it out downloaded it. I hope to hear from them soon with any comments that they may have. I expect that there will be a number of things that I got wrong, being my first package, but I will put in whatever effort is required to actually get this package in there.

Other Notes of Interest

  • It turns out that it is not that hard to make a package archive mirror for Ubuntu; I’ll be making one later this week.
  • The Ubuntu Vimperator package is broken in Ubuntu but not Debian. So for a dual booter like me I cannot currently have Vimperator in both UbuntuĀ  an Debain. This should be fixed in Ubuntu Lucid.
  • Bioshock 2 is an awesome game! I finished it in four days. The storyline was a major disappointment but the gameplay was beyond compare. All in all good work 2K.
  • Telstra Bigpond frustrates me. I am only allowed 12GB per month and there are no other competitors that I can goto to get a better deal; somehow they have monopolised my area and I am stuck with their ripoff prices.
  • The next game I might look at playing is Trine; suggested to me by a friend.

I hope you’ve had a great week. Thanks for reading this long post and I will keep everyone updated.

Fuppes

Fuppes Liscense and Others

Fuppes is released under the GPLv2 or above and I was wondering recently what restrictions that placed on us as developers and users of the software; and, more importantly, why the GPL and not some other lisence? To that extent I found this post on fosswire very useful.

I personally like the fact that Fuppes is under the GPL. If we are going to work hard to produce an awesome piece of software and it is our desire to give it out for free, on the condition that all software that uses it also be free, then our wishes should be abided by. We want to help all those who believe in free software; we do this out of a desire to help. If we wanted people to make money from our effort then we would, in turn, sell it to them. Commercial software cannot depend on free alternatives, if you want to make people pay for it then it stands to reason that you should have to pay for it.

In fact, it would be nice to have a dual license whereby your software is free to use in free software but Companies must pay to use it in theirs. If one exists then I don’t know about it and please let me know.

I really appreciate the OS community and this is the only way I can give back meaningfully; it is my way of paying it forward. If you wish to show your true appreciation for a piece of software then the best way to do it is to help people work on it. All assistance goes a long way, consider a project with five people, your input gives then 20% more man power, which is huge for them. And why not help them to help you after all?

P.S. I will start putting Fuppes up for the RFS in Debian soon.

Fuppes, Presentation

Fuppes: Webinterface

This post is here to discuss the presentation interface of Fuppes. Currently it is a web-interface; a bunch of HTML pages that are generated by the fuppes program itself to server some basic configuration. However, to anyone that has looked at the current source code you will realise that that much HTML in C++ code begins to look a little messy. That is why Ulrich suggested something with a few more layers of abstraction. Who says that fuppes configuration must be restricted to a web interface; what if you don’t have a browser, or you have a headless server and no other computer to access fuppes from? What if you prefer the command line? Or a nice GUI application (made for your window manager of choice)?

So how do you solve the problem where people may want a variety of ways to get and set Fuppes configuration? Our solution is to create an abstraction layer that accepts get / set requests over the network. It will use SOAP Requests to send data back and forth between the two programs with fuppes acting as the back-end and the addition acting as the front-end in whatever manner it sees fit.

Work on this abstraction layer has begun but is moving slowly and there are also other things to consider while we are rewriting the abstraction layer. Proper login forms so that we do not have to filter and provide ‘security’ using IP addresses would be a good start. There are also some todo list items that could be read while that is going on. It is also a good excuse to double check configuration again.

Once I finish work on the database side of Fuppes then I plan to work of the interfaces to accessing the configuration.

N.B. Packaging Fuppes is still underway too. You can find it at git.debian.org under collab-maint/fuppes.git.

Database, Fuppes

Fuppes Databases and ORM

While looking at the database structure of fuppes I decided to see if it was actually possible to get fuppes to work with mysql and found out that for the average user (and even myself, a developer) it cannot be done with the current revision without serious changes to the source code. I know this because the plugin is not even loaded as an option in ‘src/lib/libmain.cpp’ of fuppes which means that more work needs to be done before it is ready to use by general users.

It is difficult to write a framework where many different DB’s can be all used as the backend to the same program; unless you use some type of ORM of course. I was thinking that since I was planning on doing a little bit of a database overhaul for fuppes that I might look into using SOCI (http://soci.sourceforge.net/) for all of our database work. SOCI has many positives that make it attractive for fuppes:

  • It supports Oracle, PostgreSQL, MySQL and Sqlite which is three more DB’s than fuppes currently uses for the price of one API.
  • It works on Windows and *nix operating systems. I discovered that it has packages in Ubuntu too.
  • It is rather easy to read compared to the other C++ ORM’s.
  • Integration with the STL is also supported; which got me excited. I love the STL.

And those are just the benefits for fuppes, it has more features that I have not mentioned here. If you want to know more you should go check them out.

Even if we decide not to use it for some reason then I will be still happy knowing that I tried. I think I will be doing a fair amount of database work over the coming weeks trying to improve not only database speed but the range of databases that fuppes can use.

Fuppes, Packaging

Collaborative Maintenance for Fuppes

This is really just a short post to let everybody know that fuppes v660 now exists in the debian collab-main project: http://git.debian.org/?p=collab-maint/fuppes.git;a=summary

Anybody and everybody can now join the project, make changes, and generally help package Fuppes for Debian based systems. If it makes it into Debian then it will filter down into other distributions like Ubuntu soon enough. I hope everybody takes this opportunity to go have a look. We can also use this to package fuppes for every different architecture and gain the advice of seasoned packaging veterans.

The fuppes-git that is present in git.debian.org is the development repository upto release version 660 with my Debian packaging changes on-top of it. That means that the version that we are packaging for Debian is version 660; which has a few noted bugs but is solid. If you have been feeling like you wanted to help develop fuppes this is a prime oppourtunity; packaging a piece of software is a good way to learn more about it.

However, if you don’t want to code but still want to help then I have started up The Documentation Project on the fuppes wiki. Please feel free to go there and help document Fuppes.

Fuppes, Packaging

Packaging Fuppes: Debian Collab-Maint Project

Things have started getting busy lately. Packaging fuppes is going very well; all of the errors are now past history and the only one remaining is warning me that the ‘S’ run level should not be included in the init.d script and it is right. It should not; it is meant for other Linux distributions. With that in mind all is going very well for packaging fuppes however there have been some other people that have shown interest in packaging fuppes and I want to let them have input and let them help. The more the merrier I say; and they seem to have more experience than myself at packaging for debian. To see what I am talking about you may want to check out the Fuppes Debian ITP (Intent To Package).

As a result I have applied to the Debian Alioth collab-maint project for a space for fuppes. The collab-maint project, as the name suggests, is a place for people that are all working on the same debian package to go and develop for it. That way the packaging effort can be made by many people and there are no branches as everybody attempts to make their own package. Not only that but helping out with the packaging of a program is a really good way to learn about it. Even though there is no compulsion whatsoever, I am hoping that some people might help package fuppes, see what it like, and realise that they could contribute code every now and then.

In the downtime, waiting for the collab-maint project to get back to me, I have been looking over the database structure of the fuppes project. I actually have many pages of information now, handwritten if you believe it, on the fuppes database: the purpose of each table and also the purpose and usage of each field in each database. As it turns out a few things need to be reconsidered:

  • The Details for the Objects could really be separated into three tables (Video, Audio and Image) but currently they are all mashed into the one table. This results in many ‘NULL’ fields.
  • The Objects database has about five fields that simply don’t get used; it could be half the size of the code needs to be written to use that functionality.
  • Playlists seem to be represented as a hack; the playlist is represented as an item in the Map Objects table and all of its children have it as a parent. But this completely breaks the order of the playlist (which is apart of every playlist spec) and is the cause of one of the bugs that I have seen in the bugtracker.

There are more items to consider but essentially I am trying to make the database fast. I want it to be such that if you have 20,000 media items and you open up fuppes, in five minutes everything is in order, the database is full and you can watch whatever video you want to. I think this will involve some sort of lazy evaluation, like only getting the details of an object when somebody looks inside its folder. That way alot of processing can be delayed; I’m not sure yet and it’s still early days but I look forward to increasing database speeds for fuppes and I hope you do too.