PHP scales well

I think PHP scales well because Apache scales well because the Web scales well. PHP doesn’t try to reinvent the wheel; it simply tries to fit into the existing paradigm, and this is the beauty of it.

Read on shiflett.org after a small pointer by Slashdot into the right direction. This guy really knows what he is writing – or at least it seems to me as I think exactly the same way as he does (which is a somewhat arrogant way of saying things, I suppose :-)).

Movable Type licensing

While looking for some documentation for improving my comments-system (later post), I came across a link to this blog entry that announces a revised licensing scheme for Movable Type 3.0.

This time they actually did it right: The (still) free edition is now clearly announced. The personal edition is what quite a lot of users (including myself) have wanted (unlimited blogs) and it is quite affordable. This is nice.

Thank you, Movable Type

All-time favourite Tools

Who doesn’t have them? Those all-time favourite tools. It’s not just software, it’s passion. Those tools are tools that you always have to use. Tools where all objectivity seems to fade away when it comes to making recommendations. Tools where you actively monitor (or even participate in) the developement. Tools where you, though they are free, gladly donate some money. Tools you love.

Of course, I too know of some tools. And this is my list (in no particular order):

  • Exim is an UNIX MTA (mail server). It is not only extremely configurable, it’s even easy to do so. Back in 2000, Exim was the only MTA capable of being used in a environement where all accounts are stored in a MySQL database. Since then I am using Exim for all my mail serving needs and I still have not stopped discovering new ways the incredibly flexible configuration scheme can be used to do even fancier stuff. But the greatest thing about exim is it’s creator, Philip Hazel. Phil is a ingenious programmer. A really pragmatical one. I love to read his emails on the exim mailinglist. I love to see his solutions that are quite often so much easier than what others suggested but leave nothing to ask for at all. Btw: During summer 2001 I even extended my Accounts-in-MySQL-Configuration and put it on the web as a .txt-File. Oliver Siegmar was convinced enough to build XAMS on it. I really like Exim
  • PostgreSQL came to my rescue when I desperatly needed a RDBMS that really merits that name. I constantly run into limitations of MySQL, so I was on the lookout for a better alternative. With the TOAST tables of PostgreSQL 7.1, it was finally possible to have length-unlimited columns which I needed in the webapplication I was working with (for storing long comments), so it became a real solution. Since then PostgreSQL never failed me or any of our customers. In my journey with PostgreSQL I learned a lot about programming database systems while reading through the posts of people like the ever so conservative Tom Lane and others. What a great community. What a great database server!
  • InnoSetup (and it’s graphical frontend ISTool) is a easy to use and extremely powerful generator for Windows Installations. I know that you are supposed to use MSI these days, but InnoSetup works, has any feature you could dream of and – that’s the point – is terribly easy to use. My journey with InnoSetup is a long one. It began back in 1996, where I was the first translator at all (now long outdated) and it goes on through nearly all releases till’ today. Inno’s programmer, Jordan Roussell is another one of those extremely talented ones. Reading his posts in the support newsgroups is a real pleasure – reading Inno’s sourcecode is very enlightening. How powerful such a little tool can be!

And you? Do you have such tools in your toolbox? Do you use the words love and software in the same phrase? I certainly do!

Web Applications and the View State

Today, it came to my mind, that I know of a problem with some web applications, which apparently few else seem to know about. What is worse, is that those new technologies like ASP.NET and Java Server Faces seem to run straight into the problem.

This article is even bigger than the usual, so I split it up.
Continue reading “Web Applications and the View State”

The price of abstraction

This article was featured on Slashdot today. It’s about the current state-of-the-art Linux-Desktop being quite demanding in Hardware – even more demanding than the arc-nemesis Windows XP.

And it’s true.

I see one of the problems in the basics of the Unix philosophy: Use small tools to do a specific task and another in the OpenSource-Philosophy: Write clean code.

These two approaches create wonderful architectures and abstractions of small tools doing their work.

