Posted on Dec 23, 2009

An App Store for everyone?

Yesterday I ran into a news talking about how much Tapulous earned from selling its game through the Apple App Store.

At first I've immediately thought about how much is important to have a service like App Store behind. App Store is simply amazing, clear, easy to use, transparent to the end-user. I think that Apple did put a nail in the coffin with that web-service and, mostly, it's thanks to App Store if iPhone (and iPod touch) is one of the most sold smartphone nowadays.

So, I've exchanged some emails with some friends of mine discussing about which probably is the must-have feature in order to reach similarly goals. The service itself? The quality of the software? The brilliantness of the software? The popularity of the service? The way a product is advertised?

Well, at first I was one of the guys that think that the quality of the software is the primary quality in order to achieve popularity and make some money, but after having seen articles like this I began to think that probably quality isn't one of the most remunerative features a product must have.
I think a software has to be brilliant at first. It has to promote an "idea" that no other softwares have ever promoted so far.
However this is a concept way too intrigued to be faced into 5-mins blog post.
 

But, as you might know, App Store is available only for iPhone OS. So I've started thinking about the possibility to have a similar centralized store available for every other platform.

Before going through that argument, let's think about what we already have.
 
Linux, for instance, already has a similar place for applications. Almost every distributions have a repository (or more) where applications are stored and available to users. The way the applications are "placed" inside such repositories are invisible to the end-user (Debian stores precompiled and prepared .deb files, Gentoo stores only ebuilds and so on) but every distros have a common way to dig into them.
 
Windows, in controversy, has no repository. Everything is entrusted to the search engines, local resellers or magazines.
 
Mac OSX places itself onto an halfway point. There are services like Version Tracker or MacUpdate that provides similary features but the user is still forced to open a browser in order to download an app. Furthermore they simply provide a nice way to search through thousands of apps but they don't provide a way to directly upgrade an app. At least, mac users, have notifications.
 

Another aspect of this discussion is spinning around the security issues. Windows, for the example, is the biggest hatch for warez programs. So, what's the point in providing such a service if everyone uses channels like Torrent (or whatsoever) to gather cracked apps?

Well, this already happens on iPhone/iPod touch. There's a process called Jailbreak that allows users to install unsigned apps, cracked apps. This way, the App Store concept goes to Hell.

Another thing is the real gain for developers compared with how much Apple (for Apps Store) earns by keeping their software in its own showcase.
Apple keeps for itself the 30% of the of the revenues, 70% goes to developers.
But, how much is 30%? This means that if Tapulous earns 1 million dollars a month, more then 400'000 dollars goes to Apple by doing nothing but allowing Tapulous to lay out their app. That's an huge slice, isn't it?
 
With such earnings, there will be competition over the world. There's no way Apple will provide Windows software through its channels, so Microsoft is forced to open and propose an identical service by using another name, obviously. This will surely drive into endless discussions, few software houses will put their software on a growing "app repository" with the result of having nothing changed.
 
In the hypothetical scenario where everything is set up, will users pay for applications if there was a common showcase right away? I don't think so.
I may be prejudiced towards Windows users (I was on them, long time ago) but I think the mentalities are quite different.
 

The million dollar question is: Is it really possible to give Computer users a service like App Store?

Posted on Dec 20, 2009

Set up a new kernel: few hints

There are few things that join various distros. One of such things is the kernel.

At first, configuring it, could be a very stressful task so here are a couple of suggestions:

  • There’s a website that can help you so damn much to find which modules are needed by your kernel in order to work. This website refers to Debian but you can completely ignore that. Just put into it an lspci -n and go check your kernel configuration.

  • You can often use an already working kernel in order to understand what’s important and what is not. Distros prepare kernels in order to have almost everything compiled as module. These modules are going to be automagically loaded by the kernel when the relative device is found, but most of those kernel modules are useless for your system.
    In order to see which modules are currently loaded on your system, you can issue lsmod but this command doesn’t provide very much per-device informations. lspci provides a nice switch (-v) that shows what’s the module that manages that device.

  • In the newest kernel (>=2.6.32), developers have add a new make build target called localmodconfig that performs the task mentioned above, and adds automatically the needed parameters to the kernel configuration. In you want more information about this, I suggest you to take a look to the kernelnewbies site where you can find very cool information around kernel world.


Posted on Dec 15, 2009

Xen & PCI Passthrough

Yesterday we have made the tree. Don’t know what’s the correct translation of that but, I mean, we have decorated the tree. You know.. when you put some fancy balls on a tree to celebrate Christmas properly..
Well, during this task I’ve discovered that I am not using my Wireless Phones so much so I was wondering about a way to make use of them.

So came to my mind brilliant idea to try to connect those phones to my XEN home-server.
I rebooted the machine, enabled integrated audio in the BIOS and I started looking for a solution to pass the relative PCI audio controller to my virtual machine “aquaria” that is the one devoted to such a task.

By “Googleing” around I’ve found very few sparse information so I decided to blog about this, since I think PCI passthrough is a XEN point of strength.

PCI passthrough means the ability to literally pass a PCI peripheral to a domU domain in order to gave it the full control of that peripheral.

There are two ways to achieve this: using pciback or pcistub.

I’m going to consider only pciback in my post because I think it’s the most elegant solution.

In order to make your dom0 providing such a feature you’ll need CONFIG_XEN_PCIDEV_BACKEND=y in your dom0 kernel configuration.
In order to make your domU acknowledging such device you’ll need CONFIG_XEN_PCIDEV_FRONTEND=y in your domU kernel configuration.

Please, double check your configuration.

As far as I know, CONFIG_XEN_PCIDEV_FRONTEND, is available only in xen-patched kernel (so you won’t find such parameter in your vanilla kernel). I think this is a huge limitation since I hadn’t ever installed a xen-patched-domU kernel since yesterday. I hope someday it’s going to be merged in mainline.