What nobody seems to recognize: This so wonderful and well thought-out architecture is bloated per se. Let’s say you are playing a Video-File in a KDE-Video-Player running in KDE. This is what’s running on your system to acomplish this task (I hope I get all the (bigger) components really running – maybe there are more (or less) of them):

  • Linux Kernel
  • KDE-Sound-Server
  • X-Window-Server (complete with un-used network transparency which would not work with the video anyway
  • The whole QT-Library
  • Some basic KDE-Abstractions (kdelibs)
  • Your media player

Every one component ist cleanly seperated from each other – every one can be replaced without disturbing other components. Every one is designed cleanly using many abstractions to provide this replacability even for internal components.

But it get’s even more complicated: Many of the acting components are independant processes which creates the need for quite a bit of IPC wich is always slower than direct calls.

No wonder this is slow!

In Windows for example quite a lot of the stuff described above is actually running in the kernel or at least very close to it, maybe using undocumented interfaces to the kernel.

Playing a video mostly depends on DirectX which uses mostly in-process calls. It’s dirty, it’s unstable (maybe), but it’s fast, doesn’t flicker and happens to just work (the less independant components involved, the less can go wrong).

Of course that’s not how software should be written. It’s how it is written when fast and impressive resuslts are requested.

Changes…

… is the subject of the virus mails I had in my SPAM-Folder today. And Changes there are: It seems that the most current mutation of virus-what-ever-its-name-may-be now uses HTML to format the ZIP-Password I’m supposted to enter in green and bold typeface. *sight*

And It’s not about those Mails I’m unhappy about. I have a SpamAssassin based filter on the server and the SpamBayes Plugin in Outlook (and Mozillas own Spam-Filter in Thunderbird) which protect me quite well from actually seeing all those messages.

No. Its three different type of messages I’m getting that I’m concerned about:

  • Per day I’m getting about 20 messages telling me that I presumably sent a message containing a virus which has been eliminated by super-tool 2000 ™. Stupid, as my PC is completely virus free and everyone knows that those viruses and worms fake their sender adresses. Although not happy, I took the consequence and updated my filters to catch those things.
  • About 50 messages per day are out-of-office replies of people I never met. I hate those as they are completly unnecessary. After all Email is not a real time medium and if it’s really important that your customers get an immediate response, you can tell them in advance that you are not there or have someone else take over the communication. Filtering those messages proves difficult as I’d be generating the source for quite a lot false-positives
  • Finally I’m getting all those non delivery messages from MTA’s all over the world. Some because of integrated virus scanners (sometimes I’m getting even two messages per virus I’ve not sent: One commercial for a virus scanner and one non delivery report) and some because the destination users do not exist. Because the virus fakes the sender adress, I am getting those messages. And because I have the postmaster@<many domains>-Adress, I’m getting even more of those. Summed up, we’re talking of about 100 messages per day. Additionally, I must not filter those. I mean: There are about 1000 useful cases for non-delivery reports.

So, you see: The amount of messages I can filter with a good conscience is actually only a small percentage of junk mail I’m getting per day. Where does this lead to? How can it be fixed? I’ve no idea.

All this fuss about Gmail

When reading the news on the web, one thing is in all mouths: Googles email service gmail. What I cannot understand is the fuss about gmails privacy policy. The following two points are what everyone seems to be so upset about:

Residual copies of email may remain on our systems, even after you have deleted them from your mailbox or after the termination of your account.

I ask you: So what? Just imagine how this service is going to work: Google has thousands of computers running – that’s their philosophy. For me it’s jsut clear that the whole concept would not work if there where just one copy of each email message available. Think of it: Every message that enters the system surely is replicated among the many cluster nodes at google. This is a going-on process. And it’s just the same with a deletion: Once you delete the message, this process must be replicated among the cluster nodes. It’s just not feasible to instantly remove a message on 100’000 computers. And: While receiving and displaying a message to the user must have absolute priority, processor time and network usage can be saved if deletion requests in the cluster are handeled with lower priority.

For me, this clause does not mean: “We will keep your mail forever because we want to know everything you do and you are”, but “to provide the optimal service for you, there may be some technical limitations that prevent a message from being immediately deleted from 100’000 computers at the same time”. It’s great that google tells us about this. What about hotmail? Can they guarantee instant deletion? Don’t they run a cluster?

Google’s computers process the information in your email for various purposes, including formatting and displaying the information to you, delivering targeted related information (such as advertisements and related links), preventing unsolicited bulk email (spam), backing up your email, and other purposes relating to offering you Gmail.

This is so plain simple. Tell me of one webbased email service that does not to the very same thing. The thing everyone is concerned about is the “delivering related information”-thing. But this does not mean that the computer or anyone else really “reads” your email. It just tells you that the content that is displayed on your webbrowser is analyzed and that targeted advertising is added. Tell me about any other webbased email service that does not do that.

So for me this is a whole lot of hot air and really injust: Where the privacy policies on other services just don’t tell you those (obvious) things, google’s is and everyone complains about. I hate the press.

RealPlayer – Useable again?

The last time I’ve installed RealPlayer was back in 96 or so. Since then the have added more stupid icons, popup windows, sales-pitches and such useless features with every new release, while they went great lengths in hiding the free download, giving the impression, that one has to pay to view realvideo content.

It looks like they finally saw that being nasty and cluttering users systems with trash does not get them anywhere…

Not that you get the impression I’m actually visiting the linked page regularly, but it was linked on slashdot today.

Cinecard

Here in zurich one of the company running the cinemas (Kitag AG) has a quite good working reservation system based on the “cinecard” which allows you (for one thing) reserve or buy tickets from the internet with a realtime preview which seats your’re going to get.

Recently they have changed the old chipcards to a thing containing an RFID-Tag. As my problems with this (they don’t even have a privacy policy on their site) mostly concerns people in Zürich, Basel and Bern, I’ll post a small article I have written in german. This is from an Email I sent to an employee of Kitag AG. She doesn’t like what I wrote either:


> ehrlich gesagt. Das mit der Ciné-Card habe ich im Fall nicht gewusst -
> wie funktioniert das?? Über den Magnetstreifen/Chip? Hilfe, dann bin
> auch ich trackbar!! Im Internet sowieso überall... das ist furchtbar.

Der Chip, der in die neuen Cinecards eingebaut ist (bei den CD’s war er noch sichtbar unter dem weissen Papier rund um das Loch - bei den ganz neuen ist er in das Material eingearbeitet) wird als RFID-Chip bezeichnet. Das Ding kostet, wenn Du genügend grosse Stückzahlen abnimmst, so um die CHF 1.50 pro Stück, ist weniger als ein Millimeter dünn und funktioniert folgendermassen:

Du kannst das Teil durch Induktion (man bedenke: Ein Rechts-System, ein Rechts-System) über ca. 30 Meter mit Strom versorgen. Hat es Strom, kannst Du spezielle Kommandos senden, um die eingespeicherte ID auszulesen.

Also: Jeder RFID-Tag hat eine eindeutige Nummer gespeichert und diese Nummer kann aus 30 Metern Distanz ausgelesen werden, ohne dass Du es merkst.

Soviel zur Technik an sich.

Die Idee war, dass man damit die Barcodes ersetzen kann. Und die Sache hat was: Im Migros füllst Du deinen Einkaufswagen mit Kram, fährst ihn zur Kasse und plopp steht da, was Du bezahlen musst, weil die Kasse eben die RFID-Tags der Waren im Wagen ausgelesen hat. Bequem.

Gleiches im Lager: Du hast ein Lager mit verschiedenen Regalen. Ein RFID-Scanner überwacht nun den Füllstand desselbigen konstant. Wird das letzte Stück aus dem Lager genommen, plopp wird nachbestellt. Bequem.

Wall-Mart in den USA hat das System weitergetrieben: Am Regal mit den Gilette-Rasierklingen (schweineteuer) wurde ein RFID-Scanner und eine Webcam angebracht. Die Kamera hat jeden photographiert, der ein Packet Klingen aus dem Regal entnommen hat. An der Kasse wurde dann über einen ernuten RFID-Scanner festgestellt, wenn einer eine Rasierklinge bei sich trug. Wenn ja, wurde ein Photo gemacht und mit den Regal-Photos verglichen. Eventuelle Diebe konnten so nachdem sie die kasse passiert hatten bequem von den Hausdetektiven geschnappt werden. Dumm nur, dass das System nicht zuverlässig funktioniert hatte (z.B. das Zurückstellen von Klingen zurück ins Regal), was zu tonnenweise sinnlosen Durchsuchungen und Anzeigen geführt hat. Weniger Bequem.

Szenario: Benetton verwendet RFID-Tags auf ihren Kleidern. Die Tags sind konstant aktiv und können von überall her ausgelesen werden. Ich ziehe mir so einen Pullover an und kaufe daraufhin im Coop eine Kiste Bier. Ein RFID-Scanner bei der Kasse findet einen unbekannten Tag (den in meinem Pullover), meldet den bei der Kasse, die gleichzeitig meine Präferenz nach Bier speichert. Bedenke: RFID-Tags sind weltweit eindeutig. Nun komme ich das nächste Mal in den Coop. Der RFID-Scanner am Eingang erkennt meinen Pollover wieder und plopp habe ich einen Mitarbeiter von Coop am Arsch, der mir eine Kiste bier verkaufen will. Mühsam.

Es wird noch besser: Mit meinem Pullover gehe ich nun und kaufe mir einen PC, den ich per Kreditkarte bezahle. Der RFID-Scanner erfasst die eindeutige ID meines Pullovers und sendet die zusammen mit Daten über meinen Einkauf und mit meiner Kreditkarten-Nummer an die örtliche Mastercard-Niederlassung. Zwei Tage später: plopp Werbung für einen passenden Drucker in meinem Briefkasten – direkt von Mastercard.

Da nirgens auf kitag.com steht, dass sie meine persönlichen Daten nicht an 3. weitergeben, habe ich leider keine Garantie, dass mein Name und Adresse, der jetzt ja eindeutig der eindeutigen ID auf dem RFID-Tag der cinecard zuweisbar ist, nicht früher oder später weitergegeben wird. Bequem für Händler und Strafverfolger (von denen ich zum Glück nichts zu befürchten habe), die Partner der kitag sind: Wann immer ich mit meiner Cinecard (habe sie immer im portemonaie dabei) ein Laden des Partners betrete könnte ein RFID-Scanner die ID erfassen und damit meinem Namen und meiner Adresse, die ich selbst auf kitag.com eingegeben habe die getätigten Einkäuft zuordnen. Kitag und deren Partner hätten in kürzester Zeit ein genaues Profil, was Philip Hofstetter so tut. Was er einkauft, wo er das tut, welche Filme er schaut, wo er wohnt,… Cool, was?
</tt>

If you live here in switzerland, coordinate with me to get something done. I’ll already be fine with a statement from kitag that they do not give away personal data.

Each problem has a solution…

… it’s just a question whether you like it or not.

But then again: Does idealism justify using the wrong tool for a particular problem just because the right tool does not seem ideologically right?

We’ve installed an evaluation version of Microsoft Exchange and despite some problems at first, it’s working very well and is the best groupware-solution we have tried so far.

Needless to say that there are many proxies and relays between the net and the actual box. That much I don’t want to trust it ;-)