However this isn’t enough to get your XEN environment working properly.
To allow dom0 passing the PCI device you should collect its address:

$ lspci | grep Audio
00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 01)
$ lspci -n | grep 00\:1b\.0
00:1b.0 0403: 8086:27d8 (rev 01)


Once you gathered those informations, you have to edit /boot/grub/grub.conf file in order to tell dom0 to use pciback to handle that PCI controller:

root (hd0,1)
kernel /boot/xen.gz
module /boot/vmlinuz root=/dev/sda2 pciback.permissive pciback.hide=(00:1b.0)


The next step is to properly configure your domU so, open its configuration file and add

pci = [ '00:1b.0' ]

.

Theorically this should be enough to make your domU working properly.

This is my dom0 dmesg after being restarted:

pciback 0000:00:1b.0: seizing device
pciback 0000:00:1b.0: PCI INT A -> GSI 22 (level, low) -> IRQ 22
pciback 0000:00:1b.0: PCI INT A disabled
pciback: vpci: 0000:00:1b.0: assign to virtual slot 0

And these are my domU dmesg and lspci:

pcifront pci-0: Installing PCI frontend
pcifront pci-0: Creating PCI Frontend Bus 0000:00

$ lspci -v
00:00.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 01) Subsystem: Intel Corporation Device d604 Flags: bus master, fast devsel, latency 0, IRQ 22 Memory at 882a0000 (64-bit, non-prefetchable) [size=16K] Capabilities: [50] Power Management version 2 Capabilities: [60] Message Signalled Interrupts: Mask- 64bit+ Count=1/1 Enable- Capabilities: [70] Express Root Complex Integrated Endpoint, MSI 00 Kernel driver in use: HDA Intel


I hope this walkthrough has been useful to you. If someone more experienced than me in these things would contact me to fix some mistakes, I’d be glad to hear him/her out :)

Posted on Dec 4, 2009

Deluge 1.1.9 and zlib crash

Today I've rebooted my home-server and I discovered that deluged crashed at boot.

[ERROR   ] 11:43:01 main:207 can't decompress data; zlib not available
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/deluge/main.py", line 204, in start_daemon
    Daemon(options, args)
  File "/usr/lib/python2.6/site-packages/deluge/core/daemon.py", line 56, in __init__
    self.core = Core(options.port).run()
  File "/usr/lib/python2.6/site-packages/deluge/core/core.py", line 239, in run
    component.start()
  File "/usr/lib/python2.6/site-packages/deluge/component.py", line 198, in start
    _ComponentRegistry.start()
  File "/usr/lib/python2.6/site-packages/deluge/component.py", line 118, in start
    self.start_component(component)
  File "/usr/lib/python2.6/site-packages/deluge/component.py", line 125, in start_component
    self.start_component(depend)
  File "/usr/lib/python2.6/site-packages/deluge/component.py", line 125, in start_component
    self.start_component(depend)
  File "/usr/lib/python2.6/site-packages/deluge/component.py", line 130, in start_component
    self.components[name].start()
  File "/usr/lib/python2.6/site-packages/deluge/core/pluginmanager.py", line 69, in start
    self.enable_plugins()
  File "/usr/lib/python2.6/site-packages/deluge/pluginmanagerbase.py", line 84, in enable_plugins
    self.enable_plugin(name)
  File "/usr/lib/python2.6/site-packages/deluge/pluginmanagerbase.py", line 126, in enable_plugin
    egg.activate()
  File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 2149, in activate
    self.insert_on(path)
  File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 2252, in insert_on
    self.check_version_conflict()
  File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 2291, in check_version_conflict
    for modname in self._get_metadata('top_level.txt'):
  File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 2143, in _get_metadata
    for line in self.get_metadata_lines(name):
  File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 1144, in get_metadata_lines
    return yield_lines(self.get_metadata(name))
  File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 1136, in get_metadata
    return self._get(self._fn(self.egg_info,name))
  File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 1201, in _get
    return self.loader.get_data(path)
ZipImportError: can't decompress data; zlib not available
Exception in thread Thread-1 (most likely raised during interpreter shutdown):
Traceback (most recent call last):
  File "/usr/lib/python2.6/threading.py", line 525, in __bootstrap_inner
  File "/usr/lib/python2.6/site-packages/deluge/core/preferencesmanager.py", line 451, in run
  File "/usr/lib/python2.6/urllib.py", line 1228, in quote_plus
  File "/usr/lib/python2.6/urllib.py", line 1217, in quote
<type 'exceptions.TypeError'>: 'NoneType' object is not callable
Unhandled exception in thread started by
Error in sys.excepthook:

 

There's an easy workaround to solve this issue, that consists in editing /usr/bin/deluged as follows:

--- deluged.old 2009-12-04 12:44:38.000000000 +0100
+++ /usr/bin/deluged 2009-12-04 12:00:52.000000000 +0100
@@ -2,6 +2,7 @@

 # EASY-INSTALL-ENTRY-SCRIPT: 'deluge==1.1.9','console_scripts','deluged'
 __requires__ = 'deluge==1.1.9'
 import sys
+import zlib

 from pkg_resources import load_entry_point
 
 sys.exit(

 

I asked the guys upstream and I've been told that it's currently already fixed in the new 1.2.0 rc4. Since this problem seems not to be reproducible on every system, this is still a dirty (working) fix.

Posted on Nov 23, 2009

My Quassel theme

Few weeks ago I’ve created a page on my website to allow people to download the Quassel theme I’ve written.

I never got any comment/suggestion so far so, since I don’t think it’s just perfect as it is, I’m strongly encouraging you to test it and give me some feedbacks.